CST 3170 Home Page The Prior Page The Next Page
Middlesex Logo

Lab 7: Logic

  1. We're going to play with prolog today.
  2. There is an online prolog interpretter here .
  3. I also used the sytnax from a prolog wiki .
  4. Type in queries in the bottom right window (e.g. writeln(hello).)
  5. Write code in the left window (after create a new program).
  6. Try canary(tweety).
  7. You can look at examples too.
  8. Let's do an animal ontolgy.
  9. Make some animals, and make an subcategorisation hierarchy (e.g. dogs are canines and canines mammals).
  10. Make some queries.
  11. Use and (the operator). (I did it using things like adult and puppy).
  12. Try to add features like feathers and fur.
  13. Can you use not?
  14. Can you override inheritence (birds fly, but ostriches don't)?