Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defrule farbowanie
- ?i <- (osoba ?im blond ?ko)
- =>(retract ?i)
- (assert (osoba ?im czarne ?ko)))
- ;operacja zapisu na standardowe urzadzenie
- ;skladnia (printout t <arg1> <arg2> ...)
- ;t - arg. terminal (urzadzenie standardowe)
- ;<arg1>, <arg2> - parametry : stale,zmienne,wyrazenia,funkcje,predefiniowane (crlf)
- ;cykle
- (deffacts dane (lista a b))
- (defrule przestaw
- ?i <- (lista ?x ?y)
- => (retract ?i)
- (assert (nowa ?y ?x)))
- ;(defrule jeszcze
- ;?i <- (nowa ?a ?b)
- ;=> (retract ?i)
- ;(assert (;;;;lista ?b ?a)))
- ;ZMIENNE WIELOPOLOWE
- ;identyfikator
- ; $?<nazwa_symboliczna>
- ;przyklad
- (deffacts listy
- (lista a b c))
- ;(lista a b)
- ;(lista a)
- ;(lista))
- (defrule dowolna
- (lista $?cos1 $?cos2)
- => (printout t "zawiera: " $?cos1 $?cos2 crlf))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement