home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH05EX10.PRO < prev    next >
Encoding:
Prolog Source  |  1990-03-26  |  465 b   |  25 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.    
  5. domains
  6.    name = symbol
  7.    gpa  = real
  8.  
  9. predicates
  10.    honor_student(name)
  11.    student(name, gpa)
  12.    probation(name)
  13.  
  14. clauses
  15.    honor_student(Name):- 
  16.       student(Name, GPA),
  17.       GPA>=3.5,
  18.       not(probation(Name)).
  19.  
  20.    student("Betty Blue", 3.5).
  21.    student("David Smith", 2.0).
  22.    student("John Johnson", 3.7).
  23.    probation("Betty Blue").
  24.    probation("David Smith").
  25.