Exercises.

  1. Define the relation niece-or-nephew in Prolog.

  2. Define the relation cousin in Prolog.

  3. Major Projects:
    Modify the interpreter to delay any negated atom until its variables are all bound (if ever).

    Add predicates `int' and `is' to Prolog-S. `int(N)' succeeds if and only if N is bound to an integer. `is(X,E)' or `X is E' succeeds if and only if E is an arithmetic expression containing only operators, numbers and variables bound to numbers and in that case X is unified with the expression's value.

    Use `int' and `is' to write a simplifier in Prolog to go with the symbolic differentiator.


[Previous Page] [Next Page] [Index] © L. Allison, Dept. Computer Science, Monash University