mirror of
https://github.com/hatoo/egglog-language-server.git
synced 2025-12-23 04:36:33 +00:00
20 lines
296 B
Text
20 lines
296 B
Text
(relation path (i64 i64))
|
|
(relation edge (i64 i64))
|
|
|
|
(rule ((edge x y))
|
|
((path x y)))
|
|
|
|
(rule ((path x y) (edge y z))
|
|
((path x z)))
|
|
|
|
(edge 1 2)
|
|
(edge 2 3)
|
|
(edge 3 4)
|
|
(check (edge 1 2))
|
|
(fail (check (path 1 2)))
|
|
|
|
(run 8)
|
|
|
|
(print-table path)
|
|
(check (path 1 4))
|
|
(fail (check (path 4 1)))
|