Skip to main content

Conjunctive Expression

Syntax​

conjunct = disjunct ("AND" conjunct / .empty);
disjunct = negation ("OR" negation / .empty);
negation = "NOT" relation / relation;
relation =
'( conjunct ') /
sum (
"<=" sum /
">=" sum /
'< sum /
'> sum /
'= sum /
'" sum /
.empty);

The conjunct construct is rigged in such a way that a conjunct which is not a sum need not have a value, and may be evaluated using jumps in the code. Reference to the conjunct is made only in places where a logical decision is called for (e.g. if and while statements).

We hope that most compilers will be smart enough to skip unnecessary evaluations at run time. I.e a conjunct in which the left part is false or a disjunct with the left part true need not have the corresponding right part evaluated.