Mark Thom
262e8af813
version bump for prolog_parser
2020-05-03 13:46:34 -06:00
notoria
75aa4ce8a0
Completed read/1, ctrl-d is end_of_file
2020-05-03 19:54:17 +02:00
Mark Thom
a494cdaf92
use complete strings in FileToChars ( #430 )
2020-05-03 02:54:49 -06:00
Mark Thom
848425418b
Project goals of query variables ( #362 )
2020-05-02 22:27:32 -06:00
Mark Thom
989bed88fe
wrap support code in modules
2020-05-02 21:26:36 -06:00
Mark Thom
99f66200f7
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-05-02 18:47:53 -06:00
Mark Thom
b642bd2cfd
add term_attributed_variables/2 ( #422 )
2020-05-02 18:46:29 -06:00
Mark Thom
c062b7c9da
Merge pull request #443 from notoria/arithmetic
...
Implemented expmod/4
2020-05-02 12:00:44 -03:00
notoria
7df7901532
Implemented expmod/4
2020-05-02 14:56:07 +02:00
Mark Thom
9dabce819a
remove now unnecessary dependencies, correct ordering of ! in (;)/3
2020-05-01 23:38:44 -03:00
Mark Thom
a019109857
Merge pull request #440 from notoria/arithmetic
...
Enhanced number_to_rational/2 and number_to_rational/3
2020-05-01 21:48:55 -03:00
Mark Thom
46cdf14ecc
Merge pull request #439 from notoria/cli2
...
Enhanced command line?
2020-05-01 21:45:03 -03:00
Mark Thom
fd5ff20b68
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-05-01 21:40:45 -06:00
Mark Thom
81f9666e82
cut after compound check in (;)/2 only after semicolon_compound_selector succeeds
2020-05-01 21:40:36 -06:00
Mark Thom
aa8659d5c7
insert cuts where needed into (;)/3 ( #434 )
2020-05-01 18:52:01 -06:00
notoria
9df2df0f9f
Enhanced number_to_rational/2 and number_to_rational/3
2020-05-02 02:36:23 +02:00
notoria
98d38d763b
Added $scryer_prolog_version/1
2020-05-02 02:19:22 +02:00
notoria
319a4622b3
Enhanced command line
2020-05-02 01:02:06 +02:00
Mark Thom
59b4c6dacb
Merge pull request #437 from triska/master
...
use ℤ
2020-05-01 19:08:45 -03:00
Markus Triska
ec6d725587
use ℤ
...
This is now possible thanks to the great contribution by @matt2xu.
Many thanks!
2020-05-02 00:06:16 +02:00
Mark Thom
6f19649186
Merge pull request #436 from mthom/revert-419-cli
...
Revert "Enhanced command line"
2020-05-01 18:43:37 -03:00
Mark Thom
6a583b9b5b
Revert "Enhanced command line"
2020-05-01 15:43:20 -06:00
Mark Thom
6617b79cd8
Merge pull request #419 from notoria/cli
...
Enhanced command line
2020-05-01 18:32:02 -03:00
Mark Thom
46b695d093
accept any and all characters in comment chars
2020-05-01 16:39:27 -06:00
notoria
de8a017e80
Enhanced command line #2
2020-05-01 18:52:41 +02:00
Mark Thom
b71ec91f57
Merge pull request #432 from triska/master
...
correct overeager CLP(ℤ) goal expansion
2020-05-01 13:41:43 -03:00
Mark Thom
1b7c226779
correct failing character match in compare_pstr_to_string ( #397 )
2020-05-01 10:29:10 -06:00
Markus Triska
ca5a5b4392
correct overeager CLP(ℤ) goal expansion
...
For instance, consider:
t(X) :- X #= 1.
We *cannot* expand this to:
?- listing(t/1).
t(A) :-
( integer(A) ->
A=:=A
; ( var(A) ->
true
; true,
clpz:clpz_equal(A,A)
)
).
Also, a new binding *must not* be dragged outside of disjunctions,
since the code may look for example like this:
i(X) :-
( X #= 3
; X #= 4
).
This commit fixes such issues, and still rewrites CLP(ℤ) expressions
as far as possible already at compilation time.
For example:
n(X) :- X #= 1+3.
This is now compiled to (note that 1+3 is evaluated to 4):
?- listing(n/1).
n(A) :-
( integer(A) ->
A=:=4
; ( var(A) ->
A=4
; B=4,
clpz:clpz_equal(A,B)
)
).
Ideally, it should be compiled to:
n(4).
2020-05-01 18:29:00 +02:00
notoria
6ae7ae0210
Enhanced version
2020-05-01 16:46:31 +02:00
notoria
b911d2fda4
Enhanced command line
2020-05-01 16:19:06 +02:00
Mark Thom
847a92f580
map single character atoms down to characters in constant_index
2020-05-01 01:34:09 -06:00
Mark Thom
a346493de1
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-04-30 18:20:51 -06:00
Mark Thom
efd5d6efab
use slightly better names in indexing functions
2020-04-30 18:20:42 -06:00
Mark Thom
b6df5a4b7f
only add expanded goals to dynamic clause code ( #416 )
2020-04-30 17:53:26 -06:00
Mark Thom
34ae56e319
correct queue_len += queue_len; to queue_len += queue.len(); ( #416 )
2020-04-30 15:31:01 -06:00
Mark Thom
5870824d01
Merge pull request #425 from triska/master
...
enable goal expansion for CLP(ℤ) goals
2020-04-30 18:20:27 -03:00
Markus Triska
1dbadbfc35
enable goal expansion for CLP(ℤ) goals
...
Example:
integer_successor(I0, I) :- I #= I0 + 1.
Yielding:
?- listing(integer_successor/2).
integer_successor(A,B) :-
( integer(B) ->
( integer(A) ->
B=:=A+1
; C is B,
clpz:clpz_equal(C,A+1)
)
; ( integer(A) ->
( var(B) ->
B is A+1
; C is A+1,
clpz:clpz_equal(B,C)
)
; clpz:clpz_equal(B,A+1)
)
).
Thus, fast low-level arithmetic is used whenever possible.
2020-04-30 23:09:15 +02:00
Mark Thom
d3f1cd7411
index atoms with operators against the same atom with no operator ( #387 )
2020-04-30 15:09:05 -06:00
Mark Thom
a821daadd3
Merge pull request #420 from triska/master
...
correct verify_attributes/3 for variables that have no CLP(ℤ) attribute attached (#373 )
2020-04-30 13:32:21 -03:00
Markus Triska
a39f4b4487
correct verify_attributes/3 for variables that have no CLP(ℤ) attribute attached ( #373 )
...
Example:
?- freeze(B, queen_value_truth(C,N,B)), Q #= N #<==> B.
clpz:(Q#=N#<==>B), clpz:(B in 0..1), freeze:freeze(B,queen_value_truth(C,N,B))
; false.
2020-04-30 18:10:09 +02:00
Mark Thom
f7b401b9b6
fix user:goal_expansion
2020-04-30 09:28:11 -06:00
Mark Thom
c342d18f92
Merge branch 'master' of https://github.com/mthom/rusty-wam
2020-04-30 00:01:12 -06:00
Mark Thom
e0e52a3090
fix 'drain lower bound was too large', store user-level expansions to modules ( #416 )
2020-04-30 00:01:00 -06:00
Mark Thom
6f92480315
Merge pull request #418 from notoria/mediants
...
Documentation for arithmetic.pl
2020-04-29 18:53:00 -03:00
notoria
490d008edf
Merge pull request #4 from triska/mediants
...
include library(arithmetic) in the overview
2020-04-29 23:48:07 +02:00
notoria
ccee17c573
Merge branch 'mediants' into mediants
2020-04-29 23:47:05 +02:00
Mark Thom
dd4832e40b
add ordsets.pl to README
2020-04-29 18:42:17 -03:00
Mark Thom
ff5b870a9f
Merge pull request #417 from notoria/mediants
...
Implemented predicate mediants/2 with Stern-Brocot tree
2020-04-29 18:33:35 -03:00
notoria
a371580201
Add rational_numerator_denominator/3, number_to_rational/2 and renamed stern_brocot/3 to number_to_rational/3
2020-04-29 23:30:14 +02:00
Markus Triska
b499c575bc
include library(arithmetic) in the overview
...
Many thanks to @notoria for these very useful predicates!
2020-04-29 22:06:49 +02:00