]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
4 years agoimprove '$skip_max_list'/4 and length/2 (#1023, #110)
Mark Thom [Sat, 29 Jan 2022 07:57:39 +0000 (00:57 -0700)]
improve '$skip_max_list'/4 and length/2 (#1023, #110)

4 years agoinline store & deref calls in '' (#1176)
Mark Thom [Thu, 27 Jan 2022 06:03:19 +0000 (23:03 -0700)]
inline store & deref calls in '' (#1176)

4 years agouse expand_goal directly for existential-qualified goals in all-solutions predicates...
Mark Thom [Thu, 27 Jan 2022 00:34:36 +0000 (17:34 -0700)]
use expand_goal directly for existential-qualified goals in all-solutions predicates (#1246)

4 years agodon't read into the heap while incrementing self.s (#1233, #1245)
Mark Thom [Tue, 25 Jan 2022 01:47:53 +0000 (18:47 -0700)]
don't read into the heap while incrementing self.s (#1233, #1245)

4 years agolazily throw exceptions of dcg_body from goal-expanded phrase/{2,3} (#1244)
Mark Thom [Sat, 22 Jan 2022 19:22:50 +0000 (12:22 -0700)]
lazily throw exceptions of dcg_body from goal-expanded phrase/{2,3} (#1244)

4 years agorecognize []/N as callable (#1241, #989)
Mark Thom [Fri, 21 Jan 2022 06:46:03 +0000 (23:46 -0700)]
recognize []/N as callable (#1241, #989)

4 years agoexpand phrase/{2,3} using dcg_body whenever possible
Mark Thom [Fri, 21 Jan 2022 06:32:08 +0000 (23:32 -0700)]
expand phrase/{2,3} using dcg_body whenever possible

4 years agomodule-qualify callables more liberally but not for built-ins (#1243)
Mark Thom [Fri, 21 Jan 2022 00:40:45 +0000 (17:40 -0700)]
module-qualify callables more liberally but not for built-ins (#1243)

4 years agodereference car of Lis in HeapPStRIter::step (#1238)
Mark Thom [Thu, 20 Jan 2022 03:51:23 +0000 (20:51 -0700)]
dereference car of Lis in HeapPStRIter::step (#1238)

4 years agothrow errors from phrase/{2,3} where expected (#1220)
Mark Thom [Thu, 20 Jan 2022 03:19:47 +0000 (20:19 -0700)]
throw errors from phrase/{2,3} where expected (#1220)

4 years agostreamline and fix phrase/{2,3} (#1237)
Mark Thom [Thu, 20 Jan 2022 03:07:15 +0000 (20:07 -0700)]
streamline and fix phrase/{2,3} (#1237)

4 years agoMerge pull request #1236 from triska/omit-module-prefix
Mark Thom [Thu, 20 Jan 2022 00:22:44 +0000 (17:22 -0700)]
Merge pull request #1236 from triska/omit-module-prefix

omit module prefix, because the goals are already module-qualified

4 years agoomit module prefix, because the goals are already module-qualified
Markus Triska [Wed, 19 Jan 2022 23:48:30 +0000 (00:48 +0100)]
omit module prefix, because the goals are already module-qualified

4 years agoMerge pull request #1235 from triska/better-initialization-warning
Mark Thom [Wed, 19 Jan 2022 23:41:43 +0000 (16:41 -0700)]
Merge pull request #1235 from triska/better-initialization-warning

ENHANCED: more specific warning when initialization/1 fails (#1149)

4 years agoENHANCED: more specific warning when initialization/1 fails (#1149)
Markus Triska [Wed, 19 Jan 2022 22:31:55 +0000 (23:31 +0100)]
ENHANCED: more specific warning when initialization/1 fails (#1149)

4 years agoMerge pull request #1234 from aarroyoc/ctrld
Mark Thom [Wed, 19 Jan 2022 04:34:30 +0000 (21:34 -0700)]
Merge pull request #1234 from aarroyoc/ctrld

Fix Ctrl-D in toplevel

4 years agoprint -0.0 as 0.0 (#1164)
Mark Thom [Wed, 19 Jan 2022 04:31:14 +0000 (21:31 -0700)]
print -0.0 as 0.0 (#1164)

4 years agothrow error instead of overwriting builtin export (#1225)
Mark Thom [Wed, 19 Jan 2022 02:16:14 +0000 (19:16 -0700)]
throw error instead of overwriting builtin export (#1225)

4 years agoremove number/3 from arithmetic.pl (#1170)
Mark Thom [Wed, 19 Jan 2022 00:38:45 +0000 (17:38 -0700)]
remove number/3 from arithmetic.pl (#1170)

4 years agoFix Ctrl-D (#1168)
Adrián Arroyo Calle [Tue, 18 Jan 2022 18:27:27 +0000 (19:27 +0100)]
Fix Ctrl-D (#1168)

4 years agofix floor for f64 (#1223)
Mark Thom [Tue, 18 Jan 2022 05:04:10 +0000 (22:04 -0700)]
fix floor for f64 (#1223)

4 years agoinclude library(error) in toplevel.pl (#1226)
Mark Thom [Tue, 18 Jan 2022 04:53:52 +0000 (21:53 -0700)]
include library(error) in toplevel.pl (#1226)

4 years agoclear alias in close before resetting the stream to null (#1231)
Mark Thom [Tue, 18 Jan 2022 00:58:09 +0000 (17:58 -0700)]
clear alias in close before resetting the stream to null (#1231)

4 years agoMerge pull request #1232 from triska/toplevel_read_from_chars
Mark Thom [Tue, 18 Jan 2022 00:44:58 +0000 (17:44 -0700)]
Merge pull request #1232 from triska/toplevel_read_from_chars

FIXED: toplevel to use (newly renamed) read_from_chars/2

4 years agoFIXED: toplevel to use (newly renamed) read_from_chars/2
Markus Triska [Tue, 18 Jan 2022 00:12:47 +0000 (01:12 +0100)]
FIXED: toplevel to use (newly renamed) read_from_chars/2

4 years agoMerge pull request #1228 from triska/charsio-read-renames
Mark Thom [Tue, 18 Jan 2022 00:03:46 +0000 (17:03 -0700)]
Merge pull request #1228 from triska/charsio-read-renames

MODIFIED: Rename two predicates in library(charsio)

4 years agoMerge pull request #1229 from triska/faster_decryption
Mark Thom [Tue, 18 Jan 2022 00:03:29 +0000 (17:03 -0700)]
Merge pull request #1229 from triska/faster_decryption

ENHANCED: library(crypto): Retain a compact internal representation of the ciphertext throughout decryption.

4 years agoENHANCED: library(crypto): Retain a compact internal representation of the ciphertext...
Markus Triska [Mon, 17 Jan 2022 21:00:50 +0000 (22:00 +0100)]
ENHANCED: library(crypto): Retain a compact internal representation of the ciphertext throughout decryption.

This allows efficient decryption also of very large files and long
strings.

It is usually highly advisable to stick to common and portable library
predicates such as append/3. However, since append/3 does not yet
recognize this opportunity for improvement, I apply it manually in
this case, so that also very large files can be efficiently decrypted
using the compact internal string representation.

Without this change, decrypting a 1 GB file takes 48 GB of RAM,
whereas with this change, it only takes 2 GB (one for the string, one
for its copy with the appended tag).

4 years agoMODIFIED: library(charsio): read_n_chars/3 is now called get_n_chars/3
Markus Triska [Mon, 17 Jan 2022 19:36:51 +0000 (20:36 +0100)]
MODIFIED: library(charsio): read_n_chars/3 is now called get_n_chars/3

This is because "read" is associated with general Prolog terms.

4 years agoMODIFIED: library(charsio): read_term_from_chars/2 is now called read_from_chars/2
Markus Triska [Mon, 17 Jan 2022 19:09:50 +0000 (20:09 +0100)]
MODIFIED: library(charsio): read_term_from_chars/2 is now called read_from_chars/2

This is for compatibility with SICStus Prolog and GNU Prolog.

4 years agodereference second argument of '/2
Mark Thom [Mon, 17 Jan 2022 07:00:23 +0000 (00:00 -0700)]
dereference second argument of '/2

4 years agoMerge pull request #1224 from triska/working_directory
Mark Thom [Sun, 16 Jan 2022 22:46:11 +0000 (15:46 -0700)]
Merge pull request #1224 from triska/working_directory

correct reference to '$working_directory'/2

4 years agocorrect reference to '$working_directory'/2
Markus Triska [Sun, 16 Jan 2022 22:20:43 +0000 (23:20 +0100)]
correct reference to '$working_directory'/2

4 years agoMerge pull request #1222 from triska/retain_string_of_nil
Mark Thom [Sun, 16 Jan 2022 18:58:15 +0000 (11:58 -0700)]
Merge pull request #1222 from triska/retain_string_of_nil

retain the string "[]" as is, instead of converting it to '[]' (i.e., "")

4 years agoretain the string "[]" as is, instead of converting it to '[]' (i.e., "")
Markus Triska [Sun, 16 Jan 2022 16:49:13 +0000 (17:49 +0100)]
retain the string "[]" as is, instead of converting it to '[]' (i.e., "")

This addresses #1215.

4 years agodeduplicate but do not sort anonymous variables in toplevel (#1196)
Mark Thom [Sat, 15 Jan 2022 18:03:41 +0000 (11:03 -0700)]
deduplicate but do not sort anonymous variables in toplevel (#1196)

4 years agoadd missing cases to retract_clause (#1214)
Mark Thom [Sat, 15 Jan 2022 07:51:38 +0000 (00:51 -0700)]
add missing cases to retract_clause (#1214)

4 years agoallow late dynamic declaration for predicates (#1205)
Mark Thom [Fri, 14 Jan 2022 03:30:29 +0000 (20:30 -0700)]
allow late dynamic declaration for predicates (#1205)

4 years agoput_complete_string should push the empty list to the heap for empty strings (#1209)
Mark Thom [Fri, 14 Jan 2022 02:43:54 +0000 (19:43 -0700)]
put_complete_string should push the empty list to the heap for empty strings (#1209)

4 years agofix off-by-one error in DynamicIndexedChoice (#1210)
Mark Thom [Fri, 14 Jan 2022 01:06:44 +0000 (18:06 -0700)]
fix off-by-one error in DynamicIndexedChoice (#1210)

4 years agofix syntax regressions (#1198, #1164)
Mark Thom [Thu, 13 Jan 2022 06:55:40 +0000 (23:55 -0700)]
fix syntax regressions (#1198, #1164)

4 years agowrite plaintext and ciphertext directly to atoms (#1193)
Mark Thom [Thu, 13 Jan 2022 05:11:59 +0000 (22:11 -0700)]
write plaintext and ciphertext directly to atoms (#1193)

4 years agodelimit partial strings around \x0\
Mark Thom [Thu, 13 Jan 2022 05:10:59 +0000 (22:10 -0700)]
delimit partial strings around \x0\

4 years agoserialize call_0 test (#1206)
Mark Thom [Wed, 12 Jan 2022 23:57:12 +0000 (16:57 -0700)]
serialize call_0 test (#1206)

4 years agoMerge pull request #1207 from triska/semi-deterministic
Mark Thom [Wed, 12 Jan 2022 22:30:24 +0000 (15:30 -0700)]
Merge pull request #1207 from triska/semi-deterministic

deterministic --> semi-deterministic

4 years agodeterministic --> semi-deterministic
Markus Triska [Wed, 12 Jan 2022 20:58:23 +0000 (21:58 +0100)]
deterministic --> semi-deterministic

4 years agoMerge pull request #1199 from Skgland/do_not_gen_in_src
Mark Thom [Wed, 12 Jan 2022 06:01:59 +0000 (23:01 -0700)]
Merge pull request #1199 from Skgland/do_not_gen_in_src

Generate into $OUT_DIR instead of src/

4 years agoMerge pull request #1195 from triska/rebis-dev-format-U
Mark Thom [Wed, 12 Jan 2022 05:49:38 +0000 (22:49 -0700)]
Merge pull request #1195 from triska/rebis-dev-format-U

ADDED: format specifier ~NU, using underscores to separate groups of digits

4 years agoevaluate floats referenced from the heap by tagged pointers (#1203)
Mark Thom [Wed, 12 Jan 2022 01:42:01 +0000 (18:42 -0700)]
evaluate floats referenced from the heap by tagged pointers (#1203)

4 years agoexecute trust instead of retry at the end of dynamic choice blocks (#1204, #1173)
Mark Thom [Wed, 12 Jan 2022 01:24:26 +0000 (18:24 -0700)]
execute trust instead of retry at the end of dynamic choice blocks (#1204, #1173)

4 years agorecognize characters as separate from atoms in ''/7 (#1192)
Mark Thom [Tue, 11 Jan 2022 04:18:11 +0000 (21:18 -0700)]
recognize characters as separate from atoms in ''/7 (#1192)

4 years agorender [] as empty string in AtomOrString::as_str() (#1193)
Mark Thom [Tue, 11 Jan 2022 03:46:00 +0000 (20:46 -0700)]
render [] as empty string in AtomOrString::as_str() (#1193)

4 years agoimprove between_/3 implementation (#1186, #1191)
Mark Thom [Tue, 11 Jan 2022 01:34:25 +0000 (18:34 -0700)]
improve between_/3 implementation (#1186, #1191)

4 years agoimitate Rc-style equality for TypedArenaPtr (#1190)
Mark Thom [Tue, 11 Jan 2022 01:25:30 +0000 (18:25 -0700)]
imitate Rc-style equality for TypedArenaPtr (#1190)

4 years agocorrectly print [] functors (#1189)
Mark Thom [Tue, 11 Jan 2022 00:26:57 +0000 (17:26 -0700)]
correctly print [] functors (#1189)

4 years agoonly rerun build.rs when something in src/ has changed
Skgland [Mon, 10 Jan 2022 18:59:56 +0000 (19:59 +0100)]
only rerun build.rs when something in src/ has changed

by default (when no rerun-if is emitted) build.rs is rerun if something in the package changes

4 years agodon't genrate code in src/
Skgland [Mon, 10 Jan 2022 18:59:21 +0000 (19:59 +0100)]
don't genrate code in src/

[Outputs of Build Script](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script) states that only files in $OUT_DIR may be modified

4 years agoADDED: format specifier ~NL to limit the number of digits per line
Markus Triska [Mon, 10 Jan 2022 16:29:45 +0000 (17:29 +0100)]
ADDED: format specifier ~NL to limit the number of digits per line

Example:

    %?- format("~65L", [2^1000]).
    %@ 10715086071862673209484250490600018105614048117055336074437503883_
    %@ 70351051124936122493198378815695858127594672917553146825187145285_
    %@ 69231404359845775746985748039345677748242309854210746050623711418_
    %@ 77954182153046474983581941267398767559165543946077062914571196477_
    %@ 686542167660429831652624386837205668069376   true.

4 years agoADDED: format specifier ~NU, using underscores to separate groups of digits
Markus Triska [Mon, 10 Jan 2022 15:07:05 +0000 (16:07 +0100)]
ADDED: format specifier ~NU, using underscores to separate groups of digits

Example:

    ?- format("~2U", [10^12]).
    %@ 10_000_000_000.00   true.

4 years agocompare bigints by value not by pointer (#1183)
Mark Thom [Mon, 10 Jan 2022 01:48:32 +0000 (18:48 -0700)]
compare bigints by value not by pointer (#1183)

4 years agoMerge pull request #1160 from aarroyoc/add-ugraphs-library
Mark Thom [Sun, 9 Jan 2022 19:43:46 +0000 (12:43 -0700)]
Merge pull request #1160 from aarroyoc/add-ugraphs-library

Add ugraphs library (ported from SWI)

4 years agoMerge pull request #1182 from aarroyoc/sockets-arity
Mark Thom [Sun, 9 Jan 2022 19:24:39 +0000 (12:24 -0700)]
Merge pull request #1182 from aarroyoc/sockets-arity

fix socket_client_open/3

4 years agoremove TLS option in socket_client_open/3
Adrián Arroyo Calle [Sun, 9 Jan 2022 16:04:54 +0000 (17:04 +0100)]
remove TLS option in socket_client_open/3

4 years agofix socket_client_open/3
Adrián Arroyo Calle [Sat, 8 Jan 2022 22:31:32 +0000 (23:31 +0100)]
fix socket_client_open/3

4 years agocorrect heap offsets in setup_call_cleanup tests
Mark Thom [Sat, 8 Jan 2022 19:50:09 +0000 (12:50 -0700)]
correct heap offsets in setup_call_cleanup tests

4 years agounify current time as a complete string, not an atom (#1175)
Mark Thom [Sat, 8 Jan 2022 18:47:35 +0000 (11:47 -0700)]
unify current time as a complete string, not an atom (#1175)

4 years agocorrect read/2 arity to 2 (#1171)
Mark Thom [Sat, 8 Jan 2022 07:19:17 +0000 (00:19 -0700)]
correct read/2 arity to 2 (#1171)

4 years agocomplete handling of control operators in interpreted (,)/2 (#1172)
Mark Thom [Sat, 8 Jan 2022 07:04:04 +0000 (00:04 -0700)]
complete handling of control operators in interpreted (,)/2 (#1172)

4 years agoMinor fixes
Adrián Arroyo Calle [Fri, 7 Jan 2022 18:28:07 +0000 (19:28 +0100)]
Minor fixes

4 years agoMerge remote-tracking branch 'upstream/rebis-dev' into add-ugraphs-library
Adrián Arroyo Calle [Fri, 7 Jan 2022 18:14:34 +0000 (19:14 +0100)]
Merge remote-tracking branch 'upstream/rebis-dev' into add-ugraphs-library

4 years agoadd version dependency information to README
Mark Thom [Fri, 7 Jan 2022 14:52:14 +0000 (07:52 -0700)]
add version dependency information to README

4 years agoupdate README.md
Mark Thom [Fri, 7 Jan 2022 05:18:46 +0000 (22:18 -0700)]
update README.md

4 years agoadd parser tests
Mark Thom [Fri, 7 Jan 2022 04:29:15 +0000 (21:29 -0700)]
add parser tests

4 years agoflatten the instruction dispatch loop
Mark Thom [Mon, 20 Dec 2021 01:57:57 +0000 (18:57 -0700)]
flatten the instruction dispatch loop

4 years agorelocate most instruction routines from MachineState to Machine
Mark Thom [Sat, 18 Dec 2021 05:02:20 +0000 (22:02 -0700)]
relocate most instruction routines from MachineState to Machine

4 years agoremove LocalCodePtr::IndexingBuf
Mark Thom [Thu, 16 Dec 2021 06:41:00 +0000 (23:41 -0700)]
remove LocalCodePtr::IndexingBuf

4 years agomodule-qualify incomplete goals in expand_goal/3
Mark Thom [Sun, 12 Dec 2021 17:58:42 +0000 (10:58 -0700)]
module-qualify incomplete goals in expand_goal/3

4 years agodereference first argument of (is)/2
Mark Thom [Sun, 12 Dec 2021 06:36:19 +0000 (23:36 -0700)]
dereference first argument of (is)/2

4 years agogenerate heap_loc cells to refer to 0-arity atoms in read.rs
Mark Thom [Sun, 12 Dec 2021 04:51:45 +0000 (21:51 -0700)]
generate heap_loc cells to refer to 0-arity atoms in read.rs

4 years agofix unify_float
Mark Thom [Sat, 11 Dec 2021 23:29:26 +0000 (16:29 -0700)]
fix unify_float

4 years agodereference variables when looking for string terminators
Mark Thom [Sat, 11 Dec 2021 00:16:15 +0000 (17:16 -0700)]
dereference variables when looking for string terminators

4 years agoproperly iterate over read terms in MachineState::read_term
Mark Thom [Fri, 10 Dec 2021 17:10:00 +0000 (10:10 -0700)]
properly iterate over read terms in MachineState::read_term

4 years agoget test suite working
Mark Thom [Fri, 10 Dec 2021 06:23:03 +0000 (23:23 -0700)]
get test suite working

4 years agofix printing of CStr's
Mark Thom [Fri, 10 Dec 2021 01:15:52 +0000 (18:15 -0700)]
fix printing of CStr's

4 years agoremove skeletons from replaced modules
Mark Thom [Thu, 9 Dec 2021 06:20:08 +0000 (23:20 -0700)]
remove skeletons from replaced modules

4 years agouse heap_loc to refer to 0-arity atom instead of str_loc
Mark Thom [Wed, 8 Dec 2021 05:26:46 +0000 (22:26 -0700)]
use heap_loc to refer to 0-arity atom instead of str_loc

4 years agodefer installation of inference counter for call_with_inference_limit til after goals...
Mark Thom [Tue, 7 Dec 2021 01:08:38 +0000 (18:08 -0700)]
defer installation of inference counter for call_with_inference_limit til after goals expanded

4 years agofix bugs revealed by src/tests/builtins.pl
Mark Thom [Sun, 5 Dec 2021 06:46:31 +0000 (23:46 -0700)]
fix bugs revealed by src/tests/builtins.pl

4 years agostart to retune testing infrastructure
Mark Thom [Sat, 4 Dec 2021 23:24:34 +0000 (16:24 -0700)]
start to retune testing infrastructure

4 years agofix off by one bug in system_calls
Mark Thom [Sat, 4 Dec 2021 23:24:06 +0000 (16:24 -0700)]
fix off by one bug in system_calls

4 years agofix bug in error_form
Mark Thom [Sat, 4 Dec 2021 04:18:13 +0000 (21:18 -0700)]
fix bug in error_form

4 years agofix various partial string bugs (copying using them in arg/3)
Mark Thom [Wed, 1 Dec 2021 05:35:38 +0000 (22:35 -0700)]
fix various partial string bugs (copying using them in arg/3)

4 years agodetect attributed variables by properly detecting them in copy_term/2
Mark Thom [Tue, 30 Nov 2021 02:22:26 +0000 (19:22 -0700)]
detect attributed variables by properly detecting them in copy_term/2

4 years agoupgrade rustyline
Mark Thom [Mon, 29 Nov 2021 03:36:09 +0000 (20:36 -0700)]
upgrade rustyline

4 years agodon't allow [] as a stream alias, restore domain error on source sink for open/{3,4}
Mark Thom [Sun, 28 Nov 2021 21:53:39 +0000 (14:53 -0700)]
don't allow [] as a stream alias, restore domain error on source sink for open/{3,4}

4 years agokeep cursor position after writing to byte stream
Mark Thom [Sun, 28 Nov 2021 17:21:07 +0000 (10:21 -0700)]
keep cursor position after writing to byte stream

4 years agofix stream errors
Mark Thom [Sat, 27 Nov 2021 05:13:52 +0000 (22:13 -0700)]
fix stream errors

4 years agobreak from loop upon successful peek in peek_char/1 and peek_code/1
Mark Thom [Fri, 26 Nov 2021 06:08:02 +0000 (23:08 -0700)]
break from loop upon successful peek in peek_char/1 and peek_code/1

4 years agobreak from loop in get_code upon successful character read
Mark Thom [Thu, 25 Nov 2021 06:13:14 +0000 (23:13 -0700)]
break from loop in get_code upon successful character read

4 years agothrow instantiation error if Arity is a variable in abolish/1
Mark Thom [Thu, 25 Nov 2021 02:11:14 +0000 (19:11 -0700)]
throw instantiation error if Arity is a variable in abolish/1