]> Repositorios git - scryer-prolog.git/commit
ADDED: CLP(ℤ), Constraint Logic Programming over Integers
authorMarkus Triska <[email protected]>
Sat, 4 Apr 2020 21:35:39 +0000 (23:35 +0200)
committerMarkus Triska <[email protected]>
Sun, 5 Apr 2020 23:59:41 +0000 (01:59 +0200)
commit8b1df2e9ca30bce8f26cfd9e93e58116b12579d0
treea96af36d1e80c3a4e7c22a823fdadfa065202dda
parent560298655b4bc6275771e364bd10b13521d6a642
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!
README.md
src/prolog/lib/clpz.pl [new file with mode: 0644]