![]() ![]() ![]() |
![]() ![]() |
|
General: |
+G1 if +G2
|
Goal G1 must hold if goal G2 holds.
|
Example:
whInSyntax in_all_configurations CF where cat(CF,c2) then whCompFilter(CF) if whInSyntax.If the language parameter
whInSyntax
holds, the constraint
whCompFilter(CF)
must also hold. Otherwise, the constraint
is skipped.
Note:
The infix operator if
is defined to bind tighter than
",
" (or ";
"), but not "\+
".
Hence parentheses must be used if either goal contains a conjunction
or disjunction of goals.
+G1 iff +G2
|
If goal G1 holds, goal G2 must also
hold. Otherwise, G2 must not hold.
|
Example:
thetaCriterion in_all_configurations CF where thetaRelevant(CF) then thetaMarked(CF) iff lastInAChain(CF).If constituent
CF
is theta-marked, CF
must
be the last element in an A-Chain. However, when CF
is
not theta-marked, CF
cannot be the last element
in an A-Chain.
Implementation Note:
Care must be taken if either goal may be non-deterministic. The
predicate is non-deterministic if the goal G2
is
non-deterministic. However, iff
returns just one answer
when G2
succeeds only once - even if the goal
G1
is non-deterministic.
This limitation follows from the naive implementation used:
iff(X,Y) :- call(X), !, call(Y).
iff(_,Y) :- \+ call(Y).
ifDef(p(X1,..,Xn))
|
Goal p(X1,..,Xn) must hold if
predicate p |
![]() ![]() ![]() |