Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. (defrule searchRepeats
  2. (declare (salience 1000));
  3. ?tmpNode <- (Node
  4. (status 0)
  5. (id ?tId)
  6. )
  7. =>
  8. (assert (IdVF ?tId))
  9. )
  10. (defrule searchRepeatsCont
  11. (declare (salience 950));
  12. ?nId <- (IdVF ?tId)
  13. ?tmpNode <- (State
  14. (xy00 ?s00) (xy10 ?s10) (xy20 ?s20)
  15. (xy01 ?s01) (xy11 ?s11) (xy21 ?s21)
  16. (xy02 ?s02) (xy12 ?s12) (xy22 ?s22)
  17. (id ?tId))
  18. (State
  19. (xy00 ?s00) (xy10 ?s10) (xy20 ?s20)
  20. (xy01 ?s01) (xy11 ?s11) (xy21 ?s21)
  21. (xy02 ?s02) (xy12 ?s12) (xy22 ?s22)
  22. (status 2)
  23. )
  24. =>
  25. (retract ?tmpNode)
  26. (retract ?nId)
  27. )
  28.  
  29. (defrule searchRepeatEnd
  30. (declare (salience 800));
  31. ?nId <- (IdVF ?tId)
  32. ?tmpNode <- (State
  33. (id ?tId)
  34. )
  35. =>
  36. (modify ?tmpNode(status 1))
  37. (retract ?nId)
  38. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement