]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sun, 19 Apr 2020 18:58:54 +0000 (12:58 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agothrow '' whenever an interrupt is made (#365, #366)
Mark Thom [Sun, 19 Apr 2020 18:58:44 +0000 (12:58 -0600)]
throw '' whenever an interrupt is made (#365, #366)

6 years agoMerge pull request #364 from triska/master
Mark Thom [Sun, 19 Apr 2020 01:54:17 +0000 (22:54 -0300)]
Merge pull request #364 from triska/master

Documentation addition, and correction of error term

6 years agoRestore the type_error, which was implemented correctly by @notoria.
Markus Triska [Sun, 19 Apr 2020 00:12:01 +0000 (02:12 +0200)]
Restore the type_error, which was implemented correctly by @notoria.

This corrects f28e87b2401960e3b31bea114318e2b3ef1616d3:
in_character is a valid type by 7.12.2 Error classification!

6 years agodocument ~| format modifier to place a tab stop at this position
Markus Triska [Sat, 18 Apr 2020 23:59:16 +0000 (01:59 +0200)]
document ~| format modifier to place a tab stop at this position

This works best when used in tandem with ~N+, since it is currently
equivalent to ~0| and does not take the actual text position into account.
However, when using relative positions, this works as intended.

6 years agoMerge pull request #363 from triska/master
Mark Thom [Sat, 18 Apr 2020 23:37:32 +0000 (20:37 -0300)]
Merge pull request #363 from triska/master

Delay toplevel output until after the goal succeeds

6 years agoremove SCCCutPolicy panic, revise (;)/2 so that comma'ed cuts are handled properly...
Mark Thom [Sun, 19 Apr 2020 02:10:53 +0000 (20:10 -0600)]
remove SCCCutPolicy panic, revise (;)/2 so that comma'ed cuts are handled properly (#361)

6 years agodrop $ naming convention inside '' when unnecessary
Mark Thom [Sun, 19 Apr 2020 02:06:52 +0000 (20:06 -0600)]
drop $ naming convention inside '' when unnecessary

6 years agouse correct signs in fixnum remainders
Mark Thom [Sat, 18 Apr 2020 23:37:54 +0000 (17:37 -0600)]
use correct signs in fixnum remainders

6 years agouse the most recent improvements
Markus Triska [Sat, 18 Apr 2020 23:30:56 +0000 (01:30 +0200)]
use the most recent improvements

6 years agoENHANCED: Delay toplevel output until after the goal succeeds.
Markus Triska [Sat, 18 Apr 2020 23:28:50 +0000 (01:28 +0200)]
ENHANCED: Delay toplevel output until after the goal succeeds.

This is to accommodate goals that are used for their side-effects,
when we are interested in their output.

Examples:

    ?- portray_clause((a :- a)).
    a :-
            a.
       true
    ;  false.

    ?- format("hello~w~n", [!]).
    hello!
       true
    ;  false.

6 years agoadd domain and type errors for compare/3 (#296)
Mark Thom [Sat, 18 Apr 2020 20:37:14 +0000 (14:37 -0600)]
add domain and type errors for compare/3 (#296)

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Sat, 18 Apr 2020 20:17:13 +0000 (14:17 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoreintroduce "n" as a synonym for ";" and " "
Markus Triska [Sat, 18 Apr 2020 16:08:08 +0000 (18:08 +0200)]
reintroduce "n" as a synonym for ";" and " "

6 years agoENHANCED: the toplevel interaction now supports RETURN as a synonym for "."
Markus Triska [Sat, 18 Apr 2020 15:47:24 +0000 (17:47 +0200)]
ENHANCED: the toplevel interaction now supports RETURN as a synonym for "."

This is made possible due to the recent improvements by @notoria.

6 years agosmall simplifications
Markus Triska [Sat, 18 Apr 2020 15:40:19 +0000 (17:40 +0200)]
small simplifications

6 years agoRemoved a check in get_single_char
notoria [Sat, 18 Apr 2020 16:28:26 +0000 (18:28 +0200)]
Removed a check in get_single_char

6 years agoAdded Space for continuation
notoria [Sat, 18 Apr 2020 14:57:45 +0000 (16:57 +0200)]
Added Space for continuation

6 years agoFixed the predicate name when error is thrown
notoria [Sat, 18 Apr 2020 13:21:19 +0000 (15:21 +0200)]
Fixed the predicate name when error is thrown

6 years agoinstead of a type error, use a domain error
Markus Triska [Sat, 18 Apr 2020 12:38:03 +0000 (14:38 +0200)]
instead of a type error, use a domain error

The preceding use of atom_length/2 already ensures that C has the
correct type (i.e., atom). However, its domain may still be wrong,
if its length is greater than 1.

6 years agouse get_single_char/1
Markus Triska [Sat, 18 Apr 2020 12:33:11 +0000 (14:33 +0200)]
use get_single_char/1

6 years agoRemoved $raw_input_read_char
notoria [Sat, 18 Apr 2020 11:54:18 +0000 (13:54 +0200)]
Removed $raw_input_read_char

6 years agoget_single_char reads Tab as \t
notoria [Sat, 18 Apr 2020 11:33:42 +0000 (13:33 +0200)]
get_single_char reads Tab as \t

6 years agoget_single_char reads Enter as \n
notoria [Sat, 18 Apr 2020 11:30:52 +0000 (13:30 +0200)]
get_single_char reads Enter as \n

6 years agoMoved get_single_char from builtins.pl to charsio.pl
notoria [Sat, 18 Apr 2020 10:52:49 +0000 (12:52 +0200)]
Moved get_single_char from builtins.pl to charsio.pl

6 years agoAdded predicate for reading a single character
notoria [Sat, 18 Apr 2020 09:49:28 +0000 (11:49 +0200)]
Added predicate for reading a single character

6 years agobracket graphic token chars in toplevel.pl (#357)
Mark Thom [Sat, 18 Apr 2020 20:13:41 +0000 (14:13 -0600)]
bracket graphic token chars in toplevel.pl (#357)

6 years agoslight tweaks to bimetatrans
Mark Thom [Sat, 18 Apr 2020 18:24:42 +0000 (12:24 -0600)]
slight tweaks to bimetatrans

6 years agoindex Constant::Usize (#355)
Mark Thom [Wed, 15 Apr 2020 20:11:45 +0000 (14:11 -0600)]
index Constant::Usize (#355)

6 years agoquote single dots only
Mark Thom [Wed, 15 Apr 2020 19:45:35 +0000 (13:45 -0600)]
quote single dots only

6 years agoADDED: list_to_set/2, using the first occurrence of each element
Markus Triska [Wed, 15 Apr 2020 15:49:01 +0000 (17:49 +0200)]
ADDED: list_to_set/2, using the first occurrence of each element

Example:

    ?- list_to_set([B,a,b,a,B,A,b,A], Ls).
       Ls = [B,a,b,A]
    ;  false.

6 years agoallow characters as atoms in Machine::use_module and Machine::use_qualified_module
Mark Thom [Wed, 15 Apr 2020 16:32:23 +0000 (10:32 -0600)]
allow characters as atoms in Machine::use_module and Machine::use_qualified_module

6 years agoremove underscores in printed variables produced by write_term_to_chars (#340)
Mark Thom [Wed, 15 Apr 2020 16:27:20 +0000 (10:27 -0600)]
remove underscores in printed variables produced by write_term_to_chars (#340)

6 years agodon't count the terminator in PStrIter len
Mark Thom [Wed, 15 Apr 2020 16:07:44 +0000 (10:07 -0600)]
don't count the terminator in PStrIter len

6 years agoquote dot when quoted(true) (#349)
Mark Thom [Wed, 15 Apr 2020 06:54:32 +0000 (00:54 -0600)]
quote dot when quoted(true) (#349)

6 years agoprivilege new op declarations over old ones (#346)
Mark Thom [Wed, 15 Apr 2020 06:37:00 +0000 (00:37 -0600)]
privilege new op declarations over old ones (#346)

6 years agointerrupt running queries and return to toplevel (#323)
Mark Thom [Wed, 15 Apr 2020 06:08:35 +0000 (00:08 -0600)]
interrupt running queries and return to toplevel (#323)

6 years agowrite [a,b,c] correctly with write_canonical (#349)
Mark Thom [Wed, 15 Apr 2020 05:25:15 +0000 (23:25 -0600)]
write [a,b,c] correctly with write_canonical (#349)

6 years agoupdate the toplevel description, incorporating the latest changes
Markus Triska [Tue, 14 Apr 2020 17:24:13 +0000 (19:24 +0200)]
update the toplevel description, incorporating the latest changes

6 years agoMerge pull request #360 from notoria/master
Mark Thom [Sat, 18 Apr 2020 17:10:26 +0000 (14:10 -0300)]
Merge pull request #360 from notoria/master

Add get_single_char predicate.

6 years agoMerge pull request #2 from triska/get_single_char
notoria [Sat, 18 Apr 2020 16:51:37 +0000 (18:51 +0200)]
Merge pull request #2 from triska/get_single_char

New feature: RET can now be used as a synonym for "." in the interaction

6 years agoRemoved a check in get_single_char
notoria [Sat, 18 Apr 2020 16:28:26 +0000 (18:28 +0200)]
Removed a check in get_single_char

6 years agoreintroduce "n" as a synonym for ";" and " "
Markus Triska [Sat, 18 Apr 2020 16:08:08 +0000 (18:08 +0200)]
reintroduce "n" as a synonym for ";" and " "

6 years agoENHANCED: the toplevel interaction now supports RETURN as a synonym for "."
Markus Triska [Sat, 18 Apr 2020 15:47:24 +0000 (17:47 +0200)]
ENHANCED: the toplevel interaction now supports RETURN as a synonym for "."

This is made possible due to the recent improvements by @notoria.

6 years agosmall simplifications
Markus Triska [Sat, 18 Apr 2020 15:40:19 +0000 (17:40 +0200)]
small simplifications

6 years agoAdded Space for continuation
notoria [Sat, 18 Apr 2020 14:57:45 +0000 (16:57 +0200)]
Added Space for continuation

6 years agoFixed the predicate name when error is thrown
notoria [Sat, 18 Apr 2020 13:21:19 +0000 (15:21 +0200)]
Fixed the predicate name when error is thrown

6 years agoMerge pull request #1 from triska/get_single_char
notoria [Sat, 18 Apr 2020 12:50:32 +0000 (14:50 +0200)]
Merge pull request #1 from triska/get_single_char

use get_single_char/1

6 years agoinstead of a type error, use a domain error
Markus Triska [Sat, 18 Apr 2020 12:38:03 +0000 (14:38 +0200)]
instead of a type error, use a domain error

The preceding use of atom_length/2 already ensures that C has the
correct type (i.e., atom). However, its domain may still be wrong,
if its length is greater than 1.

6 years agouse get_single_char/1
Markus Triska [Sat, 18 Apr 2020 12:33:11 +0000 (14:33 +0200)]
use get_single_char/1

6 years agoRemoved $raw_input_read_char
notoria [Sat, 18 Apr 2020 11:54:18 +0000 (13:54 +0200)]
Removed $raw_input_read_char

6 years agoget_single_char reads Tab as \t
notoria [Sat, 18 Apr 2020 11:33:42 +0000 (13:33 +0200)]
get_single_char reads Tab as \t

6 years agoget_single_char reads Enter as \n
notoria [Sat, 18 Apr 2020 11:30:52 +0000 (13:30 +0200)]
get_single_char reads Enter as \n

6 years agoMoved get_single_char from builtins.pl to charsio.pl
notoria [Sat, 18 Apr 2020 10:52:49 +0000 (12:52 +0200)]
Moved get_single_char from builtins.pl to charsio.pl

6 years agoAdded predicate for reading a single character
notoria [Sat, 18 Apr 2020 09:49:28 +0000 (11:49 +0200)]
Added predicate for reading a single character

6 years agoindex Constant::Usize (#355)
Mark Thom [Wed, 15 Apr 2020 20:11:45 +0000 (14:11 -0600)]
index Constant::Usize (#355)

6 years agoquote single dots only
Mark Thom [Wed, 15 Apr 2020 19:45:35 +0000 (13:45 -0600)]
quote single dots only

6 years agoMerge pull request #354 from triska/master
Mark Thom [Wed, 15 Apr 2020 16:19:54 +0000 (13:19 -0300)]
Merge pull request #354 from triska/master

ADDED: list_to_set/2, using the first occurrence of each element

6 years agoallow characters as atoms in Machine::use_module and Machine::use_qualified_module
Mark Thom [Wed, 15 Apr 2020 16:32:23 +0000 (10:32 -0600)]
allow characters as atoms in Machine::use_module and Machine::use_qualified_module

6 years agoremove underscores in printed variables produced by write_term_to_chars (#340)
Mark Thom [Wed, 15 Apr 2020 16:27:20 +0000 (10:27 -0600)]
remove underscores in printed variables produced by write_term_to_chars (#340)

6 years agodon't count the terminator in PStrIter len
Mark Thom [Wed, 15 Apr 2020 16:07:44 +0000 (10:07 -0600)]
don't count the terminator in PStrIter len

6 years agoADDED: list_to_set/2, using the first occurrence of each element
Markus Triska [Wed, 15 Apr 2020 15:49:01 +0000 (17:49 +0200)]
ADDED: list_to_set/2, using the first occurrence of each element

Example:

    ?- list_to_set([B,a,b,a,B,A,b,A], Ls).
       Ls = [B,a,b,A]
    ;  false.

6 years agoquote dot when quoted(true) (#349)
Mark Thom [Wed, 15 Apr 2020 06:54:32 +0000 (00:54 -0600)]
quote dot when quoted(true) (#349)

6 years agoprivilege new op declarations over old ones (#346)
Mark Thom [Wed, 15 Apr 2020 06:37:00 +0000 (00:37 -0600)]
privilege new op declarations over old ones (#346)

6 years agointerrupt running queries and return to toplevel (#323)
Mark Thom [Wed, 15 Apr 2020 06:08:35 +0000 (00:08 -0600)]
interrupt running queries and return to toplevel (#323)

6 years agowrite [a,b,c] correctly with write_canonical (#349)
Mark Thom [Wed, 15 Apr 2020 05:25:15 +0000 (23:25 -0600)]
write [a,b,c] correctly with write_canonical (#349)

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Wed, 15 Apr 2020 05:15:01 +0000 (23:15 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoproperly iterate through UTF-8 strings (#350)
Mark Thom [Wed, 15 Apr 2020 05:14:47 +0000 (23:14 -0600)]
properly iterate through UTF-8 strings (#350)

6 years agoclean up print_list_like
Mark Thom [Tue, 14 Apr 2020 20:26:30 +0000 (14:26 -0600)]
clean up print_list_like

6 years agoprint lists as strings when possible (#295)
Mark Thom [Tue, 14 Apr 2020 19:28:51 +0000 (13:28 -0600)]
print lists as strings when possible (#295)

6 years agoMerge pull request #348 from triska/master
Mark Thom [Tue, 14 Apr 2020 17:29:40 +0000 (14:29 -0300)]
Merge pull request #348 from triska/master

update the toplevel description, incorporating the latest changes

6 years agoupdate the toplevel description, incorporating the latest changes
Markus Triska [Tue, 14 Apr 2020 17:24:13 +0000 (19:24 +0200)]
update the toplevel description, incorporating the latest changes

6 years agoprovide better variable names in write_term_to_chars/3 (#340)
Mark Thom [Tue, 14 Apr 2020 16:39:10 +0000 (10:39 -0600)]
provide better variable names in write_term_to_chars/3 (#340)

6 years agoimprove writeX performance (#290)
Mark Thom [Tue, 14 Apr 2020 16:25:05 +0000 (10:25 -0600)]
improve writeX performance (#290)

6 years agocopy operator exports to impromptu modules (#307)
Mark Thom [Tue, 14 Apr 2020 07:03:49 +0000 (01:03 -0600)]
copy operator exports to impromptu modules (#307)

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Tue, 14 Apr 2020 06:40:57 +0000 (00:40 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agochange from xsi to iso in bimetatrans, correct atomic/1 failure (#343)
Mark Thom [Tue, 14 Apr 2020 06:40:51 +0000 (00:40 -0600)]
change from xsi to iso in bimetatrans, correct atomic/1 failure (#343)

6 years agoMerge pull request #345 from triska/master
Mark Thom [Mon, 13 Apr 2020 22:24:52 +0000 (19:24 -0300)]
Merge pull request #345 from triska/master

ADDED: group_pairs_by_key/2

6 years agoADDED: group_pairs_by_key/2
Markus Triska [Mon, 13 Apr 2020 22:10:33 +0000 (00:10 +0200)]
ADDED: group_pairs_by_key/2

Pairs must be keysorted and may also contain variables as keys.

Examples:

    ?-  group_pairs_by_key([1-a,1-b,2-c], Ps).
       Ps = [1-[a,b],2-[c]].

    ?-  group_pairs_by_key([X-a,X-b,2-c], Ps).
       Ps = [X-[a,b],2-[c]].

6 years agoversion bump
Mark Thom [Mon, 13 Apr 2020 17:17:50 +0000 (11:17 -0600)]
version bump

6 years agoMerge pull request #327 from srenatus/sr/pass-argv-as-partial-strings
Mark Thom [Mon, 13 Apr 2020 14:17:08 +0000 (11:17 -0300)]
Merge pull request #327 from srenatus/sr/pass-argv-as-partial-strings

use partial strings for passing argv to toplevel.pl

6 years agoMerge pull request #342 from srenatus/sr/fix-cargo-install
Mark Thom [Mon, 13 Apr 2020 14:16:55 +0000 (11:16 -0300)]
Merge pull request #342 from srenatus/sr/fix-cargo-install

main: fix version reporting without git

6 years agomain: fix version reporting without git
Stephan Renatus [Mon, 13 Apr 2020 13:50:31 +0000 (15:50 +0200)]
main: fix version reporting without git

Fixes #339.

At least I hope so. I didn't come up with an idea how to test this with
little effort.

Signed-off-by: Stephan Renatus <[email protected]>
6 years agoMerge pull request #341 from triska/master
Mark Thom [Mon, 13 Apr 2020 12:13:17 +0000 (09:13 -0300)]
Merge pull request #341 from triska/master

the workaround is no longer necessary, since #336 is now corrected

6 years agothe workaround is no longer necessary, since #336 is now corrected
Markus Triska [Mon, 13 Apr 2020 09:32:06 +0000 (11:32 +0200)]
the workaround is no longer necessary, since #336 is now corrected

6 years agouse partial strings for passing argv to toplevel.pl
Stephan Renatus [Mon, 6 Apr 2020 15:35:21 +0000 (17:35 +0200)]
use partial strings for passing argv to toplevel.pl

In run_top_level: rename variables, make them partial strings

The rename is mostly cosmetic: all of argv is passed, and if argv
contains flags, goals, etc, it's more than filenames.

Using partial strings instead of atom came from discussions about how to
pass goals in the CLI, and can thus be considered preliminary work for
that.

In toplevel.pl: convert partial string to atom before passing it to
`use_module`.

Signed-off-by: Stephan Renatus <[email protected]>
6 years agouse prolog_parser 0.8.50 (#336)
Mark Thom [Mon, 13 Apr 2020 06:32:41 +0000 (00:32 -0600)]
use prolog_parser 0.8.50 (#336)

6 years agocorrect partial string copying by resetting threshold to redirected partial string...
Mark Thom [Mon, 13 Apr 2020 05:33:07 +0000 (23:33 -0600)]
correct partial string copying by resetting threshold to redirected partial string stubs to 0

6 years agouse partial_string/1 in place of the removed string/1 in bimetatrans_ruleml.pl
Mark Thom [Mon, 13 Apr 2020 04:27:53 +0000 (22:27 -0600)]
use partial_string/1 in place of the removed string/1 in bimetatrans_ruleml.pl

6 years agoupdate Cargo.lock
Mark Thom [Mon, 13 Apr 2020 04:01:59 +0000 (22:01 -0600)]
update Cargo.lock

6 years agobump version to 0.8.119
Mark Thom [Mon, 13 Apr 2020 03:59:22 +0000 (21:59 -0600)]
bump version to 0.8.119

6 years agoMerge pull request #338 from triska/master v0.8.119
Mark Thom [Sun, 12 Apr 2020 23:35:48 +0000 (20:35 -0300)]
Merge pull request #338 from triska/master

also include a newline in portray_clause/1

6 years agoalso include a newline in portray_clause/1
Markus Triska [Sun, 12 Apr 2020 23:21:32 +0000 (01:21 +0200)]
also include a newline in portray_clause/1

6 years agoMerge pull request #337 from triska/master
Mark Thom [Sun, 12 Apr 2020 23:10:21 +0000 (20:10 -0300)]
Merge pull request #337 from triska/master

ADDED: provide a rudimentary version of portray_clause/1

6 years agomake write_term_to_chars work with variable terms (#335)
Mark Thom [Mon, 13 Apr 2020 00:10:45 +0000 (18:10 -0600)]
make write_term_to_chars work with variable terms (#335)

6 years agoprovide read_term_from_chars/2 (#334)
Mark Thom [Sun, 12 Apr 2020 23:26:11 +0000 (17:26 -0600)]
provide read_term_from_chars/2 (#334)

6 years agoADDED: provide a rudimentary version of portray_clause/1
Markus Triska [Sun, 12 Apr 2020 22:12:28 +0000 (00:12 +0200)]
ADDED: provide a rudimentary version of portray_clause/1

At the moment, library(format) seems to be a fitting place.
In the eventual library organization, portray_clause/1 and
related predicates may be moved to their own dedicated library.

6 years agochange wording of QueryCannotBePostedAsFact to QueryCannotBeDefinedAsFact, remove...
Mark Thom [Sun, 12 Apr 2020 22:01:53 +0000 (16:01 -0600)]
change wording of QueryCannotBePostedAsFact to QueryCannotBeDefinedAsFact, remove old commented code in read.rs

6 years agoMerge pull request #333 from triska/master
Mark Thom [Sun, 12 Apr 2020 19:00:01 +0000 (16:00 -0300)]
Merge pull request #333 from triska/master

incorporate the latest improvements in the description of partial strings

6 years agoincorporate the latest improvements in the description of partial strings
Markus Triska [Sun, 12 Apr 2020 18:44:12 +0000 (20:44 +0200)]
incorporate the latest improvements in the description of partial strings

As of 6e4b76a3b40beb02556bd8847fe96789fa0ef012, the use of
partial_string/3 can be replaced by (=)/2 in this example.