next up previous contents
Next: The Algorithm Up: Generation Previous: Generation   Contents

The semantics/1 Directive

ALE identifies this part using a user-defined directive, semantics/1. This directive distinguishes a binary user-defined definite clause predicate as the predicate to use to find semantic information. The first argument is always the feature structure whose semantics are being identified; and the second argument is always the semantic information. The example below, taken again from the sample generation grammar, simply says that the semantics of a feature structure is the value of its sem feature:


  semantics sem1.
  sem1(sem:S,S) if true.

In general, the second argument does not need to be a sub-structure of the first -- it could have a special type that is used only for the purpose of collecting semantic information, possibly spread over several unrelated sub-structures. The body can be arbitrarily complex; and there can be multiple clauses for the definition of this predicate. The predicate must, however, have the property that it will terminate when only its first argument is instantiated, and when only its second argument is instantiated. ALE will use this predicate in both ``directions'' -- to find semantics information, and in reverse to build templates to find structures that have matching semantic information. There can be only one predicate distinguished by semantics/1. If there are multiple directives, ALE will only use the first.


next up previous contents
Next: The Algorithm Up: Generation Previous: Generation   Contents
Detmar Meurers
2001-03-03