Advertisement
urbmal

SBC_lab3

Oct 18th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. ; (deffacts init
  2. ; (egal x 1)
  3. ; (egal y 1)
  4. ; (egal z 0)
  5. ; )
  6.  
  7.  
  8.  
  9.  
  10.  
  11. ; (defrule R1
  12. ; (egal x 0)
  13. ; (egal y 0)
  14. ; (egal z 0)
  15. ; =>
  16. ; (assert (f 0))
  17. ; (printout t "f este , " 0)
  18. ; )
  19.  
  20. ; (defrule R2
  21. ; (egal x 0)
  22. ; (egal y 0)
  23. ; (egal z 1)
  24. ; =>
  25. ; (assert (f 1))
  26. ; (printout t "f este" 1)
  27. ; )
  28.  
  29. ; (defrule R3
  30. ; (egal x 0)
  31. ; (egal y 1)
  32. ; (egal z 0)
  33. ; =>
  34. ; (assert (f 0))
  35. ; (printout t "f este" 0)
  36. ; )
  37.  
  38. ; (defrule R4
  39. ; (egal x 0)
  40. ; (egal y 1)
  41. ; (egal z 1)
  42. ; =>
  43. ; (assert (f 0))
  44. ; (printout t "f este" 0)
  45. ; )
  46.  
  47. ; (defrule R5
  48. ; (egal x 1)
  49. ; (egal y 0)
  50. ; (egal z 0)
  51. ; =>
  52. ; (assert (f 0))
  53. ; (printout t "f este" 0)
  54. ; )
  55.  
  56. ; (defrule R6
  57. ; (egal x 1)
  58. ; (egal y 0)
  59. ; (egal z 1)
  60. ; =>
  61. ; (assert (f 0))
  62. ; (printout t "f este" 0)
  63. ; )
  64.  
  65. ; (defrule R7
  66. ; (egal x 1)
  67. ; (egal y 1)
  68. ; (egal z 0)
  69. ; =>
  70. ; (assert (f 1))
  71. ; (printout t "f este" 1)
  72. ; )
  73. ; (defrule R8
  74. ; (egal x 1)
  75. ; (egal y 1)
  76. ; (egal z 1)
  77. ; =>
  78. ; (assert (f 0))
  79. ; (printout t "f este" 0)
  80. ; )
  81.  
  82.  
  83. ; (defrule R1
  84. ; (egal x 1)
  85. ; (egal S 0)
  86. ; =>
  87. ; (retract *)
  88. ; (assert (egal S 2))
  89. ; (printout t "S0 se duce in " S2)
  90. ; )
  91. ; (defrule R2
  92. ; (egal x 0)
  93. ; (egal S 0)
  94. ; =>
  95. ; (retract *)
  96. ; (assert (egal S 1))
  97. ; (printout t "S0 se duce in " S1)
  98. ; )
  99.  
  100. ; (defrule R3
  101. ; (egal x 0)
  102. ; (egal S 1)
  103. ; =>
  104. ; (retract *)
  105. ; (assert (egal S 1))
  106. ; (printout t "S1 se duce in " S1)
  107. ; )
  108. ; (defrule R4
  109. ; (egal x 1)
  110. ; (egal S 1)
  111. ; =>
  112. ; (retract *)
  113. ; (assert (egal S 0))
  114. ; (printout t "S1 se duce in " S0)
  115. ; )
  116. ; (defrule R5
  117. ; (egal x 0)
  118. ; (egal S 2)
  119. ; =>
  120. ; (retract *)
  121. ; (assert (egal S 3))
  122. ; (printout t "S2 se duce in " S3)
  123. ; )
  124. ; (defrule R6
  125. ; (egal x 1)
  126. ; (egal S 2)
  127. ; =>
  128. ; (retract *)
  129. ; (assert (egal S 2))
  130. ; (printout t "S2 se duce in " S2)
  131. ; )
  132. ; (defrule R7
  133. ; (egal x 0)
  134. ; (egal S 3)
  135. ; =>
  136. ; (retract *)
  137. ; (assert (egal S 3))
  138. ; (printout t "S3 se duce in " S3)
  139. ; )
  140. ; (defrule R8
  141. ; (egal x 1)
  142. ; (egal S 3)
  143. ; =>
  144. ; (retract *)
  145. ; (assert (egal S 0))
  146. ; (printout t "S3 se duce in " S0)
  147. ; )
  148. (defrule R4
  149. (este-in-stare-de-functiune calculatorul ?nume-calculator) =>
  150. (assert (poate fi utilizat ?nume-calculator) )
  151. (printout t "Gata de lucru " ?nume-calculator crlf ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement