SaveText.Ru

Без имени
  1. domains
  2. S=symbol
  3. predicates
  4. male(S)
  5. female(S)
  6. parents(S,S,S)
  7. brothers(S,S)
  8. clauses
  9. male("Alex").
  10. male("Vitaliy").
  11. female("Mariya"). female("Diane").
  12. parents("Vitaliy","Alex","Mariya").
  13. parents("Diane","Alex","Mariya").
  14. brothers(Brother, N):-  
  15.     parents(N,Father,Mother),
  16.     parents(Brother,Father,Mother),
  17.     male(Brother).  
  18. %brothers(Brother, "Diane")
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. domains
  28. S=symbol
  29. predicates
  30. male(S)
  31. parents(S,S,S)
  32. brothers(S,S)
  33. clauses
  34. male("Alexander").
  35. male("Evgeniy"). male("Svyatoslav"). male("Serega"). male("Stasyan"). male("Rostislav"). male("Jeka").
  36. parents("Alexander","Vasiliy","Mariya").
  37. parents("Rostislav","Sofia","Evgeniy").
  38. parents("Jeka","Rostislav","Lena").
  39. parents("Svyatoslav","Valeriya","Alexander").
  40. parents("Serega","Valeriya","Alexander").
  41. parents("Stasyan","Serega","Yuliya").
  42. brothers(Brother, N):-  
  43.     parents(N,Father,Mother),
  44.     parents(Brother,Father,Mother),
  45.     male(Brother).  
  46. %brothers(Brother, "Diane")
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. domains
  56. S=symbol
  57. predicates
  58. male(S)
  59. parents(S,S,S)
  60. brothers(S,S)
  61. clauses
  62. male("Alexander").
  63. male("Evgeniy"). male("Svyatoslav"). male("Serega"). male("Stasyan"). male("Rostislav"). male("Jeka").
  64. parents("Vasiliy","Aleksander").
  65. parents("Mariya","Aleksander").
  66.  
  67. parents("Alexander","Vasiliy","Mariya").
  68. parents("Rostislav","Sofia","Evgeniy").
  69. parents("Jeka","Rostislav","Lena").
  70. parents("Svyatoslav","Valeriya","Alexander").
  71. parents("Serega","Valeriya","Alexander").
  72. parents("Stasyan","Serega","Yuliya").
  73. brothers(Brother, N):-  
  74.     parents(N,Father,Mother),
  75.     parents(Brother,Father,Mother),
  76.     male(Brother).  
  77. %brothers(Brother, "Diane")

Share with your friends:

Print