I would like to bring people’s attention to the following ongoing project:
https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-extsolve-z3
The basic idea is to use Z3 (https://github.com/Z3Prover/z3) to solve the
constraints generated
during ATS2-typechecking. I want to first thank Will Blair for his piloting
work on this project. For more,
please visit:
http://www.illtyped.com/projects/patsolve/
The Makefile in the following directory shows how to export constraints
generated during typechecking
a program in ATS:
https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-extsolve-z3/TEST
Basically, it goes like this:
patsopt -tc --constraint-export -o foo_dats_constraint.json -d foo.dats
for exporting the generated constraints. And the exported constraints can
be solved like this:
patsolve_z3 -i foo_dats_constraint.json
where patsolve_z3 is the main command generated from compiling the
ATS-extsolve-z3 project.
Patsolve_z3 starts to be functioning as of now. However, this is really
just the very beginning and
there will be a lot more coming gradually. With Z3, ATS is expected to
reach a much higher level
in terms of program verification.
Cheers!
–Hongwei