boolean.rlg 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Sun Aug 18 16:26:59 2002 run on Windows
  2. % Test series for the boolean package.
  3. boolean true;
  4. 1
  5. boolean false;
  6. 0
  7. boolean (true and false);
  8. 0
  9. boolean (true or false);
  10. 1
  11. boolean (x and true);
  12. x
  13. boolean (x and false);
  14. 0
  15. boolean (x or true);
  16. 1
  17. boolean (x or false);
  18. x
  19. boolean (not(x and y));
  20. boolean(not(x) \/ not(y))
  21. boolean (not(x or y));
  22. boolean(not(x)/\not(y))
  23. boolean (x or y or(x and y));
  24. boolean(x \/ y)
  25. boolean (x and y and (x or y));
  26. boolean(x/\y)
  27. boolean (x or (not x));
  28. 1
  29. boolean (x and (not x));
  30. 0
  31. boolean (x and y or not x);
  32. boolean(not(x) \/ y)
  33. boolean (a and b implies c and d);
  34. boolean(not(a) \/ not(b) \/ c/\d)
  35. boolean (a and b implies c and d, and);
  36. boolean((not(a) \/ not(b) \/ c)/\(not(a) \/ not(b) \/ d))
  37. boolean (a or b implies c or d);
  38. boolean(not(a)/\not(b) \/ c \/ d)
  39. boolean (a or b implies c or d, and,full);
  40. boolean((a \/ not(b) \/ c \/ d)/\(not(a) \/ b \/ c \/ d)
  41. /\(not(a) \/ not(b) \/ c \/ d))
  42. operator >;
  43. fm:=boolean(x>v or not (u>v));
  44. fm := boolean(not(u>v) \/ x>v)
  45. v:=10;
  46. v := 10
  47. testbool fm;
  48. boolean(not(u>10) \/ x>10)
  49. x:=3;
  50. x := 3
  51. testbool fm;
  52. boolean(not(u>10))
  53. clear x;
  54. x:=17;
  55. x := 17
  56. testbool fm;
  57. 1
  58. clear v,x;
  59. end;
  60. Time for test: 491 ms