Modifiers
Modifiers are optional and alter an relations’ behavior in some way. Currently, there are two following modifiers, which can be chained together:
Special Modifier
The special modifier changes the relation’s behavior depending on its predicate name. We can utilize the following special predicates:
Relation.special.alldiff
A special relation with the
alldiff
predicate ensures that its terms (logic variables) are substituted for different values (unique values). It’s also possible to use...
in place of terms, which is substituted for all variables declared in the current rule - no variable declared in the rule can be substituted for the same value simultaneously.
Relation.special.alldiff(Var.X, Var.Y) # Var.X cannot equal to Var.Y
# Var.X != Var.Y != Var.Z
Relation.h(Var.X) <= (Relation.b(Var.Y, Var.Z), Relation.special.alldiff(...))
Relation.special.next
Relation.special.anypred
Relation.special._in
Relation.special.maxcard
Relation.special.true
Relation.special.false
Relation.special.neq
Relation.special.leq
Relation.special.geq
Relation.special.lt
Relation.special.gt
Relation.special.eq
Relation.special.add
Relation.special.sub
Relation.special.mod