
RULES

(Z1 IF
    (?animal has hair)
    THEN (?animal type is mammal))
(Z2 IF
    (?animal gives milk)
    THEN (?animal type is mammal))
(Z3 IF
    (?animal has feathers)
    THEN (?animal class is bird))
(Z4 IF
    (?animal flies)
    (?animal lays eggs)
    THEN (?animal class is bird))
(Z5 IF
    (?animal type is mammal)
    (?animal eats meat)
    THEN (?animal diet is carnivore))
(Z6 IF
    (?animal type is mammal)
    (?animal has pointed teeth)
    (?animal has claws)
    (?animal has forward-pointing eyes)
    THEN (?animal diet is carnivore))
(Z7 IF
    (?animal type is mammal)
    (?animal has hoofs)
    THEN (?animal class is ungulate))
(Z8 IF
    (?animal type is mammal)
    (?animal chews cud)
    THEN (?animal class is ungulate))
(Z9 IF
    (?animal diet is carnivore)
    (?animal has tawny color)
    (?animal has dark spots)
    THEN (?animal species is cheetah))
(Z10 IF
     (?animal diet is carnivore)
     (?animal has tawny color)
     (?animal has black stripes)
     THEN (?animal species is tiger))
(Z11 IF
     (?animal class is ungulate)
     (?animal has long neck)
     (?animal has long legs)
     (?animal has dark spots)
     THEN (?animal species is giraffe))
(Z12 IF
     (?animal class is ungulate)
     (?animal has black stripes)
     THEN (?animal species is zebra))
(Z13 IF
     (?animal class is a bird)
     (?animal does not fly)
     (?animal has long legs)
     (?animal has long neck)
     (?animal is black and white)
     THEN (?animal species is ostrich))
(Z14 IF
     (?animal class is bird)
     (?animal does not fly)
     (?animal swims)
     (?animal is black and white)
     THEN (?animal species is penguin))
(Z15 IF
     (?animal class is bird)
     (?animal flies well)
     THEN (?animal species is albatross))

CODE

(define (make-stretch)
  (clear-assertions)
  (remember-assertions
   '(Stretch has hair)
   '(Stretch chews cud)
   '(Stretch has long legs)
   '(Stretch has long neck)
   '(Stretch has tawny color)
   '(Stretch has dark spots))
  (display "Stretch's characteristics recorded:\n")
  (display-assertions))

(define (make-swifty)
  (clear-assertions)
  (remember-assertions
   '(Swifty has hair)
   '(Swifty has pointed teeth)
   '(Swifty has claws)
   '(Swifty has forward-pointing eyes)
   '(Swifty has tawny color)
   '(Swifty has dark spots))
  (display "Swifty's characteristics recorded:\n")
  (display-assertions))

(define (make-splashy)
  (clear-assertions)
  (remember-assertions
   '(Splashy has feathers)
   '(Splashy lays eggs)
   '(Splashy does not fly)
   '(Splashy is black and white)
   '(Splashy swims))
  (display "Splashy's characteristics recorded:\n")
  (display-assertions))

(define (make-sandy)
  (clear-assertions)
  (remember-assertions
   '(Sandy has long legs)
   '(Sandy has long neck)
   '(Sandy has feathers)
   '(Sandy lays eggs)
   '(Sandy does not fly)
   '(Sandy is black and white)
   '(Sandy swims))
  (display "Sandy's characteristics recorded:\n")
  (display-assertions))


(define (make-pumy)
  (clear-assertions)
  (remember-assertions
   '(Pumy has hair)
   '(Pumy has pointed teeth)
   '(Pumy has claws)
   '(Pumy has forward-pointing eyes)
   '(Pumy has tawny color))
  (display "Pumy's characteristics recorded:\n")
  (display-assertions))

