Constituent Structure

Control:
Program Flow


  1. Program Flow:

    Meta-level predicates that implement convenient program flow options.

  2. Constituent Structure:

    Predicates that are used to state universally and existentially-quantified conditions over constituent structure.

  3. Miscellaneous:

    Predicates that iterate over lists and feature sets.

  4. Parser Operations:

    Declaring parser operations.


Contents

General:
if
iff
ifDef


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 of arity n is defined.

Constituent Structure