52 349 Logic Programming

Practical 3 - Addendum


As explained at the relevant lecture, these apparently simple questions rapidly increase in difficulty. As with other practical questions, you do not need to do them all, but you should certainly be happy with the principles involved.

  1. Test and/or explain the interplay between the Prolog interpreter and the D.C.G syntactic sugar -->.

  2. A good grammar should accept as many syntactically correct sentences as possible, but should not admit any false sentences.

    Construct and test grammars which will accept the sentences:

    1. paper wraps stone.
      stone blunts scissors.

    2. the old paper wraps the mossy stone.
      the old stone blunts the new scissors.

    3. Sentences (a) and (b).

    4. scissors cut paper.
      scissors blunt quickly.

    5. Sentences (a), (b) and (d).

  3. If you have survived those, then how about the following (and its relatives):

    the paper does wrap the stone.

    ("does wrap" is a straight-forward present tense; it is most easily handled in the context of using an auxilliary verb "to do" with the infinitive form "to wrap").

    And if that's okay, then how about questions like:

    does the paper wrap the stone?

  4. Even more nastily, how would you deal with the difficulty of "a new something" but "an old something"?


© Paul Goldfinch 1996 Return to 52 349 Menu