Prolog Language Monotonicity Monotonic alternatives for non-monotonic constructs


Here are examples of how to use monotonic predicates instead of impure, non-monotonic constructs in your programs:

  • dif/2 is meant to be used instead of non-monotonic constructs like (\=)/2
  • arithmetic constraints (CLP(FD), CLP(Q) and others) are meant to be used instead of moded arithmetic predicates
  • !/0 almost always leads to non-monotonic programs and should be avoided entirely.
  • instantiation errors can be raised in situations where you cannot make a sound decision at this point in time.