Evaluating atoms
An atom is either
- a predicate atom (a predicate applied to expressions, like
even(N)), or - a comparison of two expressions (
=,!=,<,>,<=,>=).
They differ in how they are evaluated:
- A predicate atom is matched against that predicate’s relation: variables are bound to the matching values, while constants and the don’t-care
_only filter.num(N)→N ∈ {1, 2, 3, 4, 5, 6}even(N)→N ∈ {2, 4, 6}divisor(_, 6)succeeds,divisor(_, 5)fails;_and the constant bind nothing
- A comparison is a test on already-bound values:
D > 1holds exactly whenDexceeds 1.