egglog 3.0.0

egglog is a language that combines the benefits of equality saturation and datalog. It can be used for analysis, optimization, and synthesis of programs. It is the successor to the popular rust library egg.
Documentation
; Test that guard, or, and bool-!= work correctly together

; Basic bool-!= tests
(check (= (bool-!= 1 2) true))
(check (= (bool-!= 1 1) false))

; Basic or tests
(check (= (or true false) true))
(check (= (or false false) false))
(check (= (or false true) true))
(check (= (or true true) true))

; Varargs or
(check (= (or false false false) false))
(check (= (or false true false) true))
(check (= (or true true true) true))

; Single arg or
(check (= (or true) true))
(check (= (or false) false))

; guard with true should succeed
(check (guard true))

; Combined: guard with or and bool-!=
(check (guard (or (bool-!= 1 2))))
(check (guard (or (bool-!= 1 1) (bool-!= 2 3))))
(check (guard (or (bool-!= 1 2) (bool-!= 3 3))))

(check (guard (or (bool-!= 1 1) (bool-!= 2 1))))

(datatype Math
  (Add Math Math)
  (Mul Math Math)
  (Val i64))

(Val 1)
(Val 2)

;; with Math eclass it still works
(check (guard (or (bool-!= (Val 1) (Val 2)) (bool-!= (Val 1) (Val 1)))))

; guard with or of all-equal should fail
(fail (check (guard (or (bool-!= 1 1)))))
(fail (check (guard (or (bool-!= 1 1) (bool-!= 2 2)))))
(fail (check (guard false)))