The numerous repos for minikanren with SMT are dazzling. This repo tries to document them and get a minimal running version with annotated examples.
z3
(I tested this with z3 4.11.0 & 4.13.0), need to add z3
to PATH.
I tested with Chez Scheme.
Open Chez Scheme REPL do the following:
(load "mk.scm")
(load "smt.scm")
(load "z3-driver.scm") ;; or (load "cvc5-driver.scm")
(load "test-check.scm")
(test "basic-1"
(run* (q)
(z/assert `(> ,q 0))
(z/assert `(< ,q 2)))
'(1))
You can also load talk.scm
to see more tests.
-
currently I used the
mk-vicare.scm
mk.scm
smt.scm
from the faster minikanrensmt
branch, butmk.scm
in clpsmt-minikanren and thesmt-assumptoin
branches usingcheck-sat-assuming
might also do the work (and might be faster). Experiment with those (probably also have something uniform to compare run time stats). -
have a racket wrapper? I seems to have better support for timeouts. I commented out some tests in
talk.scm
since cvc5 will timeout on those examples. (commented with "cvc5 too slow") -
include/document more tests. The Rosette repo has some good ones. Barliman also have some use cases for synthesis (see the branches with
smt
) -
For future directions, Nada made a nice list of future directions
This issue namin/clpsmt-miniKanren#9
smt
branch from Nada https://github.com/namin/faster-miniKanren/tree/smtsmt-assumptions
branches mentioned by Siyuan https://github.com/namin/faster-miniKanren/tree/smt-assumptionssmt-assumptions
updated by Siyuan https://github.com/namin/faster-miniKanren/tree/smt-assumptions-full-integration
- ClojuTRE 2018 https://youtu.be/KsC_9_-NuQg?si=99QwgyuFXxYspUs2
- Minikanren Workshop 2021 Keynote https://youtu.be/owBoKpJ56Fk?si=E5GoevinXsNPWkA3