Adytzu04

SBC Clips L3

Oct 28th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. ;(deffacts init (este_student Popescu)
  2. ; (este_student Ionescu) )
  3. ; (deffacts relatii-rudenie
  4. ; (tatal-lui Ion este Mihai)
  5. ; (tatal-lui Vasile este Mihai)
  6. ; (tatal-lui Mihai este Andrei)
  7. ; (tatal-lui Gh este 10)
  8. ; (tatal-lui Maria este 10)
  9. ; (tatal-lui 10 este 20)
  10. ; (tatal-lui Ion este Ion) )
  11.  
  12. (deffacts R8-test
  13. (tatal-lui Ion este Vasile daca x1)
  14. (tatal-lui Ion este Vasile daca x2)
  15. )
  16.  
  17. ;(defrule R1
  18. ; (este_student ?nume)
  19. ; =>
  20. ; (assert (a terminat liceul ?nume))
  21. ; (printout t "☻☻☻☻☻☻" crlf)
  22. ;)
  23.  
  24. ;(defrule R2
  25. ; (este_student ?nume)
  26. ; =>
  27. ; (assert (a terminat Ficeul ?nume))
  28. ; (printout t "+++++++" crlf)
  29. ;)
  30.  
  31. ;(defrule R7
  32. ; (tatal-lui ?copil este ?tata)
  33. ; (tatal-lui ?tata este ?bunic)
  34. ; =>
  35. ; (printout t “Bunicul lui ” ?copil “este” ?bunic crlf)
  36. ; )
  37.  
  38. (defrule R8
  39. (tatal-lui ?copil este ?tata daca ?)
  40. (tatal-lui ?copil este ?tata daca ?)
  41. =>
  42. (printout t "Bunicul lui " ?copil "este" ?tata crlf)
  43. )
  44.  
  45. (defrule R11
  46. ?a <- (a ?x)
  47. ?b <- (b ?y ?x)
  48. =>
  49. (retract ?a ?b) (printout t ?x " " ?y crlf)
  50. )
Advertisement
Add Comment
Please, Sign In to add comment