- RCaml: A refinement type checking and inference tool for OCaml
- EffCaml: A transformation-based verifier for effectful OCaml programs
- MuVal: A fixpoint logic validity checker based on predicate constraint solving
- MuCyc: A fixpoint logic validity checker based on cyclic-proof search and proof refinement
- MuStrat: A fixpoint logic validity checker based on strategy synthesis
- PCSat: A predicate constraint solver based on CEGIS
- OptPCSat: An optimizing CHC solver based on predicate constraint solving
- HOMCSat: A SAT/QSAT/DQSAT/HOSAT solver based on higher-order model checking
An overview of the fixed-point logic solvers MuVal, MuStrat, and MuCyc for
- Install opam2 (see the official webpage).
- Install ocaml-5.4.0:
opam switch create 5.4.0
- Install dune:
opam install dune
- Install required packages:
(You may also need to install
opam install . --deps-onlylibblas-dev,liblapack-dev,libmpfr-dev,libgmp-dev,libglpk-dev,libffi-dev, andpkg-config) - Build:
dune build main.exe
- Run:
./_build/default/main.exe -c <config_file> -p <problem_type> <target_file>
- Build & Run:
dune exec main -- -c <config_file> -p <problem_type> <target_file>
- Document generation (to
_build/default/_doc/_html):opam install odoc dune build @doc
corecore_unixdomainslibmenhirppx_deriving_yojsonocaml-compiler-libsocamlgraphzarithz3minisatlibsvmwith some modification (https://github.com/hiroshi-unno/libsvm-ocaml.git)camlzip
hoice(https://github.com/hopv/hoice)clang(https://clang.llvm.org/)llvm2kittel(https://github.com/addmai/llvm2kittel/tree/termcomp2025)ltl3ba(https://sourceforge.net/projects/ltl3ba/)horsat2(https://github.com/hopv/horsat2)polyqent(https://github.com/ChatterjeeGroup-ISTA/polyqent)optimathsat(https://optimathsat.disi.unitn.it/)
docker pull ghcr.io/hiroshi-unno/coar:mainor
sudo docker build -t coar ../_build/default/main.exe -c ./config/solver/dbg_rcaml_pcsat_tbq_ar.json -p ml ./benchmarks/OCaml/safety/simple/sum.ml./_build/default/main.exe -c ./config/solver/dbg_rcaml_wopp_gspacer.json -p ml ./benchmarks/OCaml/safety/simple/sum.ml./_build/default/main.exe -c ./config/solver/dbg_rcaml_wopp_spacer.json -p ml ./benchmarks/OCaml/safety/simple/sum.ml./_build/default/main.exe -c ./config/solver/dbg_rcaml_temp_eff_pcsat_tbq_ar.json -p ml ./benchmarks/OCaml/temporal/sum_term.mlBuild horsat2 and place it in the current directory.
./_build/default/main.exe -c ./config/solver/dbg_effcaml.json -p ml ./benchmarks/OCaml/oopsla24/mutable_set_not_b_false_UNSAT.mlBuild ltl3ba and place it in the current directory.
./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_exc_tbq_ar.json -p cltl ./benchmarks/C/cav2015ltl/coolant/coolant_basis_1_safe_sfty.cPlease download and use the benchmark set of Ultimate LTL Automizer.
./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_exc_tbq_ar.json -p cctl ./benchmarks/C/pldi2013ctl/industrial/1-acqrel-AGimpAF-succeed.cPlease obtain and use the benchmark set from the following paper:
- Byron Cook and Eric Koskinen. Reasoning about nondeterminism in programs. PLDI 2013.
./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_exc_tbq_ar.json -p ltsterm ./benchmarks/LTS/simple/test.t2./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_exc_tbq_ar.json -p ltsnterm ./benchmarks/LTS/simple/test.t2./_build/default/main.exe -c ./config/solver/muval_prove_tbq_ar.json -p ltsterminter ./benchmarks/LTS/simple/prog2.t2The following interaction example demonstrates conditional termination analysis, which proves that the program prog2.c terminates when the initial value of the variable x is 9 or less, and diverges otherwise.
timeout in sec: 10
action (primal/dual/unknown/pos/neg/end): primal
v0 <= 8 /\ v0 >= 2
action (primal/dual/unknown/pos/neg/end): primal
1 > v0 \/ v0 <= 8 /\ v0 >= 2
action (primal/dual/unknown/pos/neg/end): primal
v0 <= 9 /\ v0 > 8 \/ 1 > v0 \/ v0 <= 8 /\ v0 >= 2
action (primal/dual/unknown/pos/neg/end): dual
v0 mod 2 != 0 /\ v0 >= 10
action (primal/dual/unknown/pos/neg/end): dual
v0 >= 10
action (primal/dual/unknown/pos/neg/end): primal
v0 <= 9
maximality is guaranteed
Here, the primal (resp. dual) action lets MuVal infer a precondition under which the program terminates (resp. diverges), but note that MuVal does not necessarily return the weakest precondition. By repeating sets of primal and dual actions, it is finally proved that the program terminates if and only if the initial value of the variable x is 9 or less.
Predicate Constraint Satisfiability Checking (CHC, $\forall\exists$ CHC, pCSP, and pfwnCSP) using PCSat
./_build/default/main.exe -c ./config/solver/dbg_pcsat_tbq_ar.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/dbg_pcsat_tbq_ar.json -p pcsp ./benchmarks/AECHC/bar.smt2./_build/default/main.exe -c ./config/solver/dbg_pcsat_tbq_ar.json -p pcsp ./benchmarks/pfwnCSP/simple/max.clpgit submodule update --init benchmarks/sygus-comp/
./_build/default/main.exe -c ./config/solver/dbg_pcsat_tbq_ar.json -p sygus ./benchmarks/sygus-comp/comp/2017/CLIA_Track/fg_max2.sl./_build/default/main.exe -c ./config/solver/dbg_pcsat_tbq_ar.json -p pcsp ./benchmarks/SyGuS/regex/ex1.smt2./_build/default/main.exe -c ./config/solver/dbg_optpcsat_nc_tbq_ar.json -p chcmax ./benchmarks/CHC/popl2023opt/test2.smt2./_build/default/main.exe -c ./config/solver/mucyc_returnF_mbp0_indNF.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/mucyc_yieldTT_mbp1_indNF.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/mucyc_returnF_mbp0.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/mucyc_yieldTT_mbp1.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/mucyc.json -p pcsp ./benchmarks/CHC/simple/sum.smt2./_build/default/main.exe -c ./config/solver/dbg_muval_prove_tbq_ar.json -p muclp ./benchmarks/muCLP/popl2023mod/sas2019_ctl1.hes./_build/default/main.exe -c ./config/solver/dbg_muval_disprove_tbq_ar.json -p muclp ./benchmarks/muCLP/popl2023mod/sas2019_ctl2b-invalid.hes./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_tbq_ar.json -p muclp ./benchmarks/muCLP/popl2023mod/sas2019_ctl1.hes./_build/default/main.exe -c ./config/solver/dbg_muval_parallel_exc_tbq_ar.json -p muclp ./benchmarks/muCLP/popl2023mod/sas2019_ctl1.hes./_build/default/main.exe -c ./config/solver/muval_prove_nonopt_tbq_ar.json -p muclpinter ./benchmarks/muCLP/popl2023mod/sas2019_lines1.hesThe following is an example of using MuVal to interactively prove that there is no input that satisfies the given
timeout in sec: 10
action (primal/dual/unknown/pos/neg/end): dual
m mod 2 = 0 /\ m <= 0 /\ m - n >= 0 /\ 1 > m - n
action (primal/dual/unknown/pos/neg/end): pos
positive examples: m > 0
action (primal/dual/unknown/pos/neg/end): dual
m >= 1 \/ m mod 2 = 0 /\ m - n >= 0 /\ 1 > m - n
action (primal/dual/unknown/pos/neg/end): unknown
1 > m /\ (0 > m - n \/ m mod 2 != 0 \/ 1 <= m - n)
action (primal/dual/unknown/pos/neg/end): pos
positive examples: 1 > m /\ 1 <= m - n
action (primal/dual/unknown/pos/neg/end): dual
m >= 1 \/ 0 > n - m \/ m mod 2 = 0 /\ m - n >= 0
action (primal/dual/unknown/pos/neg/end): unknown
0 <= n - m /\ 1 > m /\ (m mod 2 != 0 \/ 0 > m - n)
action (primal/dual/unknown/pos/neg/end): pos
positive examples: 0 <= n - m /\ 1 > m /\ m mod 2 != 0
action (primal/dual/unknown/pos/neg/end): dual
m - n >= 0 \/ m mod 2 != 0 \/ m >= 1
action (primal/dual/unknown/pos/neg/end): unknown
m mod 2 = 0 /\ 0 > m - n /\ 1 > m
action (primal/dual/unknown/pos/neg/end): pos
positive examples: m mod 2 = 0 /\ 0 > m - n /\ 1 > m
action (primal/dual/unknown/pos/neg/end): dual
true
maximality is guaranteed
Here, the dual action lets MuVal infer a precondition under which the query does not hold, but note that MuVal does not necessarily return the weakest precondition. Before performing the dual action, hints about an input range that should be included in the weakest precondition are provided through the pos action. By repeating sets of pos and dual actions, it is finally proved that there is no input that satisfies the given
Build PolyQEnt and place it to run as ./polyqent/PolyQEnt.
./_build/default/main.exe -c ./config/solver/dbg_muval_quant_polyqent_deg3.json -p qfl ./benchmarks/QFL/ert_random_walk_2nd_lb.qhes./_build/default/main.exe -c ./config/solver/dbg_rcaml_pcsat_tbq_ar.json -p ml ./benchmarks/OCaml/quantitative/icfp24/coin_flip_unif.ml./_build/default/main.exe -c ./config/solver/mucyc.json -p smt ./benchmarks/QSMT/max.smt2Build horsat2 and place it in the current directory.
./_build/default/main.exe -c ./config/solver/dbg_homcsat.json -p sat ./benchmarks/SAT/easy2.dimacs./_build/default/main.exe -c ./config/solver/dbg_homcsat.json -p dqsat ./benchmarks/QSAT/test.qdimacs./_build/default/main.exe -c ./config/solver/dbg_homcsat.json -p dqsat ./benchmarks/QSAT/test.dqdimacs./_build/default/main.exe -c ./config/solver/dbg_homcsat.json -p hosat ./benchmarks/HOSAT/AAAI2025/cps-arity1_ord3.hosat-
Satoshi Kura, Marco Gaboardi, Taro Sekiyama, and Hiroshi Unno. A Category-Theoretic Framework for Dependent Effect Systems. ESOP 2026.
-
Taro Sekiyama and Hiroshi Unno. Algebraic Temporal Effects: Temporal Verification of Recursively Typed Higher-Order Programs. POPL 2025.
-
Fuga Kawamata, Hiroshi Unno, Taro Sekiyama, and Tachio Terauchi. Answer Refinement Modification: Refinement Type System for Algebraic Effects and Handlers. POPL 2024.
-
Taro Sekiyama and Hiroshi Unno. Temporal Verification with Answer-Effect Modification. POPL 2023.
-
Yoji Nanjo, Hiroshi Unno, Eric Koskinen, and Tachio Terauchi. A Fixpoint Logic and Dependent Effects for Temporal Property Verification. LICS 2018
-
Hiroshi Unno, Yuki Satake, and Tachio Terauchi. Relatively Complete Refinement Type System for Verification of Higher-Order Non-deterministic Programs. POPL 2018.
-
Kodai Hashimoto and Hiroshi Unno. Refinement Type Inference via Horn Constraint Optimization. SAS 2015.
-
Hiroshi Unno, Tachio Terauchi, and Naoki Kobayashi. Automating Relatively Complete Verification of Higher-Order Functional Programs. POPL 2013.
-
Hiroshi Unno and Naoki Kobayashi. Dependent Type Inference with Interpolants. PPDP 2009.
-
Hiroshi Unno and Naoki Kobayashi. On-Demand Refinement of Dependent Types. FLOPS 2008.
-
Taro Sekiyama, Ugo Dal Lago, and Hiroshi Unno. On Higher-Order Model Checking of Effectful Answer-Type-Polymorphic Programs. OOPSLA 2025.
-
Taro Sekiyama and Hiroshi Unno. Higher-Order Model Checking of Effect-Handling Programs with Answer-Type Modification. OOPSLA 2024.
-
Yu Gu, Takeshi Tsukada, and Hiroshi Unno. Optimal CHC Solving via Termination Proofs. POPL 2023.
-
Hiroshi Unno, Tachio Terauchi, and Eric Koskinen. Constraint-based Relational Verification. CAV 2021.
-
Yuki Satake, Hiroshi Unno, and Hinata Yanagi. Probabilistic Inference for Predicate Constraint Satisfaction. AAAI 2020.
-
Kazuki Watanabe, Mayuko Kori, Taro Sekiyama, Satoshi Kura, and Hiroshi Unno. A Categorical Product Construction for Temporal Verification of Effectful Higher-Order Programs. 2026.
-
Satoshi Kura and Hiroshi Unno. A Hierarchy of Supermartingales for ω-Regular Verification. PLDI 2026.
-
Satoshi Kura, Hiroshi Unno, and Takeshi Tsukada. Supermartingales for Unique Fixed Points: A Unified Approach to Lower Bound Verification. PLDI 2026.
-
Satoshi Kura and Hiroshi Unno. Automated Verification of Higher-Order Probabilistic Programs via a Dependent Refinement Type System. ICFP 2024.
-
Hiroshi Unno, Tachio Terauchi, Yu Gu, and Eric Koskinen. Modular Primal-Dual Fixpoint Logic Solving for Temporal Verification. POPL 2023.
-
Satoshi Kura, Hiroshi Unno, and Ichiro Hasuo. Decision Tree Learning in CEGIS-Based Termination Analysis. CAV 2021.
-
Takeshi Tsukada and Hiroshi Unno. Inductive Approach to Spacer. PLDI 2024.
-
Takeshi Tsukada and Hiroshi Unno. Software Model-Checking as Cyclic-Proof Search. POPL 2022.
-
Hiroshi Unno, Sho Torii, and Hiroki Sakamoto. Automating Induction for Solving Horn Clauses. CAV 2017.
- Takeshi Tsukada, Hiroshi Unno, Oded Padon, and Sharon Shoham. A Primal-Dual Perspective on Program Verification Algorithms. POPL 2025.
- Hiroshi Unno, Takeshi Tsukada, and Jie-Hong Roland Jiang. Solving Higher-Order Quantified Boolean Satisfiability via Higher-Order Model Checking. AAAI 2025.
We thank Hiroyuki Katsura, Philippe Heim, Ehsan Goharshady, Elaine Li, and Benedikt Maderbacher for reporting bugs in PCSat and MuVal. We are also grateful to the organizer of termCOMP 2023, Akihisa Yamada, and participants Florian Frohn and Nils Lommen, as thanks to them, we were able to identify a bug in MuVal.