I try to run datalog file (test.dl, from http://rise4fun.com/Z3/tutorialcontent/fixedpoints#h21) as following in Z3 (version:4.3.2).
(set-option :fixedpoint.engine datalog)
(define-sort s () (_ BitVec 3))
(declare-rel edge (s s))
(declare-rel path (s s))
(declare-var a s)
(declare-var b s)
(declare-var c s)
(rule (=> (edge a b) (path a b)))
(rule (=> (and (path a b) (path b c)) (path a c)))
(rule (edge #b001 #b010))
(rule (edge #b001 #b011))
(rule (edge #b010 #b100))
(query (path #b001 #b100))
(query (path #b011 #b100))
(query (path #b001 b)
:print-answer true)
Use the command z3 test.dl
, but there is erorr msg:
Can someone help how to run the datalog file?
Thanks.