Previous Up Next

2.2  Common constraints

The constraints can be divided into the following groups:



Table 2.1: Supported constraints for various arithmetic solvers



Not all constraints are supported by all the solvers. For example, the eplex solver does not support any strict inequality constraints. Table 2.1 shows the constraints that are available from the various constraint solvers. In the table, a `yes' entry indicates that the particular constraint is supported by the particular solver. Note that some further restrictions may apply for a particular solver. For example, the eplex solver can only handle linear expressions. Refer to the documentation for each individual solver to see what restrictions might apply.

Note that the last line, labelled `arith', is not really a constraint solver but represents just the standard arithmetic tests which require all variables to be instantiated. This behaviour is provided by the (automatically imported) module eclipse_language.

It can be somewhat confusing that these standard arithmetic tests have the same names as the corresponding constraints. One one hand, they have the same declarative meaning. On the other hand, they are not really interchangeable because they can only be used as tests, not as active constraints. The following synonyms are therefore provided to make the distinction visible where needed, and to reduce the need for module-qualification:

$=/2 =:=/2
$\=/2 =\=/2
$>=/2 >=/2
$=</2 =</2
$>/2 >/2
$</2 </2



Previous Up Next