]>
Repositorios git - scryer-prolog.git/log
Mark Thom [Wed, 8 Apr 2020 16:18:42 +0000 (13:18 -0300)]
Merge pull request #316 from triska/master
clpz_monotonic/0 --> monotonic/0
Markus Triska [Wed, 8 Apr 2020 15:49:06 +0000 (17:49 +0200)]
tuples_in/2 now works
Mark Thom [Mon, 6 Apr 2020 22:15:36 +0000 (16:15 -0600)]
fix list index offset bug (#314)
Markus Triska [Mon, 6 Apr 2020 21:05:57 +0000 (23:05 +0200)]
clpz_monotonic/0 --> monotonic/0
Mark Thom [Mon, 6 Apr 2020 00:26:27 +0000 (21:26 -0300)]
mark clp(X) item as completed, restore clp(Z) library description
Mark Thom [Mon, 6 Apr 2020 00:14:11 +0000 (21:14 -0300)]
Merge pull request #312 from triska/master
ADDED: CLP(ℤ), Constraint Logic Programming over Integers
Mark Thom [Mon, 6 Apr 2020 02:34:49 +0000 (20:34 -0600)]
consolidate Cargo.lock
Mark Thom [Mon, 6 Apr 2020 02:33:45 +0000 (20:33 -0600)]
merge with master
Mark Thom [Mon, 6 Apr 2020 02:32:16 +0000 (20:32 -0600)]
use fixnums in place of bignums where possible
Markus Triska [Sat, 4 Apr 2020 21:35:39 +0000 (23:35 +0200)]
ADDED: CLP(ℤ), Constraint Logic Programming over Integers
library(clpz) implements declarative integer arithmetic.
The most important predicates for reasoning about integers are:
(#=)/2 equality
(#\=)/2 disequality
(#<)/2 less than
(#>)/2 greater than
(#=<)/2 less than or equal to
(#>=)/2 greater than or equal to
In addition, the library provides several global constraints, such as
all_distinct/1 and global_cardinality/2, and reification predicates
that reflect the truth values of constraints into integer variables.
Enumeration predicates such label/1 and labeling/2 can be used to
search for solutions over finite domains.
Almost all Prolog programs also reason about integers. Therefore, I
recommend to add this library to your .scryerrc configuration file so
that declarative integer arithmetic is available in all your programs.
More information about CLP(ℤ):
https://www.metalevel.at/prolog/clpz
Enjoy!
Mark Thom [Sun, 5 Apr 2020 08:55:30 +0000 (02:55 -0600)]
allocate empty partial strings
Mark Thom [Sun, 5 Apr 2020 00:44:16 +0000 (18:44 -0600)]
use copy_term/3 to print residual goals (#254)
Mark Thom [Fri, 3 Apr 2020 16:22:46 +0000 (10:22 -0600)]
harmonize partial strings with complete strings (#276), make Addr a copyable type
Mark Thom [Fri, 3 Apr 2020 03:35:51 +0000 (00:35 -0300)]
Merge pull request #306 from srenatus/sr/version-argument
main: add -v/--version flag
Mark Thom [Tue, 31 Mar 2020 02:00:08 +0000 (20:00 -0600)]
add bimetatrans_ruleml.pl to examples
Stephan Renatus [Sat, 28 Mar 2020 08:07:42 +0000 (09:07 +0100)]
main: skip args[0]
This is a bit pedantic, it's unlikely that the executable would be
called `-v` or `--version`. However, it seems slightly more correct to
disregard argv[0] when checking flags.
Signed-off-by: Stephan Renatus <[email protected] >
Stephan Renatus [Fri, 27 Mar 2020 18:59:48 +0000 (19:59 +0100)]
main: add -v/--version flag
Added a new dependency to take care of pulling in the version from git
at build time.
Args handling is minimalistic, but there wasn't any before, so I figured
this might do for now. (Eventually, some proper `--help` and usage
output might come in handy?)
Signed-off-by: Stephan Renatus <[email protected] >
Mark Thom [Fri, 27 Mar 2020 17:35:17 +0000 (14:35 -0300)]
Merge pull request #305 from srenatus/sr/typo
examples/least_time.pl: fix typo
Stephan Renatus [Fri, 27 Mar 2020 17:29:17 +0000 (18:29 +0100)]
examples/least_time.pl: fix typo
Signed-off-by: Stephan Renatus <[email protected] >
Mark Thom [Fri, 27 Mar 2020 04:01:25 +0000 (22:01 -0600)]
Merge branch 'master' into develop
Mark Thom [Fri, 27 Mar 2020 04:01:23 +0000 (22:01 -0600)]
initial commit for merge
Mark Thom [Fri, 20 Mar 2020 02:42:37 +0000 (20:42 -0600)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Fri, 20 Mar 2020 02:42:11 +0000 (20:42 -0600)]
add least_time example
Mark Thom [Fri, 20 Mar 2020 02:41:58 +0000 (20:41 -0600)]
provide contextual information in the return value of try_in_situ_result
Mark Thom [Thu, 19 Mar 2020 23:49:17 +0000 (17:49 -0600)]
#278
Mark Thom [Thu, 19 Mar 2020 23:00:40 +0000 (20:00 -0300)]
Merge pull request #294 from triska/format
ENHANCED: format_//2 now supports ~a, ~d, ~Nd, ~D, ~ND, ~Nn, ~i and ~*
Markus Triska [Thu, 19 Mar 2020 20:51:53 +0000 (21:51 +0100)]
ENHANCED: format_//2 now supports ~a, ~d, ~Nd, ~D, ~ND, ~Nn, ~i and ~*
Mark Thom [Tue, 17 Mar 2020 16:55:05 +0000 (13:55 -0300)]
Merge pull request #293 from triska/documentation
update toplevel interaction
Markus Triska [Tue, 17 Mar 2020 16:42:57 +0000 (17:42 +0100)]
update toplevel interaction
Mark Thom [Tue, 17 Mar 2020 08:03:29 +0000 (02:03 -0600)]
remove Addr::PStrTail (#276)
Mark Thom [Mon, 16 Mar 2020 05:29:21 +0000 (23:29 -0600)]
add set_input/1, set_output/1
Mark Thom [Mon, 16 Mar 2020 03:15:42 +0000 (21:15 -0600)]
correct contextual quoting of chars
Mark Thom [Sun, 15 Mar 2020 15:09:44 +0000 (12:09 -0300)]
Merge pull request #289 from triska/documentation
include a short overview of notable libraries
Mark Thom [Sun, 15 Mar 2020 15:09:25 +0000 (12:09 -0300)]
Merge pull request #291 from triska/toplevel
Two small toplevel features
Markus Triska [Sun, 15 Mar 2020 12:24:28 +0000 (13:24 +0100)]
support 'h' to print help message during toplevel interaction
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 ...
Markus Triska [Sun, 15 Mar 2020 10:23:17 +0000 (11:23 +0100)]
include a short overview of notable libraries
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)
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
Mark Thom [Sun, 15 Mar 2020 00:17:11 +0000 (18:17 -0600)]
output strings more efficiently
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
Mark Thom [Sat, 14 Mar 2020 20:14:26 +0000 (14:14 -0600)]
correct DCG descriptions of lists (#286)
Mark Thom [Sat, 14 Mar 2020 09:04:11 +0000 (03:04 -0600)]
Give new answer variables readable names (#279)
Mark Thom [Sat, 14 Mar 2020 03:05:25 +0000 (21:05 -0600)]
print strings as strings only in the term expander
Mark Thom [Sat, 14 Mar 2020 00:24:13 +0000 (18:24 -0600)]
print strings as strings (#285)
Mark Thom [Fri, 13 Mar 2020 23:12:35 +0000 (17:12 -0600)]
eliminate inner_numbervar_count
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
Mark Thom [Fri, 13 Mar 2020 21:40:03 +0000 (15:40 -0600)]
allow module export of nonterminals (#281)
Mark Thom [Fri, 13 Mar 2020 21:32:56 +0000 (15:32 -0600)]
properly handle '\n' when quoted and not (#283, #280)
Mark Thom [Fri, 13 Mar 2020 19:49:12 +0000 (13:49 -0600)]
fix -names (#275)
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 .
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.
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)
Mark Thom [Fri, 13 Mar 2020 08:48:31 +0000 (02:48 -0600)]
fix $VAR-names (#275) and properly print single control chars (#280)
Mark Thom [Fri, 13 Mar 2020 08:40:06 +0000 (02:40 -0600)]
give new answer variables readable names (#279)
Mark Thom [Wed, 11 Mar 2020 06:38:01 +0000 (00:38 -0600)]
add current_output, printing of stream terms
Mark Thom [Mon, 9 Mar 2020 17:56:16 +0000 (11:56 -0600)]
add streams.rs, consume them in place of the old PrologStream
Mark Thom [Mon, 9 Mar 2020 00:02:06 +0000 (18:02 -0600)]
update README.md
Mark Thom [Mon, 9 Mar 2020 00:01:54 +0000 (18:01 -0600)]
replace termion with crossterm
Mark Thom [Sun, 8 Mar 2020 22:49:47 +0000 (16:49 -0600)]
fix broken conformity tests, quote left paren
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)
Mark Thom [Sat, 7 Mar 2020 04:19:53 +0000 (21:19 -0700)]
count single character atoms as characters when generating first argument indices
Mark Thom [Thu, 5 Mar 2020 19:50:11 +0000 (12:50 -0700)]
compare characters directly in term comparison tests
Mark Thom [Mon, 2 Mar 2020 06:21:35 +0000 (23:21 -0700)]
switch to representation error for partial strings (#267)
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)
Mark Thom [Sat, 29 Feb 2020 22:23:48 +0000 (15:23 -0700)]
update README
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)
Mark Thom [Sat, 29 Feb 2020 04:42:22 +0000 (21:42 -0700)]
allow set_prolog_flag in declarations
Mark Thom [Thu, 27 Feb 2020 23:19:48 +0000 (16:19 -0700)]
remove cyclic_term/1
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
Mark Thom [Sun, 23 Feb 2020 20:22:56 +0000 (13:22 -0700)]
mention rustup.rs in README (#261)
Mark Thom [Sun, 23 Feb 2020 20:16:14 +0000 (13:16 -0700)]
update prolog_parser version, allow ('|') operator in DCGs (#274)
Mark Thom [Sat, 22 Feb 2020 22:13:01 +0000 (15:13 -0700)]
remove setof/3, bagof/3 non-determinism (#270)
Mark Thom [Sat, 22 Feb 2020 07:58:37 +0000 (00:58 -0700)]
rename non_iso.pl to iso_ext.pl (#265)
Mark Thom [Sat, 22 Feb 2020 07:51:27 +0000 (00:51 -0700)]
add comparisons between partial strings and string constants (#263)
Mark Thom [Sat, 22 Feb 2020 04:09:59 +0000 (21:09 -0700)]
correct misreported error in toplevel loop (#272)
Mark Thom [Sat, 22 Feb 2020 00:21:15 +0000 (17:21 -0700)]
remove same_length/2 from clpb.pl
Mark Thom [Fri, 21 Feb 2020 20:08:03 +0000 (13:08 -0700)]
make partial strings accept characters (#268)
Mark Thom [Fri, 21 Feb 2020 19:55:33 +0000 (12:55 -0700)]
partial_string/3 should accept empty lists (#264)
Mark Thom [Fri, 21 Feb 2020 19:51:23 +0000 (12:51 -0700)]
identify ground partial strings under (==) (#269)
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
Mark Thom [Fri, 21 Feb 2020 08:02:52 +0000 (01:02 -0700)]
fix #255 (I think?)
Mark Thom [Thu, 20 Feb 2020 17:59:42 +0000 (10:59 -0700)]
correct PStrLocation offset bug in copier.rs
Mark Thom [Thu, 20 Feb 2020 17:07:45 +0000 (10:07 -0700)]
revert to older between.pl
Mark Thom [Thu, 20 Feb 2020 04:44:18 +0000 (21:44 -0700)]
Merge branch 'master' of https://github.com/mthom/rusty-wam
Mark Thom [Thu, 20 Feb 2020 04:42:39 +0000 (21:42 -0700)]
update Cargo.lock and toml version
Mark Thom [Thu, 20 Feb 2020 04:38:19 +0000 (21:38 -0700)]
update README
Mark Thom [Thu, 20 Feb 2020 04:34:09 +0000 (21:34 -0700)]
add redone partial strings (#24, #95)
Mark Thom [Wed, 19 Feb 2020 22:55:56 +0000 (15:55 -0700)]
update between/3 to allow inf as upper bound
Mark Thom [Wed, 19 Feb 2020 21:43:06 +0000 (14:43 -0700)]
stop applying (=..)/2 to variables in tabling/trie.pl
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
Mark Thom [Sun, 16 Feb 2020 23:30:36 +0000 (16:30 -0700)]
use raw_block.rs for the heap backend
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
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
Mark Thom [Thu, 13 Feb 2020 06:34:05 +0000 (23:34 -0700)]
move bump allocation logic to its own module
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
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
Mark Thom [Thu, 6 Feb 2020 17:12:57 +0000 (10:12 -0700)]
correct improper use of multifile directive in tabling/wrapper.pl
Mark Thom [Wed, 5 Feb 2020 06:39:49 +0000 (23:39 -0700)]
print extended characters recently added to alpha char set
Mark Thom [Wed, 5 Feb 2020 06:35:03 +0000 (23:35 -0700)]
prolog_parser version bump