next up previous contents
Next: Procedural Semantics Up: Adding definite relations Previous: Definite clauses of ()

$ \cal {R}$($ \cal {L}$)-grammars

The formalism defined so far will be used in this thesis in two ways. Firstly I use the formalism to define grammars with. However, I also use the formalism to define meta-interpreters in. This will become clear in the next section. To separate these two usages, I define a grammar as follows. Without loss of generality I restrict a grammar G to consist of definite clauses defining only one unary relation. Restricting grammars to consist of only one relation enables us to distinguish between truly recursive relations and relations that could (at least in principle) be compiled away by partial evaluation techniques. I assume e.g. that the usual templates known from PATR II are already compiled out in such a grammar. As an example of partial evaluation, observe that the following definite clause specification:

\pr\pred
\head{\mbox{\it p}(\mbox{\rm X}) \mbox{\tt :-}}
\body{\mbox{\rm X} \dot...
...x{\rm a},}
\body{\mbox{\rm X} \mbox{\it l}_{2} \doteq \mbox{\rm b}.}
\epred\epr
can automatically be compiled into the following equivalent specification, where the `effect' of the predicate q/1 is obtained in the predicate p/1 directly:

\pr\pred
\head{\mbox{\it p}(\mbox{\rm X}) \mbox{\tt :-}}
\body{\mbox{\rm X} \dot...
...{\it l}_{2} \doteq \mbox{\rm b},}
\body{\mbox{\it p}(\mbox{\rm T}).}
\epred\epr

In monolingual grammars, the privileged relation will be called `sign', as I think of this relation as defining the possible (linguistic) signs.

Note that any set of $ \cal {R}$($ \cal {L}$)-definite clauses can be rewritten as a grammar of $ \cal {R}$($ \cal {L}$), by `reification'; for example the following example set of clauses, consisting of several relations

\pr\pred
\head{\mbox{\it p}(\mbox{\rm X}) \mbox{\tt :-} \phi_1.}
\head{\mbox{\it...
...m Y}) \mbox{\tt :-} \mbox{\it q}(\mbox{\rm Y},\mbox{\rm Z}),\phi_4.}
\epred\epr
is rewritten into the following, using the attributes rel,arg1,arg2 to represent the relation symbol and the arguments:

\pr\pred
\head{\mbox{\it sign}(\mbox{\rm P}) \mbox{\tt :-}}
\body{ \mbox{\rm P}~...
...,}
\body{ \mbox{\rm Q}~\mbox{\it arg1} \doteq \mbox{\rm X} ,\phi_4.}
\epred\epr

Before I continue to define the procedural semantics of $ \cal {R}$($ \cal {L}$) in the next section, I will first introduce some notational conveniences as follows. Using the matrix representation introduced above, I often leave out the constraints in a definite clause, and instead replace the variables in the clause with the matrix notation of the equations constraining that variable. Moreover, if the predicate symbol of an atom is sign/1 then I sometimes leave the predicate symbol out; hence

\prn\pred
\head{\mbox{\it sign}(\mbox{\rm X}_{0}) \mbox{\tt :-} \mbox{\it sign}(\mbox{\rm X}_{1}), \dots \mbox{\it sign}(\mbox{\rm X}_{n}), \phi.}
\epred\eprn
may be written simply as:

\prn\pred
\head{\mbox{\rm M}_{0} \mbox{\tt :-} \mbox{\rm M}_{1} \dots \mbox{\rm M}_{n}.}
\epred\eprn
where Mi are the matrices defining the constraints on Xi. For example, the rule

\prn\pred
\head{\mbox{\it sign}(\mbox{\rm X}_{0}) \mbox{\tt :-}}
\body{ \mbox{\i...
...{\it agr} \doteq \mbox{\rm X}_{2}~ \mbox{\it syn}~ \mbox{\it agr}.}
\epred\eprn
is written:

\prn\pred
\head{\mbox{\it sign}(\avm{ \mbox{\it syn} : \avm{ \mbox{\it cat} : \m...
...{\it cat} : \mbox{\rm vp} \\ \mbox{\it agr} : \mbox{\rm Agr} } }).}
\epred\eprn


next up previous contents
Next: Procedural Semantics Up: Adding definite relations Previous: Definite clauses of ()
Noord G.J.M. van
1998-09-30