A.10 library(clpqr): Constraint Logic Programming over Rationals and Reals
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(clpqr): Constraint Logic Programming over Rationals and Reals
          • Solver predicates
          • Syntax of the predicate arguments
          • Use of unification
          • Non-linear constraints
          • Status and known problems
    • Packages

A.10.4 Non-linear constraints

The CLP(Q,R) system deals only passively with non-linear constraints. They remain in a passive state until certain conditions are satisfied. These conditions, which are called the isolation axioms, are given in table 11.
A = B * C B or C is groundA = 5 * C or A = B * 4
A and (B or C) are ground20 = 5 * C or 20 = B * 4
A = B / C C is groundA = B / 3
A and B are ground4 = 12 / C
X = min(Y,Z) Y and Z are groundX = min(4,3)
X = max(Y,Z) Y and Z are groundX = max(4,3)
X = abs(Y) Y is groundX = abs(-7)
X = pow(Y,Z) X and Y are ground8 = 2 ^ Z
X = exp(Y,Z) X and Z are ground8 = Y ^ 3
X = Y ^ Z Y and Z are groundX = 2 ^ 3
X = sin(Y) X is ground1 = sin(Y)
X = cos(Y) Y is groundX = sin(1.5707)
X = tan(Y)
Table 11 : CLP(Q,R) isolating axioms