?Vars &:: +Domain- All elements of Vars have a value in the domain Domain
?X &= ?Y- X is the same atomic value as Y
&=(?X, ?Y, ?Bool)- Reified version of X &= Y
?X &\= ?Y- X is different from Y
&\=(?X, ?Y, ?Bool)- Reified version of X &\= Y
alldifferent(?List)- All elements of List are different
deleteff(-Min, +List, -Rest)- Pick minimum domain size element from a list (first fail principle)
get_domain_as_list(?Term, -List)- Retrieves the domain of a variable (or value) as a list of values
get_domain_size(?Term, -Size)- Gives the size of the domain of a variable (or value)
indomain(?X)- Nondeterministically instantiate to domain values
is_exact_solver_var(?Term)- The argument is a domain variable
is_solver_type(?Term)- The argument is a domain variable or atomic constant
is_solver_var(?Term)- The argument is a domain variable
labeling(+Term)- Instantiate all domain variables in a list to domain values
msg(?X, ?Y, -MSG)- MSG is the most specific generalisation of X and Y representable with domain variables from this library

struct sd(dom, any)- No description available

export op(700, xfx, [&::, &=, &\=])

This is a simple library implementing variables and constraints over atomic values. Its main purpose is for first experiments with constraint solving. Moreover, those interested in writing their own constraint solvers can use the source code of this library as a starting point.

?- X &:: [red, green, blue]. X = X{[blue, green, red]} Yes (0.00s cpu)A variable that has been given a domain can only be instantiated to values from this domain. Any attempt to instantiate the variable to a non-domain value will cause failure:

?- X &:: [red, green, blue], X = red. X = red Yes (0.00s cpu) ?- X &:: [red, green, blue], X = yellow. No (0.00s cpu)

- X &= Y
- X is the same as Y
- X &\= Y
- X is different from Y

- &=(X,Y,Bool)
- Bool is the truth value (0/1) of X &= Y
- &\=(X,Y,Bool)
- Bool is the truth value (0/1) of X &\= Y

- alldifferent(List)
- All list elements are different

- indomain(X)
- enumerate values of X
- labeling(Xs)
- enumerate values of all elements of list Xs

**Author:**Joachim Schimpf**Copyright ©**Cisco Systems, Inc.**Date:**$Date: 2017/09/28 22:54:49 $

Generated from sd.eci on 2017-10-25 11:22