Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;(deffacts init (este_student Popescu)
- ; (este_student Ionescu) )
- ; (deffacts relatii-rudenie
- ; (tatal-lui Ion este Mihai)
- ; (tatal-lui Vasile este Mihai)
- ; (tatal-lui Mihai este Andrei)
- ; (tatal-lui Gh este 10)
- ; (tatal-lui Maria este 10)
- ; (tatal-lui 10 este 20)
- ; (tatal-lui Ion este Ion) )
- (deffacts R8-test
- (tatal-lui Ion este Vasile daca x1)
- (tatal-lui Ion este Vasile daca x2)
- )
- ;(defrule R1
- ; (este_student ?nume)
- ; =>
- ; (assert (a terminat liceul ?nume))
- ; (printout t "☻☻☻☻☻☻" crlf)
- ;)
- ;(defrule R2
- ; (este_student ?nume)
- ; =>
- ; (assert (a terminat Ficeul ?nume))
- ; (printout t "+++++++" crlf)
- ;)
- ;(defrule R7
- ; (tatal-lui ?copil este ?tata)
- ; (tatal-lui ?tata este ?bunic)
- ; =>
- ; (printout t “Bunicul lui ” ?copil “este” ?bunic crlf)
- ; )
- (defrule R8
- (tatal-lui ?copil este ?tata daca ?)
- (tatal-lui ?copil este ?tata daca ?)
- =>
- (printout t "Bunicul lui " ?copil "este" ?tata crlf)
- )
- (defrule R11
- ?a <- (a ?x)
- ?b <- (b ?y ?x)
- =>
- (retract ?a ?b) (printout t ?x " " ?y crlf)
- )
Advertisement
Add Comment
Please, Sign In to add comment