next up previous
Next: 10. ANSWERS TO EXERCISES. Up: SNePS: AN INTERACTIVE APPROACH Previous: 8. PROGRAMMING PROJECT #1.

9. PROGRAMMING PROJECT #2.

(This project was written by Deepak Kumar.)

  1. Design appropriate SNePS representations for representing the following kinds of facts:
    A fish is an animal.
    A bird is an animal.
    A fish has gills.
    A fish swims.
    A bird flies.
    etc.

  2. Create a set of facts representing a hierarchy of animals. (See the sample below for a possible hierarchy.)

  3. Design queries that will enable a retrieval of the set of facts represented. For example:
    What is a fish?
    Is a fish an animal?
    Does a fish swim?
    etc.

  4. Specify, in your report, the syntax and the interpretation of all the case frames. When printing a demo, you should suppress the inference trace. You can suppress the inference trace using the following at the SNePS prompt:

    ^ (setf *infertrace* nil)
    

  5. Enter the following facts and queries in order and show the resulting output:

    Mammals are animals.
    Humans are mammals.
    Socrates is human.
    Deepak is human.

    Dogs are mammals.
    Collies are dogs.
    Rover is a collie.
    Beagles are dogs.
    Snoopy is a beagle.

    Birds are animals.
    Canaries are birds.
    Tweety is a canary.
    Parrots are birds.
    Polly is a parrot.

    Dogs have canines.
    Mammals have hair.
    Dogs bite.
    Birds fly.
    Birds have feathers.
    Humans are biped.
    Humans walk.

    Who are all the animals?
    Who are all the mammals?
    Who are all the birds.
    Who bites?
    Does Rover bite?
    Who walks?
    Who has hair?
    Does Polly have hair?
    Does Snoopy have hair?
    Who is what?
    Who does what?
    Who has what?


next up previous
Next: 10. ANSWERS TO EXERCISES. Up: SNePS: AN INTERACTIVE APPROACH Previous: 8. PROGRAMMING PROJECT #1.
William J. Rapaport 2003-09-22