next up previous
Next: What to do? Up: The intersection of a Previous: The intersection of a

Undecidability

This confronts us with an undecidability problem: the recognition problem for DCGs is undecidable. A fortiori the problem of deciding whether the intersection of a FSA and a DCG is empty or not is undecidable.

In the case of parsing, this undecidability result is usually circumvented by considering subsets of DCGs which can be recognized effectively. For example, we can restrict the attention to DCGs of which the context-free skeleton does not contain cycles. Recognition for such `off-line parsable' grammars is decidable.

Most existing constraint-based parsing algorithms will terminate for grammars that exhibit the property that for each string there is only a finite number of possible derivations. Note that off-line parsability is one possible way of ensuring that this is the case.

This observation is not very helpful in establishing insights concerning interesting subclasses of DCGs for which termination can be guaranteed (in the case of FSA input). The reason is that there are now two sources of recursion: in the DCG and in the FSA (cycles). As we saw earlier: even for CFG it holds that there can be an infinite number of analyses for a given FSA (but in the CFG this of course does not imply undecidability). In the appendix we give a simple proof that the question whether the intersection of a FSA and an off-line parsable DCG is empty or not is undecidable.


next up previous
Next: What to do? Up: The intersection of a Previous: The intersection of a
Noord G.J.M. van
1998-09-29