next up previous
Next: Further issues Up: Delayed Evaluation of Lexical Previous: Lexical Rules as Binary

Delayed Evaluation of Lexical Rules

This definition, as it stands, is not very helpful in applying delayed evaluation techniques. For example, if we delay the application of certain specific lexical rules, then the recursive predicate lexical_rules/2 can be applied `ad inf'. On the other hand, if we delay the application of lexical_rules/2 itself, then we have no idea under what conditions application of this predicate should be allowed.

If we assume that for each lexical rule we know the conditions under which it can be fired, then we can solve this problem by automatic program transformations. The details of this transformation will be presented in the final version of the paper. The transformation is exemplified in the figures 1 and 2. We use the SICStus Prolog predicate when(Cond,Goal) to indicate under which conditions Cond a goal Goal can be evaluated.

Figure 1: Program before transformation, consisting of three lexical rules. The DCG formalism is extended with the `append' constraint. The constraint A*B stands for the value C such that the (standard) relation append (A, B, C) is true. This relation is also evaluated in a lazy way.
\begin{figure}
\small\begin{verbatim}lexical_rules(C,C).
lexical_rules(Lex,Surf)...
...c,Slash), v([np\vert Sc],Slash)). % subject\end{verbatim}\normalsize\end{figure}

Figure 2: Program after transformation.
\begin{figure}
\small\begin{verbatim}lexical_rules(C,C).
lexical_rules(Lex,Surf)...
...- % subject
lexical_rules(Lex,v(Sc,Slash)).\end{verbatim}\normalsize\end{figure}


next up previous
Next: Further issues Up: Delayed Evaluation of Lexical Previous: Lexical Rules as Binary
Noord G.J.M. van
1998-09-29