Mark Thom
8df346f377
expand phrase/{2,3} using dcg_body whenever possible
2022-01-21 08:10:55 -07:00
Markus Triska
3e7cd24814
address #995 : wrong results for popcount/1
...
Many thanks to @notoria and @flexoron for very useful test cases!
2021-06-21 21:19:37 +02:00
Markus Triska
ee393c66dd
ADDED: popcount(+Integer)
...
Example:
?- X #= popcount(3+5).
X = 1.
This builds on #986 provided by @Regan-Koopmans. Many thanks!
2021-06-17 20:18:36 +02:00
Markus Triska
066f740819
check for correct domain of integers in reifiable expressions also in the expanded code
...
This is to preserve domain errors instead of failing silently. Example:
?- 5 #> 3 #<==> 2.
%@ caught: error(domain_error(clpz_reifiable_expression,2),unknown(2)-1)
2021-06-03 22:57:58 +02:00
Markus Triska
fc8d33a98a
ENHANCED: Goal expansion for reified constraints.
...
Used in package precautionary by @dcnorris.
2021-06-03 20:26:44 +02:00
Markus Triska
581e055359
FIXED: correct propagation of tuples_in/2 ( #929 )
...
Many thanks to @notoria for producing a very short test case.
2021-05-13 21:48:43 +02:00
Markus Triska
38db8d4e1a
FIXED: module qualification for between/3 in goal expansion ( #941 )
...
Many thanks to @dcnorris for reporting this issue!
2021-05-09 23:54:37 +02:00
Markus Triska
f56e2fc48e
remove rectractall/1 (built-in since 8188e3d0cf).
...
This resolves #899 .
2021-04-14 20:18:50 +02:00
Mark Thom
bc2d0191ff
Merge pull request #861 from notoria/mod
...
Small improvement for mod in CLP(Z)
2021-03-10 13:52:48 -07:00
notoria
93b835ae0d
Use functional notation in CLP(Z) for compatibility
2021-03-07 20:59:25 +01:00
notoria
aa2d57cf37
Implemented a propagator for xor in CLP(Z)
2021-03-07 18:52:10 +01:00
notoria
f6d4821a68
Small improvement for mod in CLP(Z)
2021-03-07 18:38:04 +01:00
Markus Triska
5b60c8aa7e
remove min_/3 and max_/3 which are also defined elsewhere
2021-03-02 19:59:57 +01:00
Markus Triska
aecbd0eda3
omit internal residual goals for global_cardinality/2
2021-02-25 23:12:36 +01:00
Markus Triska
2c1b7e3b14
remove unused attribute_goal/2
2021-02-25 23:12:36 +01:00
Markus Triska
a228e46a39
ENHANCED: Enable goal expansion for CLP(ℤ).
...
This is now possible since #445 is resolved.
2021-02-05 21:06:08 +01:00
Markus Triska
81913a5987
Revert "preliminary workaround for #788 "
...
This reverts commit 164b993064 ,
which was made obsolete by 75a52f032b .
2021-02-05 20:59:47 +01:00
Markus Triska
164b993064
preliminary workaround for #788
...
This change can be reverted once the issue is resolved.
2021-02-04 20:48:09 +01:00
Markus Triska
b96ff781bc
add meta_predicate declaration for must_succeed/1
2021-02-03 23:49:28 +01:00
Markus Triska
24e6c31c44
add meta_predicate declaration for with_local_attributes/3
...
This is needed for all_distinct/1 etc.
Example:
?- all_distinct([X,Y,Z]).
clpz:all_distinct([X,Y,Z])
; false.
2021-02-03 23:45:21 +01:00
Markus Triska
ae66e299e6
Use term expansion for generated predicates.
2021-02-03 15:21:39 -07:00
Markus Triska
41a751e7f5
ADDED: Provisional support for (#=)/3 and (#<)/3.
...
These predicates are intended for constructs from library(reif), such
as if_/3. For the time being, they are defined here. If you have any
recommendations or comments regarding the best location of these
predicates, or need more of them, please file an issue.
Suggested by @Qqwy in https://github.com/triska/clpz/issues/12 .
Many thanks!
2020-11-08 09:26:50 +01:00
notoria
0724c044d6
Use nonterminal fd_put//3 in mod from clpz
2020-08-15 17:56:07 +02:00
notoria
bed4afe74f
Simplified the code
2020-08-15 17:39:34 +02:00
notoria
d4263cc8b9
Using queue_goal//1 to correctly bind variables
2020-08-15 17:06:12 +02:00
notoria
b4b11465a1
Fixed variable bindings in mod from clpz
2020-08-15 13:37:33 +02:00
notoria
daaebc59cb
Made mod stronger and addressed #675
2020-08-15 12:53:28 +02:00
notoria
314baabf1d
More improvement on mod from CLP(Z)
2020-08-13 21:36:36 +02:00
notoria
a24fbb8f61
Improved mod in CLP(Z)
...
This is still a work in progress.
2020-08-13 10:33:36 +02:00
Mark Thom
33325f1574
remove vestigial prolog/ directory ( #444 )
2020-06-12 18:26:38 -06:00