]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
6 years agosupport 'h' to print help message during toplevel interaction
Markus Triska [Sun, 15 Mar 2020 12:24:28 +0000 (13:24 +0100)]
support 'h' to print help message during toplevel interaction

6 years agosupport 'p' to reprint answer with max depth, allowing w -> p -> w ...
Markus Triska [Sun, 15 Mar 2020 12:16:40 +0000 (13:16 +0100)]
support 'p' to reprint answer with max depth, allowing w -> p -> w ...

6 years agouse max_depth at toplevel, allowing full printing of terms with the 'w' keypress...
Mark Thom [Sun, 15 Mar 2020 06:35:59 +0000 (00:35 -0600)]
use max_depth at toplevel, allowing full printing of terms with the 'w' keypress (#287), put disjunctions on new lines (#278)

6 years agoadd provisional max_depth option to write_term, speed printing of non-cyclic terms
Mark Thom [Sun, 15 Mar 2020 06:09:20 +0000 (00:09 -0600)]
add provisional max_depth option to write_term, speed printing of non-cyclic terms

6 years agooutput strings more efficiently
Mark Thom [Sun, 15 Mar 2020 00:17:11 +0000 (18:17 -0600)]
output strings more efficiently

6 years agodon't emit overwriting warnings for term_expansion/2 or goal_expansion/2
Mark Thom [Sat, 14 Mar 2020 20:18:01 +0000 (14:18 -0600)]
don't emit overwriting warnings for term_expansion/2 or goal_expansion/2

6 years agocorrect DCG descriptions of lists (#286)
Mark Thom [Sat, 14 Mar 2020 20:14:26 +0000 (14:14 -0600)]
correct DCG descriptions of lists (#286)

6 years agoGive new answer variables readable names (#279)
Mark Thom [Sat, 14 Mar 2020 09:04:11 +0000 (03:04 -0600)]
Give new answer variables readable names (#279)

6 years agoprint strings as strings only in the term expander
Mark Thom [Sat, 14 Mar 2020 03:05:25 +0000 (21:05 -0600)]
print strings as strings only in the term expander

6 years agoprint strings as strings (#285)
Mark Thom [Sat, 14 Mar 2020 00:24:13 +0000 (18:24 -0600)]
print strings as strings (#285)

6 years agoeliminate inner_numbervar_count
Mark Thom [Fri, 13 Mar 2020 23:12:35 +0000 (17:12 -0600)]
eliminate inner_numbervar_count

6 years agoMerge pull request #284 from triska/master
Mark Thom [Fri, 13 Mar 2020 20:06:27 +0000 (17:06 -0300)]
Merge pull request #284 from triska/master

ADDED: library(format), describing strings with format_//2

6 years agoallow module export of nonterminals (#281)
Mark Thom [Fri, 13 Mar 2020 21:40:03 +0000 (15:40 -0600)]
allow module export of nonterminals (#281)

6 years agoproperly handle '\n' when quoted and not (#283, #280)
Mark Thom [Fri, 13 Mar 2020 21:32:56 +0000 (15:32 -0600)]
properly handle '\n' when quoted and not (#283, #280)

6 years agofix -names (#275)
Mark Thom [Fri, 13 Mar 2020 19:49:12 +0000 (13:49 -0600)]
fix -names (#275)

6 years agoRevert "fix $VAR-names (#275) and properly print single control chars (#280)"
Mark Thom [Fri, 13 Mar 2020 19:47:58 +0000 (13:47 -0600)]
Revert "fix $VAR-names (#275) and properly print single control chars (#280)"

This reverts commit d3eb31e4c36071029d596b5a177306a7e67ea62c.

6 years agoADDED: library(format), describing strings with format_//2
Markus Triska [Fri, 13 Mar 2020 19:46:53 +0000 (20:46 +0100)]
ADDED: library(format), describing strings with format_//2

This library provides the nonterminal format_//2 to describe
formatted strings. format/2 is provided for impure output.

Usage:
======

phrase(format_(FormatString, Arguments), Ls)

format_//2 describes a list of characters Ls that are formatted
according to FormatString. FormatString is a string (i.e.,
a list of characters) that specifies the layout of Ls.
The characters in FormatString are used literally, except
for the following tokens with special meaning:

  ~w    use the next available argument from Arguments here,
        which must be atomic (a current limitation)
  ~f    use the next argument here, a floating point number
  ~Nf   where N is an integer: format the float argument
        using N digits after the decimal point
  ~s    use the next argument here, which must be a string
  ~N|   where N is an integer: place a tab stop at text column N
  ~N+   where N is an integer: place a tab stop N characters
        after the previous tab stop (or start of line)
  ~t    distribute spaces evenly between the two closest tabstops
  ~`Ct  like ~t, use character C instead of spaces to fill the space
  ~n    newline
  ~~    the literal ~

The predicate format/2 is like format_//2, except that it outputs
the text on the terminal instead of describing it declaratively.

If at all possible, format_//2 should be used, to stress pure parts
that enable easy testing etc. If necessary, you can emit the list Ls
with maplist(write, Ls).

The entire library only works if the Prolog flag double_quotes
is set to chars, the default value in Scryer Prolog. This should
also stay that way, to encourage a sensible environment.

Example:

?- phrase(format_("~s~n~`.t~w!~12|", ["hello",there]), Cs).
%@ Cs = [h,e,l,l,o,'\n','.','.','.','.','.','.',t,h,e,r,e,!] ;
%@ false.

6 years agosort variables in findall_with_existential before computing set difference (#282...
Mark Thom [Fri, 13 Mar 2020 19:18:47 +0000 (13:18 -0600)]
sort variables in findall_with_existential before computing set difference (#282), trawl back changes of (#279)

6 years agofix $VAR-names (#275) and properly print single control chars (#280)
Mark Thom [Fri, 13 Mar 2020 08:48:31 +0000 (02:48 -0600)]
fix $VAR-names (#275) and properly print single control chars (#280)

6 years agogive new answer variables readable names (#279)
Mark Thom [Fri, 13 Mar 2020 08:40:06 +0000 (02:40 -0600)]
give new answer variables readable names (#279)

6 years agoadd current_output, printing of stream terms
Mark Thom [Wed, 11 Mar 2020 06:38:01 +0000 (00:38 -0600)]
add current_output, printing of stream terms

6 years agoadd streams.rs, consume them in place of the old PrologStream
Mark Thom [Mon, 9 Mar 2020 17:56:16 +0000 (11:56 -0600)]
add streams.rs, consume them in place of the old PrologStream

6 years agoupdate README.md
Mark Thom [Mon, 9 Mar 2020 00:02:06 +0000 (18:02 -0600)]
update README.md

6 years agoreplace termion with crossterm
Mark Thom [Mon, 9 Mar 2020 00:01:54 +0000 (18:01 -0600)]
replace termion with crossterm

6 years agofix broken conformity tests, quote left paren
Mark Thom [Sun, 8 Mar 2020 22:49:47 +0000 (16:49 -0600)]
fix broken conformity tests, quote left paren

6 years agorepresent the current_dir as an absolute path, not a relative one. (#262)
Mark Thom [Sat, 7 Mar 2020 23:00:04 +0000 (16:00 -0700)]
represent the current_dir as an absolute path, not a relative one. (#262)

6 years agocount single character atoms as characters when generating first argument indices
Mark Thom [Sat, 7 Mar 2020 04:19:53 +0000 (21:19 -0700)]
count single character atoms as characters when generating first argument indices

6 years agocompare characters directly in term comparison tests
Mark Thom [Thu, 5 Mar 2020 19:50:11 +0000 (12:50 -0700)]
compare characters directly in term comparison tests

6 years agoswitch to representation error for partial strings (#267)
Mark Thom [Mon, 2 Mar 2020 06:21:35 +0000 (23:21 -0700)]
switch to representation error for partial strings (#267)

6 years agocorrect handling of strings and partial strings as lists, print bar operator with...
Mark Thom [Sun, 1 Mar 2020 07:00:40 +0000 (00:00 -0700)]
correct handling of strings and partial strings as lists, print bar operator with surrounding spaces (#274)

6 years agoupdate README
Mark Thom [Sat, 29 Feb 2020 22:23:48 +0000 (15:23 -0700)]
update README

6 years agoadd s pointers for strings and partial strings, put_unsafe_value calls store earlier...
Mark Thom [Sat, 29 Feb 2020 06:42:40 +0000 (23:42 -0700)]
add s pointers for strings and partial strings, put_unsafe_value calls store earlier to avoid unnecessary heap writes (#273)

6 years agoallow set_prolog_flag in declarations
Mark Thom [Sat, 29 Feb 2020 04:42:22 +0000 (21:42 -0700)]
allow set_prolog_flag in declarations

6 years agoremove cyclic_term/1
Mark Thom [Thu, 27 Feb 2020 23:19:48 +0000 (16:19 -0700)]
remove cyclic_term/1

6 years agoactually do lco, and mark unsafe variables before the goals where they last occur...
Mark Thom [Thu, 27 Feb 2020 04:57:57 +0000 (21:57 -0700)]
actually do lco, and mark unsafe variables before the goals where they last occur, not just in the last goal

6 years agomention rustup.rs in README (#261)
Mark Thom [Sun, 23 Feb 2020 20:22:56 +0000 (13:22 -0700)]
mention rustup.rs in README (#261)

6 years agoupdate prolog_parser version, allow ('|') operator in DCGs (#274)
Mark Thom [Sun, 23 Feb 2020 20:16:14 +0000 (13:16 -0700)]
update prolog_parser version, allow ('|') operator in DCGs (#274)

6 years agoremove setof/3, bagof/3 non-determinism (#270)
Mark Thom [Sat, 22 Feb 2020 22:13:01 +0000 (15:13 -0700)]
remove setof/3, bagof/3 non-determinism (#270)

6 years agorename non_iso.pl to iso_ext.pl (#265)
Mark Thom [Sat, 22 Feb 2020 07:58:37 +0000 (00:58 -0700)]
rename non_iso.pl to iso_ext.pl (#265)

6 years agoadd comparisons between partial strings and string constants (#263)
Mark Thom [Sat, 22 Feb 2020 07:51:27 +0000 (00:51 -0700)]
add comparisons between partial strings and string constants (#263)

6 years agocorrect misreported error in toplevel loop (#272)
Mark Thom [Sat, 22 Feb 2020 04:09:59 +0000 (21:09 -0700)]
correct misreported error in toplevel loop (#272)

6 years agoremove same_length/2 from clpb.pl
Mark Thom [Sat, 22 Feb 2020 00:21:15 +0000 (17:21 -0700)]
remove same_length/2 from clpb.pl

6 years agomake partial strings accept characters (#268)
Mark Thom [Fri, 21 Feb 2020 20:08:03 +0000 (13:08 -0700)]
make partial strings accept characters (#268)

6 years agopartial_string/3 should accept empty lists (#264)
Mark Thom [Fri, 21 Feb 2020 19:55:33 +0000 (12:55 -0700)]
partial_string/3 should accept empty lists (#264)

6 years agoidentify ground partial strings under (==) (#269)
Mark Thom [Fri, 21 Feb 2020 19:51:23 +0000 (12:51 -0700)]
identify ground partial strings under (==) (#269)

6 years agoadopt compatibility predicates from clpb and clpz into lists and pairs libraries
Mark Thom [Fri, 21 Feb 2020 19:48:15 +0000 (12:48 -0700)]
adopt compatibility predicates from clpb and clpz into lists and pairs libraries

6 years agofix #255 (I think?)
Mark Thom [Fri, 21 Feb 2020 08:02:52 +0000 (01:02 -0700)]
fix #255 (I think?)

6 years agocorrect PStrLocation offset bug in copier.rs
Mark Thom [Thu, 20 Feb 2020 17:59:42 +0000 (10:59 -0700)]
correct PStrLocation offset bug in copier.rs

6 years agorevert to older between.pl
Mark Thom [Thu, 20 Feb 2020 17:07:45 +0000 (10:07 -0700)]
revert to older between.pl

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam v0.8.118
Mark Thom [Thu, 20 Feb 2020 04:44:18 +0000 (21:44 -0700)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoupdate Cargo.lock and toml version
Mark Thom [Thu, 20 Feb 2020 04:42:39 +0000 (21:42 -0700)]
update Cargo.lock and toml version

6 years agoupdate README
Mark Thom [Thu, 20 Feb 2020 04:38:19 +0000 (21:38 -0700)]
update README

6 years agoadd redone partial strings (#24, #95)
Mark Thom [Thu, 20 Feb 2020 04:34:09 +0000 (21:34 -0700)]
add redone partial strings (#24, #95)

6 years agoupdate between/3 to allow inf as upper bound
Mark Thom [Wed, 19 Feb 2020 22:55:56 +0000 (15:55 -0700)]
update between/3 to allow inf as upper bound

6 years agostop applying (=..)/2 to variables in tabling/trie.pl
Mark Thom [Wed, 19 Feb 2020 21:43:06 +0000 (14:43 -0700)]
stop applying (=..)/2 to variables in tabling/trie.pl

6 years agoMerge pull request #258 from aarroyoc/master
Mark Thom [Wed, 19 Feb 2020 16:10:48 +0000 (12:10 -0400)]
Merge pull request #258 from aarroyoc/master

add n as an option to get the next solution

6 years agouse raw_block.rs for the heap backend
Mark Thom [Sun, 16 Feb 2020 23:30:36 +0000 (16:30 -0700)]
use raw_block.rs for the heap backend

6 years agochange raw_vec to raw_block to avoid clashes with liballoc package
Mark Thom [Fri, 14 Feb 2020 03:05:46 +0000 (20:05 -0700)]
change raw_vec to raw_block to avoid clashes with liballoc package

6 years agoallow the frontier of the RawVec to be offset by a trait function
Mark Thom [Thu, 13 Feb 2020 06:52:30 +0000 (23:52 -0700)]
allow the frontier of the RawVec to be offset by a trait function

6 years agomove bump allocation logic to its own module
Mark Thom [Thu, 13 Feb 2020 06:34:05 +0000 (23:34 -0700)]
move bump allocation logic to its own module

6 years agoremove partial strings, but represent strings as lists when warranted by double_quotes
Mark Thom [Thu, 13 Feb 2020 05:12:42 +0000 (22:12 -0700)]
remove partial strings, but represent strings as lists when warranted by double_quotes

6 years agoadd n as an option to get the next solution
Adrián Arroyo Calle [Mon, 10 Feb 2020 16:51:26 +0000 (17:51 +0100)]
add n as an option to get the next solution

6 years agocorrect improper use of multifile directive in tabling/wrapper.pl
Mark Thom [Thu, 6 Feb 2020 17:12:57 +0000 (10:12 -0700)]
correct improper use of multifile directive in tabling/wrapper.pl

6 years agoprint extended characters recently added to alpha char set
Mark Thom [Wed, 5 Feb 2020 06:39:49 +0000 (23:39 -0700)]
print extended characters recently added to alpha char set

6 years agoprolog_parser version bump
Mark Thom [Wed, 5 Feb 2020 06:35:03 +0000 (23:35 -0700)]
prolog_parser version bump

6 years agorecommit Cargo.lock
Mark Thom [Wed, 5 Feb 2020 00:49:20 +0000 (17:49 -0700)]
recommit Cargo.lock

6 years agoversion bump, README.md tweak
Mark Thom [Wed, 5 Feb 2020 00:47:57 +0000 (17:47 -0700)]
version bump, README.md tweak

6 years agoenable cross-query memoization in the tabling library
Mark Thom [Mon, 3 Feb 2020 05:52:17 +0000 (22:52 -0700)]
enable cross-query memoization in the tabling library

6 years agoremove tabling/SLG resolution from nice-to-have list
Mark Thom [Mon, 3 Feb 2020 05:34:54 +0000 (22:34 -0700)]
remove tabling/SLG resolution from nice-to-have list

6 years agoadd tabling library, update README, make Cargo.toml non-local
Mark Thom [Mon, 3 Feb 2020 05:24:48 +0000 (22:24 -0700)]
add tabling library, update README, make Cargo.toml non-local

6 years agoadd multifile and module scoped predicates
Mark Thom [Mon, 3 Feb 2020 05:13:14 +0000 (22:13 -0700)]
add multifile and module scoped predicates

6 years agoupdate README
Mark Thom [Mon, 27 Jan 2020 03:19:44 +0000 (20:19 -0700)]
update README

6 years agoadd preliminary multifile declaration support
Mark Thom [Mon, 27 Jan 2020 03:17:52 +0000 (20:17 -0700)]
add preliminary multifile declaration support

6 years agouse atom_concat in gensym.pl
Mark Thom [Thu, 23 Jan 2020 05:08:42 +0000 (22:08 -0700)]
use atom_concat in gensym.pl

6 years agodon't hold on to popped or frames
Mark Thom [Tue, 21 Jan 2020 03:59:30 +0000 (20:59 -0700)]
don't hold on to popped or frames

6 years agocorrect bug in bb_b_put, correct stack truncation bug resulting in erroneous failures...
Mark Thom [Mon, 20 Jan 2020 03:56:11 +0000 (20:56 -0700)]
correct bug in bb_b_put, correct stack truncation bug resulting in erroneous failures (affecting issue #255 and the in-progress tabling library)

6 years agoadd prefixes to gensym keys
Mark Thom [Tue, 14 Jan 2020 04:01:09 +0000 (21:01 -0700)]
add prefixes to gensym keys

6 years agoadd simple gensym library
Mark Thom [Tue, 14 Jan 2020 03:30:58 +0000 (20:30 -0700)]
add simple gensym library

6 years agoadd listing sources to modules
Mark Thom [Tue, 14 Jan 2020 03:17:22 +0000 (20:17 -0700)]
add listing sources to modules

6 years agoMerge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Fri, 3 Jan 2020 07:47:56 +0000 (00:47 -0700)]
Merge branch 'master' of https://github.com/mthom/rusty-wam

6 years agoimplement less defaulty interface in cont.pl
Mark Thom [Mon, 23 Dec 2019 19:19:18 +0000 (12:19 -0700)]
implement less defaulty interface in cont.pl

6 years agoremove l* languages
Mark Thom [Mon, 23 Dec 2019 18:49:20 +0000 (11:49 -0700)]
remove l* languages

6 years agopush of preliminary delimited continuations library cont.pl (#136)
Mark Thom [Sat, 21 Dec 2019 05:27:49 +0000 (22:27 -0700)]
push of preliminary delimited continuations library cont.pl (#136)

6 years agomerge with master
Mark Thom [Fri, 20 Dec 2019 00:04:30 +0000 (20:04 -0400)]
merge with master

6 years agopreliminary cont work
Mark Thom [Fri, 20 Dec 2019 00:02:10 +0000 (20:02 -0400)]
preliminary cont work

6 years agouse Addr::StackCell(0,0) to indicate non-live local variables
Mark Thom [Fri, 13 Dec 2019 03:34:50 +0000 (20:34 -0700)]
use Addr::StackCell(0,0) to indicate non-live local variables

6 years agoexpand goals inside (\+)/1
Mark Thom [Thu, 12 Dec 2019 04:42:15 +0000 (21:42 -0700)]
expand goals inside (\+)/1

6 years agochange goal and term expansions, change call/N to use goal expansions
Mark Thom [Wed, 11 Dec 2019 04:36:02 +0000 (21:36 -0700)]
change goal and term expansions, change call/N to use goal expansions

6 years agocorrect odd accidental change to clpb.pl
Mark Thom [Sun, 8 Dec 2019 18:44:01 +0000 (11:44 -0700)]
correct odd accidental change to clpb.pl

6 years agoremove zeroing out from Stack::truncate
Mark Thom [Sun, 8 Dec 2019 18:43:22 +0000 (11:43 -0700)]
remove zeroing out from Stack::truncate

6 years agorevert arithmetic code
Mark Thom [Sun, 8 Dec 2019 07:17:55 +0000 (00:17 -0700)]
revert arithmetic code

6 years agoupdate tests
Mark Thom [Sun, 8 Dec 2019 02:21:09 +0000 (19:21 -0700)]
update tests

6 years agoreconcile latest changes against stack changes
Mark Thom [Sun, 8 Dec 2019 01:59:03 +0000 (18:59 -0700)]
reconcile latest changes against stack changes

6 years agoadd backtracking of attributed variable data
Mark Thom [Sat, 7 Dec 2019 00:52:40 +0000 (20:52 -0400)]
add backtracking of attributed variable data

6 years agoresolve panic caused by lingering attribute goals (#253)
Mark Thom [Fri, 6 Dec 2019 19:22:28 +0000 (15:22 -0400)]
resolve panic caused by lingering attribute goals (#253)

6 years agoprint equations between variables (#228, #252)
Mark Thom [Fri, 6 Dec 2019 14:30:16 +0000 (10:30 -0400)]
print equations between variables (#228, #252)

6 years agobinding attributed variables more eagerly after each implementation of verify_attribu...
Mark Thom [Thu, 5 Dec 2019 07:33:46 +0000 (00:33 -0700)]
binding attributed variables more eagerly after each implementation of verify_attributes/3 has been called (#248)

6 years agopop AND stack frames after unwinding the trail (#250)
Mark Thom [Wed, 4 Dec 2019 06:11:57 +0000 (23:11 -0700)]
pop AND stack frames after unwinding the trail (#250)

6 years agocorrect attributed variables bugs
Mark Thom [Wed, 4 Dec 2019 05:59:51 +0000 (22:59 -0700)]
correct attributed variables bugs

6 years agofix copy_term/3 infinite looping on cyclic terms
Mark Thom [Wed, 4 Dec 2019 05:01:38 +0000 (22:01 -0700)]
fix copy_term/3 infinite looping on cyclic terms