]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
4 years agoadd bounds check for attributed variables slice
Mark Thom [Sun, 21 Nov 2021 18:30:15 +0000 (11:30 -0700)]
add bounds check for attributed variables slice

4 years agotag DCG constructs with module names for proper resolution
Mark Thom [Sat, 20 Nov 2021 06:00:56 +0000 (23:00 -0700)]
tag DCG constructs with module names for proper resolution

4 years agobreak from get_char loop after successful char unification
Mark Thom [Fri, 19 Nov 2021 06:41:58 +0000 (23:41 -0700)]
break from get_char loop after successful char unification

4 years agounmark cell bits in occurs check
Mark Thom [Thu, 18 Nov 2021 16:35:00 +0000 (09:35 -0700)]
unmark cell bits in occurs check

4 years agosupport comparison and unification of cyclic partial strings
Mark Thom [Thu, 18 Nov 2021 06:29:23 +0000 (23:29 -0700)]
support comparison and unification of cyclic partial strings

4 years agogreatly reduce the number of goal expansions done in callable if/then/else
Mark Thom [Tue, 16 Nov 2021 04:27:42 +0000 (21:27 -0700)]
greatly reduce the number of goal expansions done in callable if/then/else

4 years agouse new heap term representation
Mark Thom [Sun, 14 Nov 2021 20:39:56 +0000 (13:39 -0700)]
use new heap term representation

4 years agoMerge pull request #1156 from mthom/proper_var_list_order_issue_1121
Mark Thom [Fri, 7 Jan 2022 03:46:59 +0000 (20:46 -0700)]
Merge pull request #1156 from mthom/proper_var_list_order_issue_1121

Correct order of variables in read_term/3 equation and variable lists

4 years agocreate read_term/3 variable lists in order of variable occurrence within terms proper_var_list_order_issue_1121 origin/proper_var_list_order_issue_1121
Mark Thom [Thu, 23 Dec 2021 20:31:49 +0000 (13:31 -0700)]
create read_term/3 variable lists in order of variable occurrence within terms

4 years agoMerge pull request #1132 from triska/tls_library
Mark Thom [Tue, 14 Dec 2021 02:11:04 +0000 (19:11 -0700)]
Merge pull request #1132 from triska/tls_library

ADDED: library(tls) for negotiating TLS connections

4 years agoMerge pull request #1141 from triska/layout_text_sequence
Mark Thom [Tue, 14 Dec 2021 02:09:37 +0000 (19:09 -0700)]
Merge pull request #1141 from triska/layout_text_sequence

ENHANCED: Support also comments in integers with underscores

4 years agoMerge pull request #1142 from triska/s
Mark Thom [Tue, 14 Dec 2021 02:09:20 +0000 (19:09 -0700)]
Merge pull request #1142 from triska/s

report time with "s" instead of "seconds", in analogy to time(1)

4 years agoMerge pull request #1143 from heydtn/patch-1
Mark Thom [Tue, 14 Dec 2021 02:04:46 +0000 (19:04 -0700)]
Merge pull request #1143 from heydtn/patch-1

Fix typo in abnf_lwsp/2

4 years agoMerge pull request #1147 from triska/pio_improvements
Mark Thom [Tue, 14 Dec 2021 02:04:27 +0000 (19:04 -0700)]
Merge pull request #1147 from triska/pio_improvements

ENHANCED: Use newly available fast chars test from library(error).

4 years agoENHANCED: Use newly available fast chars test from library(error).
Markus Triska [Sun, 12 Dec 2021 16:37:59 +0000 (17:37 +0100)]
ENHANCED: Use newly available fast chars test from library(error).

4 years agoFix typo in abnf_lwsp/2
Nate Heydt [Thu, 9 Dec 2021 15:33:42 +0000 (07:33 -0800)]
Fix typo in abnf_lwsp/2

4 years agoreport time with "s" instead of "seconds", in analogy to time(1)
Markus Triska [Wed, 8 Dec 2021 15:13:54 +0000 (16:13 +0100)]
report time with "s" instead of "seconds", in analogy to time(1)

This addresses https://github.com/mthom/scryer-prolog/pull/1131#issuecomment-988670049 .

4 years agoENHANCED: support full layout text sequence (also comments) in integers with underscores
Markus Triska [Wed, 8 Dec 2021 09:42:19 +0000 (10:42 +0100)]
ENHANCED: support full layout text sequence (also comments) in integers with underscores

Example:

    ?- X = 1_/**/2.
    %@    X = 12.

Following the comment in https://github.com/mthom/scryer-prolog/pull/1112#issuecomment-981540485

4 years agoremove redundant test: '\n' is a layout char.
Markus Triska [Wed, 8 Dec 2021 09:37:37 +0000 (10:37 +0100)]
remove redundant test: '\n' is a layout char.

4 years agoMerge pull request #1131 from triska/cpu_time
Mark Thom [Wed, 8 Dec 2021 03:30:00 +0000 (20:30 -0700)]
Merge pull request #1131 from triska/cpu_time

walltime --> CPU time

4 years agouse newly available predicates from library(tls) for HTTPS
Markus Triska [Sun, 5 Dec 2021 16:28:00 +0000 (17:28 +0100)]
use newly available predicates from library(tls) for HTTPS

4 years agoADDED: library(tls), providing all predicates for TLS connections.
Markus Triska [Sun, 5 Dec 2021 15:46:52 +0000 (16:46 +0100)]
ADDED: library(tls), providing all predicates for TLS connections.

The currently available predicates for TLS-connections can be extended
with predicates to load and reason about certificates etc.

4 years agoimplement tls_client_negotiate/3 for explicit negotiation
Markus Triska [Sun, 5 Dec 2021 16:11:38 +0000 (17:11 +0100)]
implement tls_client_negotiate/3 for explicit negotiation

4 years agoMODIFIED: Remove TLS-related predicates from library(sockets).
Markus Triska [Sun, 5 Dec 2021 15:33:44 +0000 (16:33 +0100)]
MODIFIED: Remove TLS-related predicates from library(sockets).

They will become available in a new library, library(tls).

4 years agowalltime --> CPU time
Markus Triska [Sat, 4 Dec 2021 23:56:16 +0000 (00:56 +0100)]
walltime --> CPU time

4 years agoMerge pull request #1129 from triska/tls_servers
Mark Thom [Sat, 4 Dec 2021 23:23:43 +0000 (16:23 -0700)]
Merge pull request #1129 from triska/tls_servers

ADDED: Support for creating TLS servers.

4 years agoMerge pull request #1124 from triska/test_corrections
Mark Thom [Sat, 4 Dec 2021 23:23:31 +0000 (16:23 -0700)]
Merge pull request #1124 from triska/test_corrections

several corrections to test cases

4 years agoMerge pull request #1127 from triska/retract_correction
Mark Thom [Sat, 4 Dec 2021 23:23:00 +0000 (16:23 -0700)]
Merge pull request #1127 from triska/retract_correction

Correct retract/1 issues due to module qualification

4 years agoMerge pull request #1122 from triska/better_time
Mark Thom [Sat, 4 Dec 2021 23:22:14 +0000 (16:22 -0700)]
Merge pull request #1122 from triska/better_time

ENHANCED: Better reporting for time/1.

4 years agoADDED: Support for creating TLS servers.
Markus Triska [Thu, 2 Dec 2021 21:10:04 +0000 (22:10 +0100)]
ADDED: Support for creating TLS servers.

The new predicates tls_server_context/2 and tls_server_negotiate/3 can
be used to negotiate TLS connections with clients for encrypted and
authenticated communication.

4 years agoFIXED: retract/1 issues due to module qualification
Markus Triska [Wed, 1 Dec 2021 19:58:38 +0000 (20:58 +0100)]
FIXED: retract/1 issues due to module qualification

This addresses #1125.

4 years agoENHANCED: Better reporting for time/1.
Markus Triska [Tue, 30 Nov 2021 18:20:29 +0000 (19:20 +0100)]
ENHANCED: Better reporting for time/1.

This addresses #378.

4 years agouse anonymous variable
Markus Triska [Wed, 1 Dec 2021 19:54:06 +0000 (20:54 +0100)]
use anonymous variable

4 years agoseveral corrections to test cases
Markus Triska [Wed, 1 Dec 2021 18:43:15 +0000 (19:43 +0100)]
several corrections to test cases

4 years agoMerge pull request #1120 from triska/char_type_correction
Mark Thom [Tue, 30 Nov 2021 00:38:30 +0000 (19:38 -0500)]
Merge pull request #1120 from triska/char_type_correction

ENHANCED: Correct type error for char_type/2.

4 years agoENHANCED: Correct type error for char_type/2.
Markus Triska [Mon, 29 Nov 2021 18:32:55 +0000 (19:32 +0100)]
ENHANCED: Correct type error for char_type/2.

This addresses #905.

4 years agoMerge pull request #1116 from aarroyoc/fix-open-lis
Mark Thom [Sun, 28 Nov 2021 21:18:02 +0000 (16:18 -0500)]
Merge pull request #1116 from aarroyoc/fix-open-lis

Allow all kinds of string to be processed in open/4

4 years agoMerge pull request #1119 from mthom/expand_call_goals_as_call_goals
Mark Thom [Sun, 28 Nov 2021 21:16:47 +0000 (16:16 -0500)]
Merge pull request #1119 from mthom/expand_call_goals_as_call_goals

Expand call goals as call goals so that goals in control constructs are qualified properly

4 years agoexpand call goals as call goals (#1114) expand_call_goals_as_call_goals origin/expand_call_goals_as_call_goals
Mark Thom [Sun, 28 Nov 2021 17:27:50 +0000 (10:27 -0700)]
expand call goals as call goals (#1114)

4 years agoMerge pull request #1117 from triska/indicate_failed_initialization
Mark Thom [Sun, 28 Nov 2021 16:53:54 +0000 (11:53 -0500)]
Merge pull request #1117 from triska/indicate_failed_initialization

ENHANCED: indicate failed initialization/1 goal

4 years agoMerge pull request #1115 from triska/get_char_type_test
Mark Thom [Sun, 28 Nov 2021 16:53:15 +0000 (11:53 -0500)]
Merge pull request #1115 from triska/get_char_type_test

ENHANCED: Character type checks for get_char/[1,2].

4 years agoENHANCED: indicate failed initialization/1 goal
Markus Triska [Sun, 28 Nov 2021 13:47:25 +0000 (14:47 +0100)]
ENHANCED: indicate failed initialization/1 goal

This addresses #1109.

4 years agoFix use_module import errors
Adrián Arroyo Calle [Sun, 28 Nov 2021 12:20:09 +0000 (13:20 +0100)]
Fix use_module import errors

4 years agoAllow all kinds of string to be processed in open/4
Adrián Arroyo Calle [Sun, 28 Nov 2021 11:37:16 +0000 (12:37 +0100)]
Allow all kinds of string to be processed in open/4

4 years agoENHANCED: Character type checks for get_char/[1,2].
Markus Triska [Sun, 28 Nov 2021 09:49:40 +0000 (10:49 +0100)]
ENHANCED: Character type checks for get_char/[1,2].

This addresses #906.

4 years agoMerge pull request #1096 from aarroyoc/number_chars_fix
Mark Thom [Sun, 28 Nov 2021 03:37:30 +0000 (22:37 -0500)]
Merge pull request #1096 from aarroyoc/number_chars_fix

Prevents panic in some strange cases. Seen in #721

4 years agoMerge pull request #1112 from triska/underscores_in_integers
Mark Thom [Sun, 28 Nov 2021 01:29:49 +0000 (20:29 -0500)]
Merge pull request #1112 from triska/underscores_in_integers

ENHANCED: Support '_' followed by layout text sequence in integers.

4 years agoMerge pull request #1113 from triska/seq
Mark Thom [Sun, 28 Nov 2021 01:29:31 +0000 (20:29 -0500)]
Merge pull request #1113 from triska/seq

Use newly available seq//1 and ... //0 in several libraries

4 years agoMerge pull request #1111 from triska/fast_list_test
Mark Thom [Sun, 28 Nov 2021 01:29:17 +0000 (20:29 -0500)]
Merge pull request #1111 from triska/fast_list_test

Use '$skip_max_list'/4 for fast list tests in can_be/2 and must_be/2

4 years agouse seq//1
Markus Triska [Sat, 27 Nov 2021 15:20:24 +0000 (16:20 +0100)]
use seq//1

4 years agouse seq//1 and ... //0 which are now available in library(dcgs)
Markus Triska [Sat, 27 Nov 2021 15:19:16 +0000 (16:19 +0100)]
use seq//1 and ... //0 which are now available in library(dcgs)

4 years agouse seq//1
Markus Triska [Sat, 27 Nov 2021 15:17:45 +0000 (16:17 +0100)]
use seq//1

4 years agouse seq//1 which is now available in library(dcgs)
Markus Triska [Sat, 27 Nov 2021 15:17:15 +0000 (16:17 +0100)]
use seq//1 which is now available in library(dcgs)

4 years agoENHANCED: Support '_' followed by layout text sequence in integers.
Markus Triska [Sat, 27 Nov 2021 08:11:41 +0000 (09:11 +0100)]
ENHANCED: Support '_' followed by layout text sequence in integers.

This is handy for writing large integers, for example in cryptographic
applications.

This addresses #994.

Examples:

    ?- X = 1_000_000.
    %@    X = 1000000.

    ?- X = 1_
    000_
    000.
    %@    X = 1000000.

4 years agouse must_be(list, ...) earlier, since it is now faster
Markus Triska [Fri, 26 Nov 2021 16:11:51 +0000 (17:11 +0100)]
use must_be(list, ...) earlier, since it is now faster

4 years agoENHANCED: use '$skip_max_list'/4 for fast list tests in can_be/2 and must_be/2
Markus Triska [Fri, 26 Nov 2021 16:11:35 +0000 (17:11 +0100)]
ENHANCED: use '$skip_max_list'/4 for fast list tests in can_be/2 and must_be/2

This also (partially) addresses #1108.

4 years agoMerge pull request #1107 from triska/fast_chars_test
Mark Thom [Fri, 26 Nov 2021 00:01:03 +0000 (19:01 -0500)]
Merge pull request #1107 from triska/fast_chars_test

New type tests: must_be(chars, ...) and can_be(chars, ...)

4 years agouse newly available must_be(chars, ...) for fast string tests
Markus Triska [Mon, 22 Nov 2021 19:00:06 +0000 (20:00 +0100)]
use newly available must_be(chars, ...) for fast string tests

4 years agouse newly available must_be(chars, ...) for fast string tests
Markus Triska [Mon, 22 Nov 2021 18:58:36 +0000 (19:58 +0100)]
use newly available must_be(chars, ...) for fast string tests

4 years agoADDED: must_be(chars, ...) and can_be(chars, ...) for string tests.
Markus Triska [Mon, 22 Nov 2021 18:55:34 +0000 (19:55 +0100)]
ADDED: must_be(chars, ...) and can_be(chars, ...) for string tests.

Internal features of Scryer Prolog are used to make these tests fast.

4 years agoMerge pull request #1098 from triska/format_improvements
Mark Thom [Sun, 21 Nov 2021 20:28:32 +0000 (15:28 -0500)]
Merge pull request #1098 from triska/format_improvements

Various smaller improvements to library(format)

4 years agoMerge pull request #1099 from aarroyoc/uninstantiation_error-missing
Mark Thom [Sun, 21 Nov 2021 20:27:38 +0000 (15:27 -0500)]
Merge pull request #1099 from aarroyoc/uninstantiation_error-missing

Fix uninstantiation_error missing. Fix #1031

4 years agoMerge pull request #1100 from aarroyoc/phrase-to-file-options
Mark Thom [Sun, 21 Nov 2021 20:27:17 +0000 (15:27 -0500)]
Merge pull request #1100 from aarroyoc/phrase-to-file-options

Add phrase_to_file/3 (phrase_to_file with Options)

4 years agoMerge pull request #1102 from triska/meta_predicate_corrections
Mark Thom [Sun, 21 Nov 2021 20:27:03 +0000 (15:27 -0500)]
Merge pull request #1102 from triska/meta_predicate_corrections

Meta predicate corrections

4 years agouse round brackets for meta_predicate/1 declaration
Markus Triska [Sat, 20 Nov 2021 21:43:53 +0000 (22:43 +0100)]
use round brackets for meta_predicate/1 declaration

4 years agoFIXED: meta_predicate/1 declaration of cond_t/3.
Markus Triska [Sat, 20 Nov 2021 21:43:33 +0000 (22:43 +0100)]
FIXED: meta_predicate/1 declaration of cond_t/3.

4 years agoFIXED: meta_predicate/1 declaration of (',')/3 and (;)/3.
Markus Triska [Sat, 20 Nov 2021 21:43:07 +0000 (22:43 +0100)]
FIXED: meta_predicate/1 declaration of (',')/3 and (;)/3.

4 years agoFIXED: meta_predicate/1 declaration for tfilter/3.
Markus Triska [Sat, 20 Nov 2021 21:39:38 +0000 (22:39 +0100)]
FIXED: meta_predicate/1 declaration for tfilter/3.

4 years agoFIXED: meta_predicate/1 declaration for tmember_t/3.
Markus Triska [Sat, 20 Nov 2021 21:38:27 +0000 (22:38 +0100)]
FIXED: meta_predicate/1 declaration for tmember_t/3.

4 years agoFIXED: meta_predicate/1 declaration for tmember/2.
Markus Triska [Sat, 20 Nov 2021 21:37:59 +0000 (22:37 +0100)]
FIXED: meta_predicate/1 declaration for tmember/2.

4 years agoFIXED: meta_predicate/1 declaration for tpartition/4.
Markus Triska [Sat, 20 Nov 2021 21:37:31 +0000 (22:37 +0100)]
FIXED: meta_predicate/1 declaration for tpartition/4.

This addresses #1101.

4 years agomention phrase_to_file/3 which is being prepared in #1100
Markus Triska [Wed, 17 Nov 2021 20:33:15 +0000 (21:33 +0100)]
mention phrase_to_file/3 which is being prepared in #1100

4 years ago'f' --> f
Markus Triska [Tue, 16 Nov 2021 22:45:45 +0000 (23:45 +0100)]
'f' --> f

4 years agobetter layout
Markus Triska [Tue, 16 Nov 2021 17:41:43 +0000 (18:41 +0100)]
better layout

4 years agouse newly available seq//1 from library(dcgs)
Markus Triska [Tue, 16 Nov 2021 17:31:18 +0000 (18:31 +0100)]
use newly available seq//1 from library(dcgs)

I am using seq(Ls) instead of plain Ls so that DCGs can be debugged
declaratively, by generalizing away nonterminals in rules.

4 years agoFix mistake in phrase_to_file/2 definition
Adrián Arroyo Calle [Wed, 17 Nov 2021 07:36:39 +0000 (08:36 +0100)]
Fix mistake in phrase_to_file/2 definition

4 years agoAdd phrase_to_file/3 (phrase_to_file with Options)
Adrián Arroyo Calle [Tue, 16 Nov 2021 22:54:04 +0000 (23:54 +0100)]
Add phrase_to_file/3 (phrase_to_file with Options)

4 years agoFix uninstantiation_error missing. Fix #1031
Adrián Arroyo Calle [Tue, 16 Nov 2021 22:22:24 +0000 (23:22 +0100)]
Fix uninstantiation_error missing. Fix #1031

4 years agomore elegant solution for parsing numeric arguments, using a DCG
Markus Triska [Tue, 16 Nov 2021 17:25:35 +0000 (18:25 +0100)]
more elegant solution for parsing numeric arguments, using a DCG

4 years agomention the format("~s", [Ls]) pattern and new library(pio) predicates
Markus Triska [Tue, 16 Nov 2021 17:20:58 +0000 (18:20 +0100)]
mention the format("~s", [Ls]) pattern and new library(pio) predicates

4 years agoPrevents panic in some strange cases. Seen in #721
Adrián Arroyo Calle [Sun, 14 Nov 2021 23:17:40 +0000 (00:17 +0100)]
Prevents panic in some strange cases. Seen in #721

4 years agoMerge pull request #1082 from pmoura/fix_format_predicates_missing_numbervars_option_...
Mark Thom [Sat, 13 Nov 2021 05:05:26 +0000 (00:05 -0500)]
Merge pull request #1082 from pmoura/fix_format_predicates_missing_numbervars_option_on_w_and_q_formats

Fix the format/2-3 predicates missing the numbervars(true) option in the ~w and ~q formats

4 years agoMerge pull request #1087 from Skgland/fix_beta_check
Mark Thom [Sat, 13 Nov 2021 05:04:51 +0000 (00:04 -0500)]
Merge pull request #1087 from Skgland/fix_beta_check

fix failing lint warnings in beta build

4 years agoMerge pull request #1078 from triska/pio_improvements
Mark Thom [Sat, 13 Nov 2021 05:03:57 +0000 (00:03 -0500)]
Merge pull request #1078 from triska/pio_improvements

Various improvements for pure output

4 years agoMerge pull request #1086 from Skgland/pass_-f_flag_in_cargo_test
Mark Thom [Sat, 13 Nov 2021 05:03:38 +0000 (00:03 -0500)]
Merge pull request #1086 from Skgland/pass_-f_flag_in_cargo_test

pass -f to scryer-prolog in cargo test so that we ignore .scryerrc

4 years agoMerge pull request #1088 from triska/call_nth_metapredicate
Mark Thom [Sat, 13 Nov 2021 05:03:26 +0000 (00:03 -0500)]
Merge pull request #1088 from triska/call_nth_metapredicate

FIXED: meta_predicate/1 directive for call_nth/2.

4 years agoremove unused fields instead, prompting more dead_code removal
Skgland [Thu, 11 Nov 2021 18:32:35 +0000 (19:32 +0100)]
remove unused fields instead, prompting more dead_code removal

4 years agouse functional notation for all meta_predicate/1 directives
Markus Triska [Thu, 11 Nov 2021 18:29:32 +0000 (19:29 +0100)]
use functional notation for all meta_predicate/1 directives

4 years agoFIXED: meta_predicate/1 directive for call_nth/2.
Markus Triska [Thu, 11 Nov 2021 18:26:27 +0000 (19:26 +0100)]
FIXED: meta_predicate/1 directive for call_nth/2.

This addresses #1021.

4 years agofix failing lint warnings in beta build
Skgland [Thu, 11 Nov 2021 17:53:08 +0000 (18:53 +0100)]
fix failing lint warnings in beta build

4 years agopass -f to scryer-prolog in cargo test so that we ignore .scryerrc
Skgland [Thu, 11 Nov 2021 10:36:54 +0000 (11:36 +0100)]
pass -f to scryer-prolog in cargo test so that we ignore .scryerrc

fixes issue #1085

4 years agoFix the format/2-3 predicates missing the numbervars(true) option in the ~w and ...
Paulo Moura [Mon, 8 Nov 2021 22:00:02 +0000 (22:00 +0000)]
Fix the format/2-3 predicates missing the numbervars(true) option in the ~w and ~q formats

4 years agoFIXED: instantiation errors for alias(Var) in open/4 options
Markus Triska [Mon, 8 Nov 2021 21:41:04 +0000 (22:41 +0100)]
FIXED: instantiation errors for alias(Var) in open/4 options

This addresses #1030.

4 years agoFIXED: instantiation errors for type(Var) in open/4 options
Markus Triska [Mon, 8 Nov 2021 21:10:14 +0000 (22:10 +0100)]
FIXED: instantiation errors for type(Var) in open/4 options

This addresses #1030.

4 years agoadd motivation and comments about library(pio) predicates
Markus Triska [Mon, 8 Nov 2021 20:48:50 +0000 (21:48 +0100)]
add motivation and comments about library(pio) predicates

4 years agouse newly available library predicate read_n_chars/3
Markus Triska [Mon, 8 Nov 2021 20:43:45 +0000 (21:43 +0100)]
use newly available library predicate read_n_chars/3

4 years agomention pure output predicates in the README
Markus Triska [Mon, 8 Nov 2021 19:29:39 +0000 (20:29 +0100)]
mention pure output predicates in the README

4 years agoADDED: library(format): DCG nonterminal portray_clause_//1, in analogy to format_//2.
Markus Triska [Sun, 7 Nov 2021 16:11:00 +0000 (17:11 +0100)]
ADDED: library(format): DCG nonterminal portray_clause_//1, in analogy to format_//2.

4 years agoexpress format/3 and portray_clause/2 in terms of phrase_to_stream/2
Markus Triska [Sun, 7 Nov 2021 16:06:56 +0000 (17:06 +0100)]
express format/3 and portray_clause/2 in terms of phrase_to_stream/2

4 years agoADDED: phrase_to_stream/2, writing a list of characters to a stream.
Markus Triska [Sun, 7 Nov 2021 16:02:41 +0000 (17:02 +0100)]
ADDED: phrase_to_stream/2, writing a list of characters to a stream.