From daed868aaa7b4e320abccd60938ee8a521d5c148 Mon Sep 17 00:00:00 2001 From: c-cube Date: Tue, 24 Aug 2021 22:15:31 +0000 Subject: [PATCH] deploy: 5017d9f8bf281b34b099a9a25d78f87a1782af91 --- dev/sidekick-base/Sidekick_base/Arg/Fun/index.html | 2 -- dev/sidekick-base/Sidekick_base/Arg/Term/index.html | 8 -------- dev/sidekick-base/Sidekick_base/Arg/Ty/index.html | 2 -- dev/sidekick-base/Sidekick_base/Arg/index.html | 2 -- dev/sidekick-base/Sidekick_base/Lit/index.html | 2 ++ dev/sidekick-base/Sidekick_base/Proof/Quip/index.html | 2 -- dev/sidekick-base/Sidekick_base/Proof/index.html | 2 -- dev/sidekick-base/Sidekick_base/Proof_stub/index.html | 2 ++ dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html | 2 ++ .../Sidekick_base/Solver_arg/Term/index.html | 8 ++++++++ dev/sidekick-base/Sidekick_base/Solver_arg/Ty/index.html | 2 ++ dev/sidekick-base/Sidekick_base/Solver_arg/index.html | 2 ++ dev/sidekick-base/Sidekick_base/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Lit/index.html | 2 ++ dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html | 2 -- dev/sidekick-base/Sidekick_base__/Proof/index.html | 2 -- dev/sidekick-base/Sidekick_base__/Proof_stub/index.html | 2 ++ .../Sidekick_base__/Solver_arg/Fun/index.html | 2 ++ .../Sidekick_base__/Solver_arg/Term/index.html | 8 ++++++++ .../Sidekick_base__/Solver_arg/Ty/index.html | 2 ++ dev/sidekick-base/Sidekick_base__/Solver_arg/index.html | 2 ++ dev/sidekick-base/Sidekick_base__/index.html | 2 +- .../.dune-keep | 0 dev/sidekick-base/Sidekick_base__Lit/index.html | 2 ++ dev/sidekick-base/Sidekick_base__Proof/Quip/index.html | 2 -- dev/sidekick-base/Sidekick_base__Proof/index.html | 2 -- .../Sidekick_base__Proof_stub}/.dune-keep | 0 dev/sidekick-base/Sidekick_base__Proof_stub/index.html | 2 ++ .../Sidekick_base__Solver_arg}/.dune-keep | 0 .../Sidekick_base__Solver_arg/Fun/index.html | 2 ++ .../Sidekick_base__Solver_arg/Term/index.html | 8 ++++++++ dev/sidekick-base/Sidekick_base__Solver_arg/Ty/index.html | 2 ++ dev/sidekick-base/Sidekick_base__Solver_arg/index.html | 2 ++ .../Sidekick_base_solver/Solver/Atom/index.html | 2 -- .../Sidekick_base_solver/Solver/Lit/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Solver/Lit/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Solver/Lit/T/Term/index.html | 2 +- .../Sidekick_base_solver/Solver/Lit/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Solver/Lit/index.html | 2 +- .../Sidekick_base_solver/Solver/Model/index.html | 2 +- .../Sidekick_base_solver/Solver/P/Quip/index.html | 2 -- .../Sidekick_base_solver/Solver/P/index.html | 2 +- .../Sidekick_base_solver/Solver/Pre_proof/index.html | 2 -- .../Solver/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/P/Quip/index.html | 2 -- .../Solver/Solver_internal/CC/Actions/P/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/index.html | 2 +- .../Solver/Solver_internal/CC/N/index.html | 2 +- .../Solver/Solver_internal/CC/P/Quip/index.html | 2 -- .../Solver/Solver_internal/CC/P/index.html | 2 +- .../Solver/Solver_internal/CC/index.html | 2 +- .../Solver/Solver_internal/Lit/index.html | 2 +- .../Solver/Solver_internal/P/Quip/index.html | 2 -- .../Solver/Solver_internal/P/index.html | 2 +- .../Solver/Solver_internal/Simplify/index.html | 2 +- .../Solver/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_base_solver/Solver/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Solver/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Solver/T/Term/index.html | 2 +- .../Sidekick_base_solver/Solver/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Solver/Unknown/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/index.html | 2 +- .../Sidekick_base_solver/Solver_arg/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Atom/index.html | 2 -- .../Sidekick_base_solver/Th_bool/A/S/Lit/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Model/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/P/Quip/index.html | 2 -- .../Sidekick_base_solver/Th_bool/A/S/P/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Pre_proof/index.html | 2 -- .../Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/P/Quip/index.html | 2 -- .../Th_bool/A/S/Solver_internal/CC/Actions/P/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/N/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/P/Quip/index.html | 2 -- .../Th_bool/A/S/Solver_internal/CC/P/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/index.html | 2 +- .../Th_bool/A/S/Solver_internal/P/Quip/index.html | 2 -- .../Th_bool/A/S/Solver_internal/P/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Simplify/index.html | 2 +- .../Th_bool/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html | 2 +- .../Th_bool/A/S/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Unknown/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Atom/index.html | 2 -- .../Sidekick_base_solver/Th_data/A/S/Lit/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Model/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/P/Quip/index.html | 2 -- .../Sidekick_base_solver/Th_data/A/S/P/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Pre_proof/index.html | 2 -- .../Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/P/Quip/index.html | 2 -- .../Th_data/A/S/Solver_internal/CC/Actions/P/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/N/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/P/Quip/index.html | 2 -- .../Th_data/A/S/Solver_internal/CC/P/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/index.html | 2 +- .../Th_data/A/S/Solver_internal/P/Quip/index.html | 2 -- .../Th_data/A/S/Solver_internal/P/index.html | 2 +- .../Th_data/A/S/Solver_internal/Simplify/index.html | 2 +- .../Th_data/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_base_solver/Th_data/A/S/T/Fun/index.html | 2 +- .../Th_data/A/S/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Unknown/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Atom/index.html | 2 -- .../Sidekick_base_solver/Th_lra/A/S/Lit/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Model/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/P/Quip/index.html | 2 -- .../Sidekick_base_solver/Th_lra/A/S/P/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Pre_proof/index.html | 2 -- .../Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/P/Quip/index.html | 2 -- .../Th_lra/A/S/Solver_internal/CC/Actions/P/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/N/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/P/Quip/index.html | 2 -- .../Th_lra/A/S/Solver_internal/CC/P/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/index.html | 2 +- .../Th_lra/A/S/Solver_internal/P/Quip/index.html | 2 -- .../Th_lra/A/S/Solver_internal/P/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Simplify/index.html | 2 +- .../Th_lra/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Unknown/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/index.html | 2 +- .../Sidekick_bin_lib}/.dune-keep | 0 dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html | 2 ++ .../Sidekick_bin_lib/Dimacs_parser/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib/Drup_lexer/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib/Drup_parser/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib/index.html | 2 ++ .../Sidekick_bin_lib__}/.dune-keep | 0 .../Sidekick_bin_lib__/Dimacs_lexer/index.html | 2 ++ .../Sidekick_bin_lib__/Dimacs_parser/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib__/Drup_lexer/index.html | 2 ++ .../Sidekick_bin_lib__/Drup_parser/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib__/index.html | 2 ++ .../Sidekick_bin_lib__Dimacs_lexer/.dune-keep | 0 .../Sidekick_bin_lib__Dimacs_lexer/index.html | 2 ++ .../Sidekick_bin_lib__Dimacs_parser/.dune-keep | 0 .../Sidekick_bin_lib__Dimacs_parser/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep | 0 dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html | 2 ++ dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep | 0 dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html | 2 ++ .../Sidekick_smtlib/Process/Solver/Atom/index.html | 2 -- .../Sidekick_smtlib/Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/P/Quip/index.html | 2 -- .../Sidekick_smtlib/Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/Pre_proof/index.html | 2 -- .../Solver/Solver_internal/CC/Actions/P/index.html | 2 ++ .../Process/Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Process/Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Process/Solver/Solver_internal/CC/P/index.html | 2 ++ .../Process/Solver/Solver_internal/CC/index.html | 2 +- .../Process/Solver/Solver_internal/Simplify/index.html | 2 +- .../Process/Solver/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_smtlib/Process/Solver/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Atom/index.html | 2 -- .../Sidekick_smtlib__/Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/P/Quip/index.html | 2 -- .../Sidekick_smtlib__/Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Pre_proof/index.html | 2 -- .../Solver/Solver_internal/CC/Actions/P/index.html | 2 ++ .../Process/Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Process/Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Process/Solver/Solver_internal/CC/P/index.html | 2 ++ .../Process/Solver/Solver_internal/CC/index.html | 2 +- .../Process/Solver/Solver_internal/Simplify/index.html | 2 +- .../Process/Solver/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_smtlib__/Process/Solver/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Atom/index.html | 2 -- .../Sidekick_smtlib__Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/P/Quip/index.html | 2 -- .../Sidekick_smtlib__Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Pre_proof/index.html | 2 -- .../Solver/Solver_internal/CC/Actions/P/index.html | 2 ++ .../Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver/Solver_internal/CC/P/index.html | 2 ++ .../Solver/Solver_internal/CC/index.html | 2 +- .../Solver/Solver_internal/Simplify/index.html | 2 +- .../Solver/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_smtlib__Process/Solver/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/index.html | 2 +- dev/sidekick-bin/index.html | 2 +- .../Make/argument-1-A/S/Atom/index.html | 2 -- .../Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/P/Quip/index.html | 2 -- .../Sidekick_arith_lra/Make/argument-1-A/S/P/index.html | 2 +- .../Make/argument-1-A/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/P/index.html | 2 ++ .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_arith_lra/Make/argument-1-A/S/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/Atom/index.html | 2 -- .../Sidekick_arith_lra/module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/P/Quip/index.html | 2 -- .../Sidekick_arith_lra/module-type-ARG/S/P/index.html | 2 +- .../module-type-ARG/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-ARG/S/Solver_internal/CC/index.html | 2 +- .../module-type-ARG/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-ARG/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_arith_lra/module-type-ARG/S/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/Atom/index.html | 2 -- .../Sidekick_arith_lra/module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/P/Quip/index.html | 2 -- .../Sidekick_arith_lra/module-type-S/A/S/P/index.html | 2 +- .../module-type-S/A/S/Pre_proof/index.html | 2 -- .../A/S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../A/S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-S/A/S/Solver_internal/CC/index.html | 2 +- .../module-type-S/A/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-S/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_arith_lra/module-type-S/A/S/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_backend/Backend_intf/index.html | 2 -- .../Backend_intf/module-type-S/index.html | 2 -- .../Dot/Default/argument-1-S/Atom/index.html | 2 -- .../Dot/Default/argument-1-S/Clause/index.html | 2 -- .../Dot/Default/argument-1-S/Formula/index.html | 2 -- .../Dot/Default/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend/Dot/Default/argument-1-S/index.html | 2 -- dev/sidekick/Sidekick_backend/Dot/Default/index.html | 2 -- .../Dot/Make/argument-1-S/Atom/index.html | 2 -- .../Dot/Make/argument-1-S/Clause/index.html | 2 -- .../Dot/Make/argument-1-S/Formula/index.html | 2 -- .../Dot/Make/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend/Dot/Make/argument-1-S/index.html | 2 -- .../Sidekick_backend/Dot/Make/argument-2-A/index.html | 2 -- dev/sidekick/Sidekick_backend/Dot/Make/index.html | 2 -- .../Dot/Simple/argument-1-S/Atom/index.html | 2 -- .../Dot/Simple/argument-1-S/Clause/index.html | 2 -- .../Dot/Simple/argument-1-S/Formula/index.html | 2 -- .../Dot/Simple/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend/Dot/Simple/argument-1-S/index.html | 2 -- .../Sidekick_backend/Dot/Simple/argument-2-A/index.html | 2 -- dev/sidekick/Sidekick_backend/Dot/Simple/index.html | 2 -- dev/sidekick/Sidekick_backend/Dot/index.html | 2 -- .../Sidekick_backend/Dot/module-type-Arg/index.html | 2 -- .../Sidekick_backend/Dot/module-type-S/index.html | 2 -- dev/sidekick/Sidekick_backend/index.html | 2 -- dev/sidekick/Sidekick_backend__Backend_intf/index.html | 2 -- .../module-type-S/index.html | 2 -- .../Default/argument-1-S/Atom/index.html | 2 -- .../Default/argument-1-S/Clause/index.html | 2 -- .../Default/argument-1-S/Formula/index.html | 2 -- .../Default/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend__Dot/Default/argument-1-S/index.html | 2 -- dev/sidekick/Sidekick_backend__Dot/Default/index.html | 2 -- .../Make/argument-1-S/Atom/index.html | 2 -- .../Make/argument-1-S/Clause/index.html | 2 -- .../Make/argument-1-S/Formula/index.html | 2 -- .../Make/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend__Dot/Make/argument-1-S/index.html | 2 -- .../Sidekick_backend__Dot/Make/argument-2-A/index.html | 2 -- dev/sidekick/Sidekick_backend__Dot/Make/index.html | 2 -- .../Simple/argument-1-S/Atom/index.html | 2 -- .../Simple/argument-1-S/Clause/index.html | 2 -- .../Simple/argument-1-S/Formula/index.html | 2 -- .../Simple/argument-1-S/Proof/index.html | 2 -- .../Sidekick_backend__Dot/Simple/argument-1-S/index.html | 2 -- .../Sidekick_backend__Dot/Simple/argument-2-A/index.html | 2 -- dev/sidekick/Sidekick_backend__Dot/Simple/index.html | 2 -- dev/sidekick/Sidekick_backend__Dot/index.html | 2 -- .../Sidekick_backend__Dot/module-type-Arg/index.html | 2 -- .../Sidekick_backend__Dot/module-type-S/index.html | 2 -- dev/sidekick/Sidekick_cc/Make/Expl/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/P/index.html | 2 ++ .../Sidekick_cc/Make/argument-1-A/Actions/P/index.html | 2 ++ .../Sidekick_cc/Make/argument-1-A/Actions/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html | 2 +- .../Sidekick_cc/Make/argument-1-A/P/Quip/index.html | 2 -- dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/index.html | 2 +- dev/sidekick/Sidekick_cc/index.html | 2 +- .../Sidekick_cc/module-type-S/Actions/P/index.html | 2 ++ dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html | 2 -- dev/sidekick/Sidekick_cc/module-type-S/P/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/index.html | 2 +- .../argument-1-M/SI/CC/Actions/P/index.html | 2 ++ .../Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/CC/P/index.html | 2 ++ .../Monoid_of_repr/argument-1-M/SI/CC/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/Lit/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/P/Quip/index.html | 2 -- .../Monoid_of_repr/argument-1-M/SI/P/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/Simplify/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/index.html | 2 +- .../SI/module-type-PREPROCESS_ACTS/index.html | 2 ++ dev/sidekick/Sidekick_core/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/Lit/index.html | 2 +- .../module-type-CC_ACTIONS/P/Quip/index.html | 2 -- .../Sidekick_core/module-type-CC_ACTIONS/P/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/index.html | 2 +- .../Sidekick_core/module-type-CC_ARG/Actions/P/index.html | 2 ++ .../Sidekick_core/module-type-CC_ARG/Actions/index.html | 2 +- .../Sidekick_core/module-type-CC_ARG/Lit/index.html | 2 +- .../Sidekick_core/module-type-CC_ARG/P/Quip/index.html | 2 -- .../Sidekick_core/module-type-CC_ARG/P/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html | 2 +- .../Sidekick_core/module-type-CC_PROOF/index.html | 2 ++ .../Sidekick_core/module-type-CC_S/Actions/P/index.html | 2 ++ .../Sidekick_core/module-type-CC_S/Actions/index.html | 2 +- .../Sidekick_core/module-type-CC_S/Expl/index.html | 2 +- .../Sidekick_core/module-type-CC_S/Lit/index.html | 2 +- .../Sidekick_core/module-type-CC_S/P/Quip/index.html | 2 -- dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/Actions/P/index.html | 2 ++ .../module-type-MONOID_ARG/SI/CC/Actions/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/Expl/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/P/index.html | 2 ++ .../Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html | 2 +- .../module-type-MONOID_ARG/SI/Lit/index.html | 2 +- .../module-type-MONOID_ARG/SI/P/Quip/index.html | 2 -- .../Sidekick_core/module-type-MONOID_ARG/SI/P/index.html | 2 +- .../module-type-MONOID_ARG/SI/Simplify/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/index.html | 2 +- .../SI/module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_core/module-type-PROOF/Quip/index.html | 2 -- dev/sidekick/Sidekick_core/module-type-PROOF/index.html | 2 +- .../Sidekick_core/module-type-SAT_PROOF/index.html | 2 ++ .../Sidekick_core/module-type-SOLVER/Atom/index.html | 2 -- .../Sidekick_core/module-type-SOLVER/Lit/index.html | 2 +- .../Sidekick_core/module-type-SOLVER/P/Quip/index.html | 2 -- .../Sidekick_core/module-type-SOLVER/P/index.html | 2 +- .../Sidekick_core/module-type-SOLVER/Pre_proof/index.html | 2 -- .../Solver_internal/CC/Actions/P/index.html | 2 ++ .../Solver_internal/CC/Actions/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/P/index.html | 2 ++ .../module-type-SOLVER/Solver_internal/CC/index.html | 2 +- .../Solver_internal/Simplify/index.html | 2 +- .../module-type-SOLVER/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ dev/sidekick/Sidekick_core/module-type-SOLVER/index.html | 2 +- .../module-type-SOLVER_INTERNAL/CC/Actions/P/index.html | 2 ++ .../module-type-SOLVER_INTERNAL/CC/Actions/index.html | 2 +- .../module-type-SOLVER_INTERNAL/CC/Expl/index.html | 2 +- .../module-type-SOLVER_INTERNAL/CC/P/index.html | 2 ++ .../module-type-SOLVER_INTERNAL/CC/index.html | 2 +- .../module-type-SOLVER_INTERNAL/Lit/index.html | 2 +- .../module-type-SOLVER_INTERNAL/P/Quip/index.html | 2 -- .../module-type-SOLVER_INTERNAL/P/index.html | 2 +- .../module-type-SOLVER_INTERNAL/Simplify/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ dev/sidekick/Sidekick_drup/.dune-keep | 0 dev/sidekick/Sidekick_drup/Make/Atom/index.html | 2 ++ dev/sidekick/Sidekick_drup/Make/Checker/index.html | 2 ++ dev/sidekick/Sidekick_drup/Make/Clause/index.html | 2 ++ dev/sidekick/Sidekick_drup/Make/index.html | 2 ++ dev/sidekick/Sidekick_drup/index.html | 2 ++ dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html | 2 ++ .../Sidekick_drup/module-type-S/Checker/index.html | 2 ++ .../Sidekick_drup/module-type-S/Clause/index.html | 2 ++ dev/sidekick/Sidekick_drup/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_lit/.dune-keep | 0 .../Sidekick_lit/Make/argument-1-T/Fun/index.html | 2 ++ .../Sidekick_lit/Make/argument-1-T/Term/index.html | 8 ++++++++ dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html | 2 ++ dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html | 2 ++ dev/sidekick/Sidekick_lit/Make/index.html | 2 ++ dev/sidekick/Sidekick_lit/index.html | 2 ++ dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html | 2 -- dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html | 2 -- dev/sidekick/Sidekick_msat_solver/Make/Model/index.html | 2 -- .../Sidekick_msat_solver/Make/Pre_proof/index.html | 2 -- .../Make/Solver_internal/CC/Actions/index.html | 2 -- .../Make/Solver_internal/CC/Expl/index.html | 2 -- .../Make/Solver_internal/CC/N/index.html | 2 -- .../Make/Solver_internal/CC/index.html | 2 -- .../Make/Solver_internal/Simplify/index.html | 2 -- .../Sidekick_msat_solver/Make/Solver_internal/index.html | 2 -- dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html | 2 -- .../Make/argument-1-A/P/Quip/index.html | 2 -- .../Sidekick_msat_solver/Make/argument-1-A/P/index.html | 2 -- .../Make/argument-1-A/T/Fun/index.html | 2 -- .../Make/argument-1-A/T/Term/index.html | 8 -------- .../Make/argument-1-A/T/Ty/index.html | 2 -- .../Sidekick_msat_solver/Make/argument-1-A/index.html | 2 -- dev/sidekick/Sidekick_msat_solver/Make/index.html | 2 -- .../Make/module-type-THEORY/index.html | 2 -- dev/sidekick/Sidekick_msat_solver/index.html | 2 -- .../module-type-ARG/P/Quip/index.html | 2 -- .../Sidekick_msat_solver/module-type-ARG/P/index.html | 2 -- .../Sidekick_msat_solver/module-type-ARG/T/Fun/index.html | 2 -- .../module-type-ARG/T/Term/index.html | 8 -------- .../Sidekick_msat_solver/module-type-ARG/T/Ty/index.html | 2 -- .../Sidekick_msat_solver/module-type-ARG/T/index.html | 2 -- .../Sidekick_msat_solver/module-type-ARG/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/Atom/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/Lit/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/Model/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/P/Quip/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/P/index.html | 2 -- .../module-type-S/Pre_proof/index.html | 2 -- .../module-type-S/Solver_internal/CC/Actions/index.html | 2 -- .../module-type-S/Solver_internal/CC/Expl/index.html | 2 -- .../module-type-S/Solver_internal/CC/N/index.html | 2 -- .../module-type-S/Solver_internal/CC/index.html | 2 -- .../module-type-S/Solver_internal/Simplify/index.html | 2 -- .../module-type-S/Solver_internal/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/T/Fun/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/T/Term/index.html | 8 -------- .../Sidekick_msat_solver/module-type-S/T/Ty/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/T/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/Unknown/index.html | 2 -- .../Sidekick_msat_solver/module-type-S/index.html | 2 -- .../module-type-S/module-type-THEORY/index.html | 2 -- .../Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html | 2 -- .../Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html | 2 +- .../Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html | 2 -- .../Solver/Make_cdcl_t/argument-1-Th/Formula/index.html | 2 -- .../Solver/Make_cdcl_t/argument-1-Th/Lit/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/Proof/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/index.html | 2 +- dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html | 2 +- .../Sidekick_sat/Solver/Make_pure_sat/Atom/index.html | 2 -- .../Sidekick_sat/Solver/Make_pure_sat/Clause/index.html | 2 +- .../Sidekick_sat/Solver/Make_pure_sat/Proof/index.html | 2 -- .../Solver/Make_pure_sat/argument-1-Th/Formula/index.html | 2 -- .../Solver/Make_pure_sat/argument-1-Th/Lit/index.html | 2 ++ .../Solver/Make_pure_sat/argument-1-Th/Proof/index.html | 2 ++ .../Solver/Make_pure_sat/argument-1-Th/index.html | 2 +- dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html | 2 +- dev/sidekick/Sidekick_sat/Solver/index.html | 2 +- .../Sidekick_sat/Solver/module-type-S/Atom/index.html | 2 -- .../Sidekick_sat/Solver/module-type-S/Clause/index.html | 2 +- .../Sidekick_sat/Solver/module-type-S/Formula/index.html | 2 -- .../Sidekick_sat/Solver/module-type-S/Lit/index.html | 2 ++ .../Sidekick_sat/Solver/module-type-S/Proof/index.html | 2 +- dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_sat/Solver_intf/index.html | 2 +- .../Sidekick_sat/Solver_intf/module-type-ACTS/index.html | 2 +- .../Solver_intf/module-type-FORMULA/index.html | 2 -- .../Sidekick_sat/Solver_intf/module-type-LIT/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Formula/index.html | 2 -- .../Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Proof/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_CDCL_T/index.html | 2 +- .../Solver_intf/module-type-PLUGIN_SAT/Formula/index.html | 2 -- .../Solver_intf/module-type-PLUGIN_SAT/Lit/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_SAT/Proof/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_SAT/index.html | 2 +- .../Sidekick_sat/Solver_intf/module-type-PROOF/index.html | 2 +- .../Solver_intf/module-type-S/Atom/index.html | 2 -- .../Solver_intf/module-type-S/Clause/index.html | 2 +- .../Solver_intf/module-type-S/Formula/index.html | 2 -- .../Sidekick_sat/Solver_intf/module-type-S/Lit/index.html | 2 ++ .../Solver_intf/module-type-S/Proof/index.html | 2 +- .../Sidekick_sat/Solver_intf/module-type-S/index.html | 2 +- .../Solver_intf/module-type-SAT_STATE/index.html | 2 +- .../Solver_intf/module-type-UNSAT_STATE/index.html | 2 +- dev/sidekick/Sidekick_sat/index.html | 2 +- dev/sidekick/Sidekick_sat/module-type-ACTS/index.html | 2 +- dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html | 2 -- dev/sidekick/Sidekick_sat/module-type-LIT/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Formula/index.html | 2 -- .../Sidekick_sat/module-type-PLUGIN_CDCL_T/Lit/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Proof/index.html | 2 ++ .../Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html | 2 +- dev/sidekick/Sidekick_sat/module-type-PROOF/index.html | 2 +- dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html | 2 -- dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html | 2 +- .../Sidekick_sat/module-type-S/Formula/index.html | 2 -- dev/sidekick/Sidekick_sat/module-type-S/Lit/index.html | 2 ++ dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html | 2 +- dev/sidekick/Sidekick_sat/module-type-S/index.html | 2 +- .../Sidekick_sat/module-type-SAT_STATE/index.html | 2 +- .../Sidekick_sat__/Heap/Make/argument-1-X/index.html | 2 +- dev/sidekick/Sidekick_sat__/Heap/Make/index.html | 2 +- dev/sidekick/Sidekick_sat__/Heap/index.html | 2 +- .../Sidekick_sat__/Heap/module-type-RANKED/index.html | 2 +- dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html | 2 +- .../Heap_intf/module-type-RANKED/index.html | 2 +- .../Sidekick_sat__/Heap_intf/module-type-S/index.html | 2 +- .../Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html | 2 -- .../Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html | 2 +- .../Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html | 2 -- .../Solver/Make_cdcl_t/argument-1-Th/Formula/index.html | 2 -- .../Solver/Make_cdcl_t/argument-1-Th/Lit/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/Proof/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/index.html | 2 +- dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html | 2 +- .../Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html | 2 -- .../Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html | 2 +- .../Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html | 2 -- .../Solver/Make_pure_sat/argument-1-Th/Formula/index.html | 2 -- .../Solver/Make_pure_sat/argument-1-Th/Lit/index.html | 2 ++ .../Solver/Make_pure_sat/argument-1-Th/Proof/index.html | 2 ++ .../Solver/Make_pure_sat/argument-1-Th/index.html | 2 +- .../Sidekick_sat__/Solver/Make_pure_sat/index.html | 2 +- dev/sidekick/Sidekick_sat__/Solver/index.html | 2 +- .../Sidekick_sat__/Solver/module-type-S/Atom/index.html | 2 -- .../Sidekick_sat__/Solver/module-type-S/Clause/index.html | 2 +- .../Solver/module-type-S/Formula/index.html | 2 -- .../Sidekick_sat__/Solver/module-type-S/Lit/index.html | 2 ++ .../Sidekick_sat__/Solver/module-type-S/Proof/index.html | 2 +- .../Sidekick_sat__/Solver/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_sat__/Solver_intf/index.html | 2 +- .../Solver_intf/module-type-ACTS/index.html | 2 +- .../Solver_intf/module-type-FORMULA/index.html | 2 -- .../Sidekick_sat__/Solver_intf/module-type-LIT/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Formula/index.html | 2 -- .../Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Proof/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_CDCL_T/index.html | 2 +- .../Solver_intf/module-type-PLUGIN_SAT/Formula/index.html | 2 -- .../Solver_intf/module-type-PLUGIN_SAT/Lit/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_SAT/Proof/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_SAT/index.html | 2 +- .../Solver_intf/module-type-PROOF/index.html | 2 +- .../Solver_intf/module-type-S/Atom/index.html | 2 -- .../Solver_intf/module-type-S/Clause/index.html | 2 +- .../Solver_intf/module-type-S/Formula/index.html | 2 -- .../Solver_intf/module-type-S/Lit/index.html | 2 ++ .../Solver_intf/module-type-S/Proof/index.html | 2 +- .../Sidekick_sat__/Solver_intf/module-type-S/index.html | 2 +- .../Solver_intf/module-type-SAT_STATE/index.html | 2 +- .../Solver_intf/module-type-UNSAT_STATE/index.html | 2 +- .../Sidekick_sat__Heap/Make/argument-1-X/index.html | 2 +- dev/sidekick/Sidekick_sat__Heap/Make/index.html | 2 +- dev/sidekick/Sidekick_sat__Heap/index.html | 2 +- .../Sidekick_sat__Heap/module-type-RANKED/index.html | 2 +- dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html | 2 +- .../Sidekick_sat__Heap_intf/module-type-RANKED/index.html | 2 +- .../Sidekick_sat__Heap_intf/module-type-S/index.html | 2 +- .../Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html | 2 -- .../Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html | 2 +- .../Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html | 2 -- .../Make_cdcl_t/argument-1-Th/Formula/index.html | 2 -- .../Make_cdcl_t/argument-1-Th/Lit/index.html | 2 ++ .../Make_cdcl_t/argument-1-Th/Proof/index.html | 2 ++ .../Make_cdcl_t/argument-1-Th/index.html | 2 +- dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html | 2 +- .../Sidekick_sat__Solver/Make_pure_sat/Atom/index.html | 2 -- .../Sidekick_sat__Solver/Make_pure_sat/Clause/index.html | 2 +- .../Sidekick_sat__Solver/Make_pure_sat/Proof/index.html | 2 -- .../Make_pure_sat/argument-1-Th/Formula/index.html | 2 -- .../Make_pure_sat/argument-1-Th/Lit/index.html | 2 ++ .../Make_pure_sat/argument-1-Th/Proof/index.html | 2 ++ .../Make_pure_sat/argument-1-Th/index.html | 2 +- .../Sidekick_sat__Solver/Make_pure_sat/index.html | 2 +- dev/sidekick/Sidekick_sat__Solver/index.html | 2 +- .../Sidekick_sat__Solver/module-type-S/Atom/index.html | 2 -- .../Sidekick_sat__Solver/module-type-S/Clause/index.html | 2 +- .../Sidekick_sat__Solver/module-type-S/Formula/index.html | 2 -- .../Sidekick_sat__Solver/module-type-S/Lit/index.html | 2 ++ .../Sidekick_sat__Solver/module-type-S/Proof/index.html | 2 +- .../Sidekick_sat__Solver/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_sat__Solver_intf/index.html | 2 +- .../Sidekick_sat__Solver_intf/module-type-ACTS/index.html | 2 +- .../module-type-FORMULA/index.html | 2 -- .../Sidekick_sat__Solver_intf/module-type-LIT/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Formula/index.html | 2 -- .../module-type-PLUGIN_CDCL_T/Lit/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Proof/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/index.html | 2 +- .../module-type-PLUGIN_SAT/Formula/index.html | 2 -- .../module-type-PLUGIN_SAT/Lit/index.html | 2 ++ .../module-type-PLUGIN_SAT/Proof/index.html | 2 ++ .../module-type-PLUGIN_SAT/index.html | 2 +- .../module-type-PROOF/index.html | 2 +- .../module-type-S/Atom/index.html | 2 -- .../module-type-S/Clause/index.html | 2 +- .../module-type-S/Formula/index.html | 2 -- .../module-type-S/Lit/index.html | 2 ++ .../module-type-S/Proof/index.html | 2 +- .../Sidekick_sat__Solver_intf/module-type-S/index.html | 2 +- .../module-type-SAT_STATE/index.html | 2 +- .../module-type-UNSAT_STATE/index.html | 2 +- dev/sidekick/Sidekick_smt_solver/.dune-keep | 0 dev/sidekick/Sidekick_smt_solver/Make/Model/index.html | 2 ++ .../Make/Solver_internal/CC/Actions/P/index.html | 2 ++ .../Make/Solver_internal/CC/Actions/index.html | 2 ++ .../Make/Solver_internal/CC/Expl/index.html | 2 ++ .../Make/Solver_internal/CC/N/index.html | 2 ++ .../Make/Solver_internal/CC/P/index.html | 2 ++ .../Make/Solver_internal/CC/index.html | 2 ++ .../Make/Solver_internal/Simplify/index.html | 2 ++ .../Sidekick_smt_solver/Make/Solver_internal/index.html | 2 ++ .../module-type-PREPROCESS_ACTS/index.html | 2 ++ dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html | 2 ++ .../Sidekick_smt_solver/Make/argument-1-A/Lit/index.html | 2 ++ .../Sidekick_smt_solver/Make/argument-1-A/P/index.html | 2 ++ .../Make/argument-1-A/T/Fun/index.html | 2 ++ .../Make/argument-1-A/T/Term/index.html | 8 ++++++++ .../Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html | 2 ++ .../Sidekick_smt_solver/Make/argument-1-A/T/index.html | 2 ++ .../Sidekick_smt_solver/Make/argument-1-A/index.html | 2 ++ dev/sidekick/Sidekick_smt_solver/Make/index.html | 2 ++ .../Make/module-type-THEORY/index.html | 2 ++ dev/sidekick/Sidekick_smt_solver/index.html | 2 ++ .../Sidekick_smt_solver/module-type-ARG/Lit/index.html | 2 ++ .../Sidekick_smt_solver/module-type-ARG/P/index.html | 2 ++ .../Sidekick_smt_solver/module-type-ARG/T/Fun/index.html | 2 ++ .../Sidekick_smt_solver/module-type-ARG/T/Term/index.html | 8 ++++++++ .../Sidekick_smt_solver/module-type-ARG/T/Ty/index.html | 2 ++ .../module-type-ARG}/T/index.html | 2 +- .../Sidekick_smt_solver/module-type-ARG/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/Lit/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/Model/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/P/index.html | 2 ++ .../module-type-S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../module-type-S/Solver_internal/CC/Actions/index.html | 2 ++ .../module-type-S/Solver_internal/CC/Expl/index.html | 2 ++ .../module-type-S/Solver_internal/CC/N/index.html | 2 ++ .../module-type-S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-S/Solver_internal/CC/index.html | 2 ++ .../module-type-S/Solver_internal/Simplify/index.html | 2 ++ .../module-type-S/Solver_internal/index.html | 2 ++ .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/T/Fun/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/T/Term/index.html | 8 ++++++++ .../Sidekick_smt_solver/module-type-S/T/Ty/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/T/index.html | 2 ++ .../Sidekick_smt_solver/module-type-S/Unknown/index.html | 2 ++ dev/sidekick/Sidekick_smt_solver/module-type-S/index.html | 2 ++ .../module-type-S/module-type-THEORY/index.html | 2 ++ .../Make/argument-1-A/S/Atom/index.html | 2 -- .../Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/P/Quip/index.html | 2 -- .../Make/argument-1-A/S/P/index.html | 2 +- .../Make/argument-1-A/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/P/index.html | 2 ++ .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Make/argument-1-A/S/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/index.html | 2 +- .../module-type-ARG/S/Atom/index.html | 2 -- .../module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/P/Quip/index.html | 2 -- .../module-type-ARG/S/P/index.html | 2 +- .../module-type-ARG/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-ARG/S/Solver_internal/CC/index.html | 2 +- .../module-type-ARG/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-ARG/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_bool_static/module-type-ARG/S/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/index.html | 2 +- .../module-type-S/A/S/Atom/index.html | 2 -- .../module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/P/Quip/index.html | 2 -- .../module-type-S/A/S/P/index.html | 2 +- .../module-type-S/A/S/Pre_proof/index.html | 2 -- .../A/S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../A/S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-S/A/S/Solver_internal/CC/index.html | 2 +- .../module-type-S/A/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-S/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_bool_static/module-type-S/A/S/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html | 2 -- .../Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/P/Quip/index.html | 2 -- .../Sidekick_th_cstor/Make/argument-1-A/S/P/index.html | 2 +- .../Make/argument-1-A/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/P/index.html | 2 ++ .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_cstor/Make/argument-1-A/S/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/Atom/index.html | 2 -- .../Sidekick_th_cstor/module-type-ARG/S/Lit/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html | 2 -- .../Sidekick_th_cstor/module-type-ARG/S/P/index.html | 2 +- .../module-type-ARG/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-ARG/S/Solver_internal/CC/index.html | 2 +- .../module-type-ARG/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-ARG/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_cstor/module-type-ARG/S/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/Atom/index.html | 2 -- .../Sidekick_th_cstor/module-type-S/A/S/Lit/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html | 2 -- .../Sidekick_th_cstor/module-type-S/A/S/P/index.html | 2 +- .../module-type-S/A/S/Pre_proof/index.html | 2 -- .../A/S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../A/S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-S/A/S/Solver_internal/CC/index.html | 2 +- .../module-type-S/A/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-S/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_cstor/module-type-S/A/S/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/Atom/index.html | 2 -- .../Sidekick_th_data/Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/P/Quip/index.html | 2 -- .../Sidekick_th_data/Make/argument-1-A/S/P/index.html | 2 +- .../Make/argument-1-A/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/P/index.html | 2 ++ .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_data/Make/argument-1-A/S/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/Atom/index.html | 2 -- .../Sidekick_th_data/module-type-ARG/S/Lit/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/P/Quip/index.html | 2 -- .../Sidekick_th_data/module-type-ARG/S/P/index.html | 2 +- .../module-type-ARG/S/Pre_proof/index.html | 2 -- .../S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-ARG/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-ARG/S/Solver_internal/CC/index.html | 2 +- .../module-type-ARG/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-ARG/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_data/module-type-ARG/S/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/Atom/index.html | 2 -- .../Sidekick_th_data/module-type-S/A/S/Lit/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/P/Quip/index.html | 2 -- .../Sidekick_th_data/module-type-S/A/S/P/index.html | 2 +- .../module-type-S/A/S/Pre_proof/index.html | 2 -- .../A/S/Solver_internal/CC/Actions/P/index.html | 2 ++ .../A/S/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-S/A/S/Solver_internal/CC/P/index.html | 2 ++ .../module-type-S/A/S/Solver_internal/CC/index.html | 2 +- .../module-type-S/A/S/Solver_internal/Simplify/index.html | 2 +- .../module-type-S/A/S/Solver_internal/index.html | 2 +- .../module-type-PREPROCESS_ACTS/index.html | 2 ++ .../Sidekick_th_data/module-type-S/A/S/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_util/Bitvec/index.html | 2 ++ dev/sidekick/Sidekick_util/Util/index.html | 2 +- dev/sidekick/Sidekick_util/Vec/index.html | 2 +- dev/sidekick/Sidekick_util/VecI32/index.html | 2 ++ dev/sidekick/Sidekick_util/Vec_float/index.html | 2 ++ dev/sidekick/Sidekick_util/Vec_sig/index.html | 2 ++ .../Sidekick_util/Vec_sig/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_util/index.html | 2 +- dev/sidekick/Sidekick_util__/Bitvec/index.html | 2 ++ dev/sidekick/Sidekick_util__/Util/index.html | 2 +- dev/sidekick/Sidekick_util__/Vec/index.html | 2 +- dev/sidekick/Sidekick_util__/VecI32/index.html | 2 ++ dev/sidekick/Sidekick_util__/Vec_float/index.html | 2 ++ dev/sidekick/Sidekick_util__/Vec_sig/index.html | 2 ++ .../Sidekick_util__/Vec_sig/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_util__/index.html | 2 +- dev/sidekick/Sidekick_util__Bitvec/.dune-keep | 0 dev/sidekick/Sidekick_util__Bitvec/index.html | 2 ++ dev/sidekick/Sidekick_util__Util/index.html | 2 +- dev/sidekick/Sidekick_util__Vec/index.html | 2 +- dev/sidekick/Sidekick_util__VecI32/.dune-keep | 0 dev/sidekick/Sidekick_util__VecI32/index.html | 2 ++ dev/sidekick/Sidekick_util__Vec_float/.dune-keep | 0 dev/sidekick/Sidekick_util__Vec_float/index.html | 2 ++ dev/sidekick/Sidekick_util__Vec_sig/.dune-keep | 0 dev/sidekick/Sidekick_util__Vec_sig/index.html | 2 ++ .../Sidekick_util__Vec_sig/module-type-S/index.html | 2 ++ dev/sidekick/index.html | 2 +- 840 files changed, 848 insertions(+), 866 deletions(-) delete mode 100644 dev/sidekick-base/Sidekick_base/Arg/Fun/index.html delete mode 100644 dev/sidekick-base/Sidekick_base/Arg/Term/index.html delete mode 100644 dev/sidekick-base/Sidekick_base/Arg/Ty/index.html delete mode 100644 dev/sidekick-base/Sidekick_base/Arg/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Lit/index.html delete mode 100644 dev/sidekick-base/Sidekick_base/Proof/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base/Proof/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Proof_stub/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Solver_arg/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Solver_arg/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Lit/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__/Proof/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Proof_stub/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Solver_arg/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Solver_arg/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Solver_arg/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base__/Solver_arg/index.html rename dev/sidekick-base/{Sidekick_base__Proof => Sidekick_base__Lit}/.dune-keep (100%) create mode 100644 dev/sidekick-base/Sidekick_base__Lit/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Proof/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Proof/index.html rename dev/{sidekick/Sidekick_backend => sidekick-base/Sidekick_base__Proof_stub}/.dune-keep (100%) create mode 100644 dev/sidekick-base/Sidekick_base__Proof_stub/index.html rename dev/{sidekick/Sidekick_backend__Backend_intf => sidekick-base/Sidekick_base__Solver_arg}/.dune-keep (100%) create mode 100644 dev/sidekick-base/Sidekick_base__Solver_arg/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base__Solver_arg/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base__Solver_arg/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base__Solver_arg/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/Quip/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Atom/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Pre_proof/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/Quip/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Atom/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Pre_proof/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/Quip/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Atom/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Pre_proof/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/Quip/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html rename dev/{sidekick/Sidekick_backend__Dot => sidekick-bin/Sidekick_bin_lib}/.dune-keep (100%) create mode 100644 dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib/Dimacs_parser/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib/Drup_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib/Drup_parser/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib/index.html rename dev/{sidekick/Sidekick_msat_solver => sidekick-bin/Sidekick_bin_lib__}/.dune-keep (100%) create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_parser/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/Drup_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/Drup_parser/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep create mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Backend_intf/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html delete mode 100644 dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Backend_intf/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html delete mode 100644 dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_cc/Make/P/index.html create mode 100644 dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html delete mode 100644 dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_cc/module-type-S/Actions/P/index.html delete mode 100644 dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html delete mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-CC_PROOF/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-CC_S/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html delete mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Quip/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_drup/.dune-keep create mode 100644 dev/sidekick/Sidekick_drup/Make/Atom/index.html create mode 100644 dev/sidekick/Sidekick_drup/Make/Checker/index.html create mode 100644 dev/sidekick/Sidekick_drup/Make/Clause/index.html create mode 100644 dev/sidekick/Sidekick_drup/Make/index.html create mode 100644 dev/sidekick/Sidekick_drup/index.html create mode 100644 dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html create mode 100644 dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_drup/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_lit/.dune-keep create mode 100644 dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html create mode 100644 dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html create mode 100644 dev/sidekick/Sidekick_lit/Make/index.html create mode 100644 dev/sidekick/Sidekick_lit/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Model/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Pre_proof/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/index.html delete mode 100644 dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-LIT/index.html delete mode 100644 dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-LIT/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Lit/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-LIT/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Lit/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Proof/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Lit/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/.dune-keep create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Model/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html rename dev/sidekick/{Sidekick_msat_solver/Make/argument-1-A => Sidekick_smt_solver/module-type-ARG}/T/index.html (58%) create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Lit/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Model/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/T/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/Unknown/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/module-type-S/module-type-THEORY/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Quip/index.html delete mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Pre_proof/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_util/Bitvec/index.html create mode 100644 dev/sidekick/Sidekick_util/VecI32/index.html create mode 100644 dev/sidekick/Sidekick_util/Vec_float/index.html create mode 100644 dev/sidekick/Sidekick_util/Vec_sig/index.html create mode 100644 dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_util__/Bitvec/index.html create mode 100644 dev/sidekick/Sidekick_util__/VecI32/index.html create mode 100644 dev/sidekick/Sidekick_util__/Vec_float/index.html create mode 100644 dev/sidekick/Sidekick_util__/Vec_sig/index.html create mode 100644 dev/sidekick/Sidekick_util__/Vec_sig/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_util__Bitvec/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__Bitvec/index.html create mode 100644 dev/sidekick/Sidekick_util__VecI32/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__VecI32/index.html create mode 100644 dev/sidekick/Sidekick_util__Vec_float/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__Vec_float/index.html create mode 100644 dev/sidekick/Sidekick_util__Vec_sig/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__Vec_sig/index.html create mode 100644 dev/sidekick/Sidekick_util__Vec_sig/module-type-S/index.html diff --git a/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html b/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html deleted file mode 100644 index 9cc95266..00000000 --- a/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick-base.Sidekick_base.Arg.Fun)

Module Arg.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t = Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Arg/Term/index.html b/dev/sidekick-base/Sidekick_base/Arg/Term/index.html deleted file mode 100644 index 8f635469..00000000 --- a/dev/sidekick-base/Sidekick_base/Arg/Term/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Term (sidekick-base.Sidekick_base.Arg.Term)

Module Arg.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t = Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Term.store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
-let y = f x x in
-let z = g y x in
-z = z

the DAG has the following nodes:

n1: 2
-n2: f n1 n1
-n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html b/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html deleted file mode 100644 index 230c5749..00000000 --- a/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick-base.Sidekick_base.Arg.Ty)

Module Arg.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t = Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Arg/index.html b/dev/sidekick-base/Sidekick_base/Arg/index.html deleted file mode 100644 index 2e1ea3e5..00000000 --- a/dev/sidekick-base/Sidekick_base/Arg/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Arg (sidekick-base.Sidekick_base.Arg)

Module Sidekick_base.Arg

Concrete implementation of Sidekick_core.TERM

this module gathers most definitions above in a form that is compatible with what Sidekick expects for terms, functions, etc.

module Fun : sig ... end with type t = Fun.t

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end with type t = Ty.t

Types

module Term : sig ... end with type t = Term.t and type store = Term.store

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Lit/index.html b/dev/sidekick-base/Sidekick_base/Lit/index.html new file mode 100644 index 00000000..447c3e56 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base.Lit)

Module Sidekick_base.Lit

include Sidekick_core.LIT with module T = Solver_arg
module T = Solver_arg

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof/Quip/index.html b/dev/sidekick-base/Sidekick_base/Proof/Quip/index.html deleted file mode 100644 index fae2bc88..00000000 --- a/dev/sidekick-base/Sidekick_base/Proof/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base.Proof.Quip)

Module Proof.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof/index.html b/dev/sidekick-base/Sidekick_base/Proof/index.html deleted file mode 100644 index 3c533608..00000000 --- a/dev/sidekick-base/Sidekick_base/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick-base.Sidekick_base.Proof)

Module Sidekick_base.Proof

Proofs of unsatisfiability

Proofs are used in sidekick when the problem is found unsatisfiable. A proof collects inferences made by the solver into a list of steps, each with its own kind of justification (e.g. "by congruence"), and outputs it in some kind of format.

Currently we target Quip as an experimental proof backend.

include Sidekick_core.PROOF with type term = Base_types.Term.t and type ty = Base_types.Ty.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Base_types.Term.t
type ty = Base_types.Ty.t
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
val isa_split : ty -> term Iter.t -> t
val isa_disj : ty -> term -> term -> t
val cstor_inj : Base_types.Cstor.t -> int -> term list -> term list -> t
val bool_eq : term -> term -> t
val bool_c : string -> term list -> t
val ite_true : term -> t
val ite_false : term -> t
val lra : lit Iter.t -> t
val lra_l : lit list -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof_stub/index.html b/dev/sidekick-base/Sidekick_base/Proof_stub/index.html new file mode 100644 index 00000000..f24cf0df --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Proof_stub/index.html @@ -0,0 +1,2 @@ + +Proof_stub (sidekick-base.Sidekick_base.Proof_stub)

Module Sidekick_base.Proof_stub

Dummy proof module that does nothing.

include Sidekick_core.PROOF with type lit = Lit.t and type term = Base_types.Term.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Base_types.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

val create : unit -> t
val lemma_bool_tauto : Lit.t Iter.t -> t -> unit
val lemma_bool_c : string -> term list -> t -> unit
val lemma_bool_equiv : term -> term -> t -> unit
val lemma_ite_true : a:term -> ite:term -> t -> unit
val lemma_ite_false : a:term -> ite:term -> t -> unit
val lemma_lra : Lit.t Iter.t -> t -> unit
val lemma_isa_split : Lit.t Iter.t -> t -> unit
val lemma_isa_disj : Lit.t Iter.t -> t -> unit
val lemma_cstor_inj : Lit.t Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html new file mode 100644 index 00000000..4189a816 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base.Solver_arg.Fun)

Module Solver_arg.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t = Base_types.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html new file mode 100644 index 00000000..59b7575b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick-base.Sidekick_base.Solver_arg.Term)

Module Solver_arg.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t = Base_types.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Base_types.Term.store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/Ty/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/Ty/index.html new file mode 100644 index 00000000..bd977e43 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base.Solver_arg.Ty)

Module Solver_arg.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t = Base_types.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Base_types.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/index.html new file mode 100644 index 00000000..8f2dca8e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/index.html @@ -0,0 +1,2 @@ + +Solver_arg (sidekick-base.Sidekick_base.Solver_arg)

Module Sidekick_base.Solver_arg

Concrete implementation of Sidekick_core.TERM

this module gathers most definitions above in a form that is compatible with what Sidekick expects for terms, functions, etc.

include Sidekick_core.TERM with type Term.t = Base_types.Term.t and type Fun.t = Base_types.Fun.t and type Ty.t = Base_types.Ty.t and type Term.store = Base_types.Term.store and type Ty.store = Base_types.Ty.store
module Fun : sig ... end with type t = Base_types.Fun.t

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end with type t = Base_types.Ty.t and type store = Base_types.Ty.store

Types

module Term : sig ... end with type t = Base_types.Term.t and type store = Base_types.Term.store

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/index.html b/dev/sidekick-base/Sidekick_base/index.html index bf40f5e8..8deb104a 100644 --- a/dev/sidekick-base/Sidekick_base/index.html +++ b/dev/sidekick-base/Sidekick_base/index.html @@ -1,2 +1,2 @@ -Sidekick_base (sidekick-base.Sidekick_base)

Module Sidekick_base

Sidekick base

This library is a starting point for writing concrete implementations of SMT solvers with Sidekick.

It provides a representation of terms, boolean formulas, linear arithmetic expressions, datatypes for the functors in Sidekick.

In addition, it has a notion of Statement. Statements are instructions for the SMT solver to do something, such as: define a new constant, declare a new constant, assert a formula as being true, set an option, check satisfiability of the set of statements added so far, etc. Logic formats such as SMT-LIB 2.6 are in fact based on a similar notion of statements, and a .smt2 files contains a list of statements.

module Base_types : sig ... end

Basic type definitions for Sidekick_base

module ID : sig ... end

Unique Identifiers

module Fun = Base_types.Fun
module Stat = Sidekick_util.Stat
module Model : sig ... end

Models

module Term = Base_types.Term
module Value = Base_types.Value
module Term_cell = Base_types.Term_cell
module Ty = Base_types.Ty
module Statement = Base_types.Statement
module Data = Base_types.Data
module Select = Base_types.Select
module Proof : sig ... end

Proofs of unsatisfiability

module Form : sig ... end

Formulas (boolean terms).

module IArray = Sidekick_util.IArray
module Arg : Sidekick_core.TERM with type Term.t = Term.t and type Fun.t = Fun.t and type Ty.t = Ty.t and type Term.store = Term.store

Concrete implementation of Sidekick_core.TERM

\ No newline at end of file +Sidekick_base (sidekick-base.Sidekick_base)

Module Sidekick_base

Sidekick base

This library is a starting point for writing concrete implementations of SMT solvers with Sidekick.

It provides a representation of terms, boolean formulas, linear arithmetic expressions, datatypes for the functors in Sidekick.

In addition, it has a notion of Statement. Statements are instructions for the SMT solver to do something, such as: define a new constant, declare a new constant, assert a formula as being true, set an option, check satisfiability of the set of statements added so far, etc. Logic formats such as SMT-LIB 2.6 are in fact based on a similar notion of statements, and a .smt2 files contains a list of statements.

module Base_types : sig ... end

Basic type definitions for Sidekick_base

module ID : sig ... end

Unique Identifiers

module Fun = Base_types.Fun
module Stat = Sidekick_util.Stat
module Model : sig ... end

Models

module Term = Base_types.Term
module Value = Base_types.Value
module Term_cell = Base_types.Term_cell
module Ty = Base_types.Ty
module Statement = Base_types.Statement
module Data = Base_types.Data
module Select = Base_types.Select
module Form : sig ... end

Formulas (boolean terms).

module Solver_arg : sig ... end

Concrete implementation of Sidekick_core.TERM

module Lit : sig ... end
module Proof_stub : sig ... end

Dummy proof module that does nothing.

module IArray = Sidekick_util.IArray
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Lit/index.html b/dev/sidekick-base/Sidekick_base__/Lit/index.html new file mode 100644 index 00000000..91f3c879 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base__.Lit)

Module Sidekick_base__.Lit

include Sidekick_core.LIT with module T = Sidekick_base.Solver_arg
module T = Sidekick_base.Solver_arg

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html b/dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html deleted file mode 100644 index 77afced7..00000000 --- a/dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base__.Proof.Quip)

Module Proof.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Proof/index.html b/dev/sidekick-base/Sidekick_base__/Proof/index.html deleted file mode 100644 index 1a1bc756..00000000 --- a/dev/sidekick-base/Sidekick_base__/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick-base.Sidekick_base__.Proof)

Module Sidekick_base__.Proof

include Sidekick_core.PROOF with type term = Sidekick_base.Base_types.Term.t and type ty = Sidekick_base.Base_types.Ty.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Sidekick_base.Base_types.Term.t
type ty = Sidekick_base.Base_types.Ty.t
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
val isa_split : ty -> term Iter.t -> t
val isa_disj : ty -> term -> term -> t
val cstor_inj : Sidekick_base.Base_types.Cstor.t -> int -> term list -> term list -> t
val bool_eq : term -> term -> t
val bool_c : string -> term list -> t
val ite_true : term -> t
val ite_false : term -> t
val lra : lit Iter.t -> t
val lra_l : lit list -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Proof_stub/index.html b/dev/sidekick-base/Sidekick_base__/Proof_stub/index.html new file mode 100644 index 00000000..84884924 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Proof_stub/index.html @@ -0,0 +1,2 @@ + +Proof_stub (sidekick-base.Sidekick_base__.Proof_stub)

Module Sidekick_base__.Proof_stub

include Sidekick_core.PROOF with type lit = Sidekick_base.Lit.t and type term = Sidekick_base.Base_types.Term.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Sidekick_base.Base_types.Term.t
type lit = Sidekick_base.Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

val create : unit -> t
val lemma_bool_tauto : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_bool_c : string -> term list -> t -> unit
val lemma_bool_equiv : term -> term -> t -> unit
val lemma_ite_true : a:term -> ite:term -> t -> unit
val lemma_ite_false : a:term -> ite:term -> t -> unit
val lemma_lra : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_isa_split : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_isa_disj : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_cstor_inj : Sidekick_base.Lit.t Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Solver_arg/Fun/index.html b/dev/sidekick-base/Sidekick_base__/Solver_arg/Fun/index.html new file mode 100644 index 00000000..0039bee1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Solver_arg/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base__.Solver_arg.Fun)

Module Solver_arg.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t = Sidekick_base.Base_types.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Solver_arg/Term/index.html b/dev/sidekick-base/Sidekick_base__/Solver_arg/Term/index.html new file mode 100644 index 00000000..f70acc10 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Solver_arg/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick-base.Sidekick_base__.Solver_arg.Term)

Module Solver_arg.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t = Sidekick_base.Base_types.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Base_types.Term.store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Solver_arg/Ty/index.html b/dev/sidekick-base/Sidekick_base__/Solver_arg/Ty/index.html new file mode 100644 index 00000000..7419ae2f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Solver_arg/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base__.Solver_arg.Ty)

Module Solver_arg.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t = Sidekick_base.Base_types.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Base_types.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Solver_arg/index.html b/dev/sidekick-base/Sidekick_base__/Solver_arg/index.html new file mode 100644 index 00000000..6a182e0b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__/Solver_arg/index.html @@ -0,0 +1,2 @@ + +Solver_arg (sidekick-base.Sidekick_base__.Solver_arg)

Module Sidekick_base__.Solver_arg

include Sidekick_core.TERM with type Term.t = Sidekick_base.Base_types.Term.t and type Fun.t = Sidekick_base.Base_types.Fun.t and type Ty.t = Sidekick_base.Base_types.Ty.t and type Term.store = Sidekick_base.Base_types.Term.store and type Ty.store = Sidekick_base.Base_types.Ty.store
module Fun : sig ... end with type t = Sidekick_base.Base_types.Fun.t

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end with type t = Sidekick_base.Base_types.Ty.t and type store = Sidekick_base.Base_types.Ty.store

Types

module Term : sig ... end with type t = Sidekick_base.Base_types.Term.t and type store = Sidekick_base.Base_types.Term.store

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/index.html b/dev/sidekick-base/Sidekick_base__/index.html index 0d615116..996452d8 100644 --- a/dev/sidekick-base/Sidekick_base__/index.html +++ b/dev/sidekick-base/Sidekick_base__/index.html @@ -1,2 +1,2 @@ -Sidekick_base__ (sidekick-base.Sidekick_base__)

Module Sidekick_base__

module Base_types : sig ... end
module CCHet : sig ... end
module Config : sig ... end
module Form : sig ... end
module Hashcons : sig ... end
module ID : sig ... end
module Model : sig ... end
module Proof : sig ... end
\ No newline at end of file +Sidekick_base__ (sidekick-base.Sidekick_base__)

Module Sidekick_base__

module Base_types : sig ... end
module CCHet : sig ... end
module Config : sig ... end
module Form : sig ... end
module Hashcons : sig ... end
module ID : sig ... end
module Lit : sig ... end
module Model : sig ... end
module Proof_stub : sig ... end
module Solver_arg : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Proof/.dune-keep b/dev/sidekick-base/Sidekick_base__Lit/.dune-keep similarity index 100% rename from dev/sidekick-base/Sidekick_base__Proof/.dune-keep rename to dev/sidekick-base/Sidekick_base__Lit/.dune-keep diff --git a/dev/sidekick-base/Sidekick_base__Lit/index.html b/dev/sidekick-base/Sidekick_base__Lit/index.html new file mode 100644 index 00000000..862e8479 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Lit/index.html @@ -0,0 +1,2 @@ + +Sidekick_base__Lit (sidekick-base.Sidekick_base__Lit)

Module Sidekick_base__Lit

include Sidekick_core.LIT with module T = Sidekick_base.Solver_arg
module T = Sidekick_base.Solver_arg

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Proof/Quip/index.html b/dev/sidekick-base/Sidekick_base__Proof/Quip/index.html deleted file mode 100644 index 0da47574..00000000 --- a/dev/sidekick-base/Sidekick_base__Proof/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base__Proof.Quip)

Module Sidekick_base__Proof.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Proof/index.html b/dev/sidekick-base/Sidekick_base__Proof/index.html deleted file mode 100644 index ed88f9f5..00000000 --- a/dev/sidekick-base/Sidekick_base__Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Proof (sidekick-base.Sidekick_base__Proof)

Module Sidekick_base__Proof

Proofs of unsatisfiability

Proofs are used in sidekick when the problem is found unsatisfiable. A proof collects inferences made by the solver into a list of steps, each with its own kind of justification (e.g. "by congruence"), and outputs it in some kind of format.

Currently we target Quip as an experimental proof backend.

include Sidekick_core.PROOF with type term = Sidekick_base.Base_types.Term.t and type ty = Sidekick_base.Base_types.Ty.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Sidekick_base.Base_types.Term.t
type ty = Sidekick_base.Base_types.Ty.t
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
val isa_split : ty -> term Iter.t -> t
val isa_disj : ty -> term -> term -> t
val cstor_inj : Sidekick_base.Base_types.Cstor.t -> int -> term list -> term list -> t
val bool_eq : term -> term -> t
val bool_c : string -> term list -> t
val ite_true : term -> t
val ite_false : term -> t
val lra : lit Iter.t -> t
val lra_l : lit list -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/.dune-keep b/dev/sidekick-base/Sidekick_base__Proof_stub/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_backend/.dune-keep rename to dev/sidekick-base/Sidekick_base__Proof_stub/.dune-keep diff --git a/dev/sidekick-base/Sidekick_base__Proof_stub/index.html b/dev/sidekick-base/Sidekick_base__Proof_stub/index.html new file mode 100644 index 00000000..474b66c7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Proof_stub/index.html @@ -0,0 +1,2 @@ + +Sidekick_base__Proof_stub (sidekick-base.Sidekick_base__Proof_stub)

Module Sidekick_base__Proof_stub

Dummy proof module that does nothing.

include Sidekick_core.PROOF with type lit = Sidekick_base.Lit.t and type term = Sidekick_base.Base_types.Term.t
type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = Sidekick_base.Base_types.Term.t
type lit = Sidekick_base.Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

val create : unit -> t
val lemma_bool_tauto : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_bool_c : string -> term list -> t -> unit
val lemma_bool_equiv : term -> term -> t -> unit
val lemma_ite_true : a:term -> ite:term -> t -> unit
val lemma_ite_false : a:term -> ite:term -> t -> unit
val lemma_lra : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_isa_split : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_isa_disj : Sidekick_base.Lit.t Iter.t -> t -> unit
val lemma_cstor_inj : Sidekick_base.Lit.t Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Backend_intf/.dune-keep b/dev/sidekick-base/Sidekick_base__Solver_arg/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_backend__Backend_intf/.dune-keep rename to dev/sidekick-base/Sidekick_base__Solver_arg/.dune-keep diff --git a/dev/sidekick-base/Sidekick_base__Solver_arg/Fun/index.html b/dev/sidekick-base/Sidekick_base__Solver_arg/Fun/index.html new file mode 100644 index 00000000..c1fbc570 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Solver_arg/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base__Solver_arg.Fun)

Module Sidekick_base__Solver_arg.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t = Sidekick_base.Base_types.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Solver_arg/Term/index.html b/dev/sidekick-base/Sidekick_base__Solver_arg/Term/index.html new file mode 100644 index 00000000..1850ddca --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Solver_arg/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick-base.Sidekick_base__Solver_arg.Term)

Module Sidekick_base__Solver_arg.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t = Sidekick_base.Base_types.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Base_types.Term.store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Solver_arg/Ty/index.html b/dev/sidekick-base/Sidekick_base__Solver_arg/Ty/index.html new file mode 100644 index 00000000..d51e3545 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Solver_arg/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base__Solver_arg.Ty)

Module Sidekick_base__Solver_arg.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t = Sidekick_base.Base_types.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Base_types.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Solver_arg/index.html b/dev/sidekick-base/Sidekick_base__Solver_arg/index.html new file mode 100644 index 00000000..ace30e3c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base__Solver_arg/index.html @@ -0,0 +1,2 @@ + +Sidekick_base__Solver_arg (sidekick-base.Sidekick_base__Solver_arg)

Module Sidekick_base__Solver_arg

Concrete implementation of Sidekick_core.TERM

this module gathers most definitions above in a form that is compatible with what Sidekick expects for terms, functions, etc.

include Sidekick_core.TERM with type Term.t = Sidekick_base.Base_types.Term.t and type Fun.t = Sidekick_base.Base_types.Fun.t and type Ty.t = Sidekick_base.Base_types.Ty.t and type Term.store = Sidekick_base.Base_types.Term.store and type Ty.store = Sidekick_base.Base_types.Ty.store
module Fun : sig ... end with type t = Sidekick_base.Base_types.Fun.t

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end with type t = Sidekick_base.Base_types.Ty.t and type store = Sidekick_base.Base_types.Ty.store

Types

module Term : sig ... end with type t = Sidekick_base.Base_types.Term.t and type store = Sidekick_base.Base_types.Term.store

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html deleted file mode 100644 index f801fa46..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-base.Sidekick_base_solver.Solver.Atom)

Module Solver.Atom

type t = Sidekick_msat_solver.Make(Solver_arg).Atom.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Fun/index.html index 2ff78b27..5661f264 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Fun)

Module T.Fun

type t = T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/Tbl/index.html index f9b6d70c..f974d57e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/index.html index a6596c88..b409ba56 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Term)

Module T.Term

type t = T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file +Term (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Ty/index.html index 33f93e3f..5df6c39c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Ty)

Module T.Ty

type t = T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/index.html index f6324ba7..64e2d148 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Solver.Lit)

Module Solver.Lit

module T : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Lit)

Module Solver.Lit

module T : sig ... end
type t = Solver_arg.Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html index 3cc6f6ca..5f6193df 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base_solver.Solver.Model)

Module Solver.Model

type t = Sidekick_msat_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-base.Sidekick_base_solver.Solver.Model)

Module Solver.Model

type t = Sidekick_smt_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html deleted file mode 100644 index 7455b516..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Solver.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/P/index.html index ce35e2aa..c3038009 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Solver.P)

Module Solver.P

type t = Solver_arg.P.t
type term = Solver_arg.T.Term.t
type ty = Solver_arg.P.ty
type hres_step = Solver_arg.P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = Solver_arg.P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = Solver_arg.P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.P)

Module Solver.P

type t = Solver_arg.proof
type term = Solver_arg.T.Term.t
type lit = Solver_arg.Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html deleted file mode 100644 index 3505b529..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-base.Sidekick_base_solver.Solver.Pre_proof)

Module Solver.Pre_proof

type t = Sidekick_msat_solver.Make(Solver_arg).Pre_proof.t
val output : Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option
val check : t -> unit
val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/index.html index f0de8d7d..b3675585 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/Quip/index.html deleted file mode 100644 index 10559ca0..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/index.html index 57f9f072..44f82238 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/index.html index 8e495668..c23cb2b2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
module P : sig ... end
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit
\ No newline at end of file +Actions (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = theory_actions
val raise_conflict : t -> Lit.t list -> dproof -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Expl/index.html index 6fe28c44..eb1e3184 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/index.html index de78bb89..f6f8ed40 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html index e72c4113..6a6793e8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Quip/index.html deleted file mode 100644 index 5ee02b96..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/index.html index 1f7d607a..12f1e38d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P)

Module CC.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/index.html index e10bfdfe..7eda8ea5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/index.html index ffc47031..a93a207d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/Quip/index.html deleted file mode 100644 index d0b4d295..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/index.html index e1e526a4..951bd6f2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P)

Module Solver_internal.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P)

Module Solver_internal.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html index f18c6b43..f3a06207 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
type hook = t -> term -> (term * proof) option
val normalize : t -> term -> (term * P.t) option
val normalize_t : t -> term -> term * P.t
\ No newline at end of file +Simplify (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option
val normalize : t -> term -> term option
val normalize_t : t -> term -> term
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/index.html index 75aa7bd4..3e5b6083 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Solver.Solver_internal)

Module Solver.Solver_internal

module T : sig ... end
module P : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
type actions = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.actions
module Lit : sig ... end
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option
val simp_t : t -> term -> term * proof
val raise_conflict : t -> actions -> lit list -> proof -> 'a
val push_decision : t -> actions -> lit -> unit
val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit
val propagate_l : t -> actions -> lit -> lit list -> proof -> unit
val add_clause_temp : t -> actions -> lit list -> proof -> unit
val add_clause_permanent : t -> actions -> lit list -> proof -> unit
val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof
val add_lit : t -> actions -> lit -> unit
val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit
val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option
val on_preprocess : t -> preprocess_hook -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Solver.Solver_internal)

Module Solver.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit
type theory_actions = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.theory_actions
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option
val simp_t : t -> term -> term
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> term option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit
val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit
val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term
val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..7fe6bf99 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit
val add_clause : lit list -> dproof -> unit
val add_lit : ?⁠default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html index 271473d7..624ca9ff 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base_solver.Solver.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/Tbl/index.html index bf0f206d..d1805750 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base_solver.Solver.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/index.html index ec018320..5a829b1b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file +Term (sidekick-base.Sidekick_base_solver.Solver.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Ty/index.html index f6acace1..251f22c9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick-base.Sidekick_base_solver.Solver.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Unknown/index.html index cf4f7d5a..1c2a7d49 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Unknown/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-base.Sidekick_base_solver.Solver.Unknown)

Module Solver.Unknown

type t = Sidekick_msat_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-base.Sidekick_base_solver.Solver.Unknown)

Module Solver.Unknown

type t = Sidekick_smt_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/index.html index 74c4cf2a..c6c72d63 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-base.Sidekick_base_solver.Solver)

Module Sidekick_base_solver.Solver

SMT solver, obtained from Sidekick_msat_solver

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t
val mk_atom_lit' : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t
val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit
val add_clause_l : t -> Atom.t list -> P.t -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
module Pre_proof : sig ... end
type res = Sidekick_msat_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
proof : Pre_proof.t option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file +Solver (sidekick-base.Sidekick_base_solver.Solver)

Module Sidekick_base_solver.Solver

SMT solver, obtained from Sidekick_smt_solver

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
module P : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit
val add_clause_l : t -> lit list -> dproof -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver_arg/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver_arg/index.html index 2660668c..117f3f7b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver_arg/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver_arg/index.html @@ -1,2 +1,2 @@ -Solver_arg (sidekick-base.Sidekick_base_solver.Solver_arg)

Module Sidekick_base_solver.Solver_arg

Argument to the SMT solver

module T = Sidekick_base
val cc_view : Sidekick_base.Term.t -> (Sidekick_base__Base_types.fun_Sidekick_base.Term.tSidekick_base.Term.t Iter.t) Sidekick_base__Base_types.CC_view.t
val is_valid_literal : 'a -> bool
\ No newline at end of file +Solver_arg (sidekick-base.Sidekick_base_solver.Solver_arg)

Module Sidekick_base_solver.Solver_arg

Argument to the SMT solver

module Lit = Sidekick_base.Lit
val cc_view : Sidekick_base.Term.t -> (Sidekick_base__Base_types.fun_Sidekick_base.Term.tSidekick_base.Term.t Iter.t) Sidekick_base__Base_types.CC_view.t
val is_valid_literal : 'a -> bool
type proof = P.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Atom/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Atom/index.html deleted file mode 100644 index 04dae234..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Atom)

Module S.Atom

type t = Sidekick_msat_solver.Make(Solver_arg).Atom.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/index.html index 72761b99..ef9964a6 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Solver_arg.Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html index 6c2f3d25..e2ea6db8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Model)

Module S.Model

type t = Sidekick_msat_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Model)

Module S.Model

type t = Sidekick_smt_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Quip/index.html deleted file mode 100644 index 46e64363..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/index.html index 722549c9..7071d6f5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P)

Module S.P

type t = Solver_arg.P.t
type term = T.Term.t
type ty = Solver_arg.P.ty
type hres_step = Solver_arg.P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = Solver_arg.P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = Solver_arg.P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P)

Module S.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Pre_proof/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Pre_proof/index.html deleted file mode 100644 index ac3f7986..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Pre_proof)

Module S.Pre_proof

type t = Sidekick_msat_solver.Make(Solver_arg).Pre_proof.t
val output : Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option
val check : t -> unit
val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html index 489fc263..5c5d0192 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/Quip/index.html deleted file mode 100644 index 928346e4..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/index.html index ae90222e..b83ebc04 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/index.html index f485439a..1454ba85 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
module P : sig ... end
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit
\ No newline at end of file +Actions (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = theory_actions
val raise_conflict : t -> Lit.t list -> dproof -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Expl/index.html index 2d10476f..741a8cbd 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/index.html index 0a14bede..853a5db6 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html index 01a70123..d64a1158 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Quip/index.html deleted file mode 100644 index 87a90f04..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/index.html index 07024156..ae3175c8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P)

Module CC.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/index.html index 692d8e18..b2fa63ef 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/index.html index 767eb8b9..b2b2b8ad 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/Quip/index.html deleted file mode 100644 index efad14de..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/index.html index 3b8e49a6..ffe62de4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P)

Module Solver_internal.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html index 665fdb7a..73a40742 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
type hook = t -> term -> (term * proof) option
val normalize : t -> term -> (term * P.t) option
val normalize_t : t -> term -> term * P.t
\ No newline at end of file +Simplify (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option
val normalize : t -> term -> term option
val normalize_t : t -> term -> term
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/index.html index 3a28e7f7..05709ab0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module P : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
type actions = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.actions
module Lit : sig ... end
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option
val simp_t : t -> term -> term * proof
val raise_conflict : t -> actions -> lit list -> proof -> 'a
val push_decision : t -> actions -> lit -> unit
val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit
val propagate_l : t -> actions -> lit -> lit list -> proof -> unit
val add_clause_temp : t -> actions -> lit list -> proof -> unit
val add_clause_permanent : t -> actions -> lit list -> proof -> unit
val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof
val add_lit : t -> actions -> lit -> unit
val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit
val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option
val on_preprocess : t -> preprocess_hook -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit
type theory_actions = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.theory_actions
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option
val simp_t : t -> term -> term
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> term option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit
val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit
val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term
val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..315503a8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit
val add_clause : lit list -> dproof -> unit
val add_lit : ?⁠default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html index d19a5075..1b51ab14 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/Tbl/index.html index d983ec88..96b810e1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/index.html index 81faad73..7c62d2a8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file +Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Ty/index.html index 00a2622b..7e83fde2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Unknown/index.html index 7cc8d6cc..171ea480 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Unknown/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Unknown)

Module S.Unknown

type t = Sidekick_msat_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Unknown)

Module S.Unknown

type t = Sidekick_smt_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/index.html index 5342eb73..9a9daa66 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick-base.Sidekick_base_solver.Th_bool.A.S)

Module A.S

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t
val mk_atom_lit' : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t
val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit
val add_clause_l : t -> Atom.t list -> P.t -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
module Pre_proof : sig ... end
type res = Sidekick_msat_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
proof : Pre_proof.t option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_bool.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
module P : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit
val add_clause_l : t -> lit list -> dproof -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/index.html index e01786b3..68fd3f57 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/index.html @@ -1,2 +1,2 @@ -A (sidekick-base.Sidekick_base_solver.Th_bool.A)

Module Th_bool.A

module S : sig ... end
type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) Sidekick_th_bool_static.bool_view
val proof_ite_true : S.T.Term.t -> S.P.t
val proof_ite_false : S.T.Term.t -> S.P.t
val proof_bool_eq : S.T.Term.t -> S.T.Term.t -> S.P.t
val proof_bool_c : string -> term list -> S.P.t
val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> term
val check_congruence_classes : bool
module Gensym : sig ... end
\ No newline at end of file +A (sidekick-base.Sidekick_base_solver.Th_bool.A)

Module Th_bool.A

module S : sig ... end
type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) Sidekick_th_bool_static.bool_view
val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> term
val check_congruence_classes : bool
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> unit
val lemma_bool_c : string -> term list -> S.P.t -> unit
val lemma_bool_equiv : term -> term -> S.P.t -> unit
val lemma_ite_true : a:term -> ite:term -> S.P.t -> unit
val lemma_ite_false : a:term -> ite:term -> S.P.t -> unit
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Atom/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Atom/index.html deleted file mode 100644 index 3d872b48..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-base.Sidekick_base_solver.Th_data.A.S.Atom)

Module S.Atom

type t = Sidekick_msat_solver.Make(Solver_arg).Atom.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/index.html index c2c90c3e..a4da4120 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Solver_arg.Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html index 7aceb215..fd944732 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base_solver.Th_data.A.S.Model)

Module S.Model

type t = Sidekick_msat_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-base.Sidekick_base_solver.Th_data.A.S.Model)

Module S.Model

type t = Sidekick_smt_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Quip/index.html deleted file mode 100644 index 6237cc53..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_data.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/index.html index 814ac2bf..3b7bff79 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.P)

Module S.P

type t = Solver_arg.P.t
type term = T.Term.t
type ty = Solver_arg.P.ty
type hres_step = Solver_arg.P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = Solver_arg.P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = Solver_arg.P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.P)

Module S.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Pre_proof/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Pre_proof/index.html deleted file mode 100644 index b1e2fcf4..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-base.Sidekick_base_solver.Th_data.A.S.Pre_proof)

Module S.Pre_proof

type t = Sidekick_msat_solver.Make(Solver_arg).Pre_proof.t
val output : Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option
val check : t -> unit
val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html index 95a6c56f..1049c46c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/Quip/index.html deleted file mode 100644 index 14709844..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/index.html index 4515fb1c..7cbc822f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/index.html index 0e69f2b4..f8f902f0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
module P : sig ... end
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit
\ No newline at end of file +Actions (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = theory_actions
val raise_conflict : t -> Lit.t list -> dproof -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Expl/index.html index 6061adb7..f36c240b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/index.html index 185d69ed..dccdd95f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html index 0b699b89..58836fa4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Quip/index.html deleted file mode 100644 index cc440c06..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/index.html index db321196..4d25aad7 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P)

Module CC.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/index.html index 8cbec95f..9030866f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/index.html index 0dc0b10a..b83b8be5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/Quip/index.html deleted file mode 100644 index 7ac1435d..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/index.html index 0ad6796c..c675270c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P)

Module Solver_internal.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html index 9b873bc8..65ce216d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
type hook = t -> term -> (term * proof) option
val normalize : t -> term -> (term * P.t) option
val normalize_t : t -> term -> term * P.t
\ No newline at end of file +Simplify (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option
val normalize : t -> term -> term option
val normalize_t : t -> term -> term
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/index.html index c750e5c0..3a5c1885 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module P : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
type actions = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.actions
module Lit : sig ... end
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option
val simp_t : t -> term -> term * proof
val raise_conflict : t -> actions -> lit list -> proof -> 'a
val push_decision : t -> actions -> lit -> unit
val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit
val propagate_l : t -> actions -> lit -> lit list -> proof -> unit
val add_clause_temp : t -> actions -> lit list -> proof -> unit
val add_clause_permanent : t -> actions -> lit list -> proof -> unit
val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof
val add_lit : t -> actions -> lit -> unit
val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit
val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option
val on_preprocess : t -> preprocess_hook -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit
type theory_actions = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.theory_actions
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option
val simp_t : t -> term -> term
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> term option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit
val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit
val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term
val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..2a7496dd --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit
val add_clause : lit list -> dproof -> unit
val add_lit : ?⁠default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html index 8f2c6aef..9de129e3 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/Tbl/index.html index 5c5c7d08..6e308ae9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/index.html index d6b5e28c..feb1eea5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file +Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Ty/index.html index d54f1dfd..84ce2a40 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Unknown/index.html index 829b2d13..796ea115 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Unknown/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-base.Sidekick_base_solver.Th_data.A.S.Unknown)

Module S.Unknown

type t = Sidekick_msat_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-base.Sidekick_base_solver.Th_data.A.S.Unknown)

Module S.Unknown

type t = Sidekick_smt_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/index.html index 3b05bcba..3f3693b3 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick-base.Sidekick_base_solver.Th_data.A.S)

Module A.S

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t
val mk_atom_lit' : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t
val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit
val add_clause_l : t -> Atom.t list -> P.t -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
module Pre_proof : sig ... end
type res = Sidekick_msat_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
proof : Pre_proof.t option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_data.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
module P : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit
val add_clause_l : t -> lit list -> dproof -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/index.html index 6eba0488..b681130d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/index.html @@ -1,2 +1,2 @@ -A (sidekick-base.Sidekick_base_solver.Th_data.A)

Module Th_data.A

module S : sig ... end
module Cstor : sig ... end
val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) Sidekick_th_data.data_ty_view
val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) Sidekick_th_data.data_view
val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t
val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t
val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t
val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t
val ty_is_finite : S.T.Ty.t -> bool
val ty_set_is_finite : S.T.Ty.t -> bool -> unit
val proof_isa_split : S.T.Ty.t -> S.T.Term.t Iter.t -> S.P.t
val proof_isa_disj : S.T.Ty.t -> S.T.Term.t -> S.T.Term.t -> S.P.t
val proof_cstor_inj : Cstor.t -> int -> S.T.Term.t list -> S.T.Term.t list -> S.P.t
\ No newline at end of file +A (sidekick-base.Sidekick_base_solver.Th_data.A)

Module Th_data.A

module S : sig ... end
module Cstor : sig ... end
val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) Sidekick_th_data.data_ty_view
val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) Sidekick_th_data.data_view
val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t
val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t
val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t
val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t
val ty_is_finite : S.T.Ty.t -> bool
val ty_set_is_finite : S.T.Ty.t -> bool -> unit
val lemma_isa_split : S.Lit.t Iter.t -> S.proof -> unit
val lemma_isa_disj : S.Lit.t Iter.t -> S.proof -> unit
val lemma_cstor_inj : S.Lit.t Iter.t -> S.proof -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Atom/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Atom/index.html deleted file mode 100644 index 3dbe464f..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Atom)

Module S.Atom

type t = Sidekick_msat_solver.Make(Solver_arg).Atom.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/index.html index 0cfbdfac..8e6c3b57 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Lit)

Module S.Lit

module T : sig ... end
type t = Solver_arg.Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html index c003243f..7180c240 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Model)

Module S.Model

type t = Sidekick_msat_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Model)

Module S.Model

type t = Sidekick_smt_solver.Make(Solver_arg).Model.t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Quip/index.html deleted file mode 100644 index 039859de..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/index.html index f1fe5f5d..068479be 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P)

Module S.P

type t = Solver_arg.P.t
type term = T.Term.t
type ty = Solver_arg.P.ty
type hres_step = Solver_arg.P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = Solver_arg.P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = Solver_arg.P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P)

Module S.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Pre_proof/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Pre_proof/index.html deleted file mode 100644 index d65381d7..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Pre_proof)

Module S.Pre_proof

type t = Sidekick_msat_solver.Make(Solver_arg).Pre_proof.t
val output : Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option
val check : t -> unit
val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html index 9b15c22b..0dc58d96 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/Quip/index.html deleted file mode 100644 index b89b1e49..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/index.html index 09e5a0e8..58bd8dcb 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/index.html index 4643d245..33572cdc 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
module P : sig ... end
type t = actions
val raise_conflict : t -> Lit.t list -> P.t -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit
\ No newline at end of file +Actions (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = theory_actions
val raise_conflict : t -> Lit.t list -> dproof -> 'a
val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Expl/index.html index daf1db5e..d240b906 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Expl)

Module CC.Expl

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Expl.t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/index.html index 4f6f810a..c6ff33db 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html index 5e9a4807..56fa48b1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.N)

Module CC.N

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.t
val term : t -> term
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
val is_root : t -> bool
val iter_class : t -> t Iter.t
val iter_parents : t -> t Iter.t
type bitfield = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.N.bitfield
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Quip/index.html deleted file mode 100644 index 6b47c1d7..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/index.html index f33f2393..67f87dba 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P)

Module CC.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/index.html index 0bac1763..cdf1a555 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type dproof = proof -> unit
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.t
module N : sig ... end
module Expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val find : t -> node -> repr
val add_term : t -> term -> node
val mem_term : t -> term -> bool
type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit
type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit
type ev_on_new_term = t -> N.t -> term -> unit
type ev_on_conflict = t -> th:bool -> lit list -> unit
type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit
type ev_on_is_subterm = N.t -> term -> unit
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Big | `Small ] -> term_store -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/index.html index b7650ed9..9483e0d8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/Quip/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/Quip/index.html deleted file mode 100644 index c9154137..00000000 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/index.html index 320e7774..c897a06c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P)

Module Solver_internal.P

type t = P.t
type term = T.Term.t
type ty = P.ty
type hres_step = P.hres_step
val r : t -> pivot:term -> hres_step
val r1 : t -> hres_step
val p : t -> lhs:term -> rhs:term -> hres_step
val p1 : t -> hres_step
type lit = P.lit
val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step = P.composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step
val is_trivial_refl : t -> bool
val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer
module Quip : sig ... end
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type term = T.Term.t
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit
type dproof = t -> unit
val with_proof : t -> (t -> unit) -> unit
val emit_input_clause : lit Iter.t -> t -> unit
val emit_redundant_clause : lit Iter.t -> t -> unit
val del_clause : lit Iter.t -> t -> unit
val begin_subproof : t -> unit
val end_subproof : t -> unit
val define_term : term -> term -> t -> unit
val lemma_true : term -> t -> unit
val lemma_preprocess : term -> term -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html index 14ab14f0..9cf879e6 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
type hook = t -> term -> (term * proof) option
val normalize : t -> term -> (term * P.t) option
val normalize_t : t -> term -> term * P.t
\ No newline at end of file +Simplify (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.Simplify.t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option
val normalize : t -> term -> term option
val normalize_t : t -> term -> term
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/index.html index ea4e9733..645fee92 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module P : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
type actions = Sidekick_msat_solver.Make(Solver_arg).Solver_internal.actions
module Lit : sig ... end
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option
val simp_t : t -> term -> term * proof
val raise_conflict : t -> actions -> lit list -> proof -> 'a
val push_decision : t -> actions -> lit -> unit
val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit
val propagate_l : t -> actions -> lit -> lit list -> proof -> unit
val add_clause_temp : t -> actions -> lit list -> proof -> unit
val add_clause_permanent : t -> actions -> lit list -> proof -> unit
val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof
val add_lit : t -> actions -> lit -> unit
val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit
val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit
type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option
val on_preprocess : t -> preprocess_hook -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit
module P : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.t
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit
type theory_actions = Sidekick_smt_solver.Make(Solver_arg).Solver_internal.theory_actions
type lit = Lit.t
val define_const : t -> const:term -> rhs:term -> unit
module CC : sig ... end
val cc : t -> CC.t
module Simplify : sig ... end
type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit
val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option
val simp_t : t -> term -> term
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> term option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit
val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit
val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term
val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..f479775c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit
val add_clause : lit list -> dproof -> unit
val add_lit : ?⁠default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html index 010059a0..f3bd852b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Fun)

Module T.Fun

type t = Solver_arg.T.Fun.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/Tbl/index.html index d6df5ee2..3221064e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a Solver_arg.T.Term.Tbl.t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_keys : 'a t -> key Stdlib.Seq.t
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val get : 'a t -> key -> 'a option
val get_or : 'a t -> key -> default:'a -> 'a
val add_list : 'a list t -> key -> 'a -> unit
val incr : ?⁠by:int -> int t -> key -> unit
val decr : ?⁠by:int -> int t -> key -> unit
val keys : 'a t -> key CCHashtbl.iter
val values : 'a t -> 'a CCHashtbl.iter
val keys_list : 'a t -> key list
val values_list : 'a t -> 'a list
val map_list : (key -> 'a -> 'b) -> 'a t -> 'b list
val to_iter : 'a t -> (key * 'a) CCHashtbl.iter
val add_iter : 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_iter_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) CCHashtbl.iter -> unit
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val add_seq_with : f:(key -> 'a -> 'a -> 'a) -> 'a t -> (key * 'a) Stdlib.Seq.t -> unit
val of_iter : (key * 'a) CCHashtbl.iter -> 'a t
val of_iter_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) CCHashtbl.iter -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val of_seq_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_iter_count : int t -> key CCHashtbl.iter -> unit
val add_seq_count : int t -> key Stdlib.Seq.t -> unit
val of_iter_count : key CCHashtbl.iter -> int t
val of_seq_count : key Stdlib.Seq.t -> int t
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:(key -> 'a -> 'a -> 'a) -> (key * 'a) list -> 'a t
val update : 'a t -> f:(key -> 'a option -> 'a option) -> k:key -> unit
val get_or_add : 'a t -> f:(key -> 'a) -> k:key -> 'a
val pp : ?⁠pp_start:unit CCHashtbl.printer -> ?⁠pp_stop:unit CCHashtbl.printer -> ?⁠pp_sep:unit CCHashtbl.printer -> ?⁠pp_arrow:unit CCHashtbl.printer -> key CCHashtbl.printer -> 'a CCHashtbl.printer -> 'a t CCHashtbl.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/index.html index 3e005757..80a285f1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file +Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Term)

Module T.Term

type t = Solver_arg.T.Term.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Term.store
val ty : t -> Ty.t
val bool : store -> bool -> t
val as_bool : t -> bool option
val abs : store -> t -> t * bool
val map_shallow : store -> (t -> t) -> t -> t
val iter_dag : t -> (t -> unit) -> unit
module Tbl : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Ty/index.html index f57c9a47..a5d7a07b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T.Ty)

Module T.Ty

type t = Solver_arg.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Solver_arg.T.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Unknown/index.html index 5c41b60a..51d8489d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Unknown/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Unknown)

Module S.Unknown

type t = Sidekick_msat_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Unknown)

Module S.Unknown

type t = Sidekick_smt_solver.Make(Solver_arg).Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/index.html index a4088668..5df924f8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick-base.Sidekick_base_solver.Th_lra.A.S)

Module A.S

module T : sig ... end
module P : sig ... end
module Lit : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_msat_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Atom : sig ... end
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t
val mk_atom_lit' : t -> lit -> Atom.t
val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t
val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t
val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit
val add_clause_l : t -> Atom.t list -> P.t -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
module Pre_proof : sig ... end
type res = Sidekick_msat_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
proof : Pre_proof.t option lazy_t;
unsat_core : Atom.t list lazy_t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_lra.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
module P : sig ... end
module Solver_internal : sig ... end
type t = Sidekick_smt_solver.Make(Solver_arg).t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit
module type THEORY = sig ... end
type theory = (module THEORY)
type !'a theory_p = (module THEORY with type t = 'a)
val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory
module Model : sig ... end
module Unknown : sig ... end
val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit
val add_clause_l : t -> lit list -> dproof -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
}
| Unknown of Unknown.t
val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/index.html index e40508fc..9497dca9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/index.html @@ -1,2 +1,2 @@ -A (sidekick-base.Sidekick_base_solver.Th_lra.A)

Module Th_lra.A

module S : sig ... end
module Q : sig ... end
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) Sidekick_arith_lra.lra_view
val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) Sidekick_arith_lra.lra_view -> term
val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_real : term -> bool
val proof_lra : S.P.lit Iter.t -> S.P.t
val proof_lra_l : S.P.lit list -> S.P.t
module Gensym : sig ... end
\ No newline at end of file +A (sidekick-base.Sidekick_base_solver.Th_lra.A)

Module Th_lra.A

module S : sig ... end
module Q : sig ... end
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) Sidekick_arith_lra.lra_view
val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) Sidekick_arith_lra.lra_view -> term
val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_real : term -> bool
val lemma_lra : S.Lit.t Iter.t -> S.proof -> unit
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/index.html b/dev/sidekick-base/Sidekick_base_solver/index.html index 387700bc..84eee210 100644 --- a/dev/sidekick-base/Sidekick_base_solver/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/index.html @@ -1,2 +1,2 @@ -Sidekick_base_solver (sidekick-base.Sidekick_base_solver)

Module Sidekick_base_solver

SMT Solver and Theories for Sidekick_base.

This contains instances of the SMT solver, and theories, from Sidekick_core, using data structures from Sidekick_base.

module Solver_arg : sig ... end

Argument to the SMT solver

module Solver : sig ... end

SMT solver, obtained from Sidekick_msat_solver

module Th_data : sig ... end

Theory of datatypes

module Th_bool : sig ... end

Reducing boolean formulas to clauses

module Th_lra : sig ... end

Theory of Linear Rational Arithmetic

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
\ No newline at end of file +Sidekick_base_solver (sidekick-base.Sidekick_base_solver)

Module Sidekick_base_solver

SMT Solver and Theories for Sidekick_base.

This contains instances of the SMT solver, and theories, from Sidekick_core, using data structures from Sidekick_base.

module Solver_arg : sig ... end

Argument to the SMT solver

module Solver : sig ... end

SMT solver, obtained from Sidekick_smt_solver

module Th_data : sig ... end

Theory of datatypes

module Th_bool : sig ... end

Reducing boolean formulas to clauses

module Th_lra : sig ... end

Theory of Linear Rational Arithmetic

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_backend__Dot/.dune-keep rename to dev/sidekick-bin/Sidekick_bin_lib/.dune-keep diff --git a/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html new file mode 100644 index 00000000..31085f08 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html @@ -0,0 +1,2 @@ + +Dimacs_lexer (sidekick-bin.Sidekick_bin_lib.Dimacs_lexer)

Module Sidekick_bin_lib.Dimacs_lexer

type token =
| EOF
| P
| CNF
| ZERO
| LIT of int
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_parser/index.html new file mode 100644 index 00000000..a7ff20b2 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_parser/index.html @@ -0,0 +1,2 @@ + +Dimacs_parser (sidekick-bin.Sidekick_bin_lib.Dimacs_parser)

Module Sidekick_bin_lib.Dimacs_parser

DIMACS parser

type t
val create : Stdlib.in_channel -> t
val parse_header : t -> int * int
val next_clause : t -> int list option
val iter : t -> int list Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib/Drup_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib/Drup_lexer/index.html new file mode 100644 index 00000000..66162906 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib/Drup_lexer/index.html @@ -0,0 +1,2 @@ + +Drup_lexer (sidekick-bin.Sidekick_bin_lib.Drup_lexer)

Module Sidekick_bin_lib.Drup_lexer

type token =
| EOF
| ZERO
| LIT of int
| D
| R
| I
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib/Drup_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib/Drup_parser/index.html new file mode 100644 index 00000000..1b036f6c --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib/Drup_parser/index.html @@ -0,0 +1,2 @@ + +Drup_parser (sidekick-bin.Sidekick_bin_lib.Drup_parser)

Module Sidekick_bin_lib.Drup_parser

DRUP parser

type t
type event =
| Input of int list
| Add of int list
| Delete of int list
val create_chan : Stdlib.in_channel -> t
val create_string : string -> t
val next : t -> event option
val iter : t -> event Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib/index.html b/dev/sidekick-bin/Sidekick_bin_lib/index.html new file mode 100644 index 00000000..0a1618d6 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib (sidekick-bin.Sidekick_bin_lib)

Module Sidekick_bin_lib

Library for the Sidekick executables

module Dimacs_lexer : sig ... end
module Dimacs_parser : sig ... end
module Drup_lexer : sig ... end
module Drup_parser : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib__/.dune-keep similarity index 100% rename from dev/sidekick/Sidekick_msat_solver/.dune-keep rename to dev/sidekick-bin/Sidekick_bin_lib__/.dune-keep diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_lexer/index.html new file mode 100644 index 00000000..349eacf8 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_lexer/index.html @@ -0,0 +1,2 @@ + +Dimacs_lexer (sidekick-bin.Sidekick_bin_lib__.Dimacs_lexer)

Module Sidekick_bin_lib__.Dimacs_lexer

type token =
| EOF
| P
| CNF
| ZERO
| LIT of int
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_parser/index.html new file mode 100644 index 00000000..2af8c4e4 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__/Dimacs_parser/index.html @@ -0,0 +1,2 @@ + +Dimacs_parser (sidekick-bin.Sidekick_bin_lib__.Dimacs_parser)

Module Sidekick_bin_lib__.Dimacs_parser

DIMACS parser

type t
val create : Stdlib.in_channel -> t
val parse_header : t -> int * int
val next_clause : t -> int list option
val iter : t -> int list Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/Drup_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/Drup_lexer/index.html new file mode 100644 index 00000000..02b2d2e3 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__/Drup_lexer/index.html @@ -0,0 +1,2 @@ + +Drup_lexer (sidekick-bin.Sidekick_bin_lib__.Drup_lexer)

Module Sidekick_bin_lib__.Drup_lexer

type token =
| EOF
| ZERO
| LIT of int
| D
| R
| I
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/Drup_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/Drup_parser/index.html new file mode 100644 index 00000000..21a69129 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__/Drup_parser/index.html @@ -0,0 +1,2 @@ + +Drup_parser (sidekick-bin.Sidekick_bin_lib__.Drup_parser)

Module Sidekick_bin_lib__.Drup_parser

DRUP parser

type t
type event =
| Input of int list
| Add of int list
| Delete of int list
val create_chan : Stdlib.in_channel -> t
val create_string : string -> t
val next : t -> event option
val iter : t -> event Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/index.html new file mode 100644 index 00000000..79c6ca72 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib__ (sidekick-bin.Sidekick_bin_lib__)

Module Sidekick_bin_lib__

module Dimacs_lexer : sig ... end
module Dimacs_parser : sig ... end
module Drup_lexer : sig ... end
module Drup_parser : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/index.html new file mode 100644 index 00000000..70dfbbdf --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib__Dimacs_lexer (sidekick-bin.Sidekick_bin_lib__Dimacs_lexer)

Module Sidekick_bin_lib__Dimacs_lexer

type token =
| EOF
| P
| CNF
| ZERO
| LIT of int
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/index.html new file mode 100644 index 00000000..7a944846 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib__Dimacs_parser (sidekick-bin.Sidekick_bin_lib__Dimacs_parser)

Module Sidekick_bin_lib__Dimacs_parser

DIMACS parser

type t
val create : Stdlib.in_channel -> t
val parse_header : t -> int * int
val next_clause : t -> int list option
val iter : t -> int list Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html new file mode 100644 index 00000000..081eb59f --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib__Drup_lexer (sidekick-bin.Sidekick_bin_lib__Drup_lexer)

Module Sidekick_bin_lib__Drup_lexer

type token =
| EOF
| ZERO
| LIT of int
| D
| R
| I
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html b/dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html new file mode 100644 index 00000000..3ffec293 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html @@ -0,0 +1,2 @@ + +Sidekick_bin_lib__Drup_parser (sidekick-bin.Sidekick_bin_lib__Drup_parser)

Module Sidekick_bin_lib__Drup_parser

DRUP parser

type t
type event =
| Input of int list
| Add of int list
| Delete of int list
val create_chan : Stdlib.in_channel -> t
val create_string : string -> t
val next : t -> event option
val iter : t -> event Iter.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html deleted file mode 100644 index ffdcfc64..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-bin.Sidekick_smtlib.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html index b8328392..f05c3a73 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-bin.Sidekick_smtlib.Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-bin.Sidekick_smtlib.Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html deleted file mode 100644 index a1fb0b5b..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-bin.Sidekick_smtlib.Process.Solver.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html index 8911686f..d9243da0 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-bin.Sidekick_smtlib.Process.Solver.P)

Module Solver.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick-bin.Sidekick_smtlib.Process.Solver.P)

Module Solver.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html deleted file mode 100644 index 27e55722..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-bin.Sidekick_smtlib.Process.Solver.Pre_proof)

Module Solver.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..058714d7 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html index d4fabf8a..73dbb16e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html index b72d2447..41caac1c 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..5181f370 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html index 09232e2a..1fc25944 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html index 908c349b..0b0c2589 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html index a380c08d..f610f43d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..8fa24f29 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html index 983c1a58..b5671345 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)

Module Process.Solver

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)

Module Process.Solver

module Lit : Sidekick_core.LIT with module T = T
type proof = Sidekick_base.Proof_stub.t
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html index cc3385b6..584681d5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html @@ -1,2 +1,2 @@ -Process (sidekick-bin.Sidekick_smtlib.Process)

Module Sidekick_smtlib.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file +Process (sidekick-bin.Sidekick_smtlib.Process)

Module Sidekick_smtlib.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/index.html b/dev/sidekick-bin/Sidekick_smtlib/index.html index 30e3c256..7c6d8860 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib (sidekick-bin.Sidekick_smtlib)

Module Sidekick_smtlib

SMTLib-2 Interface

type 'a or_error = ('a, string) CCResult.t
module Term = Sidekick_base.Term
module Process : sig ... end
module Solver = Process.Solver
val parse : Term.store -> string -> Stmt.t list or_error
val parse_stdin : Term.store -> Stmt.t list or_error
\ No newline at end of file +Sidekick_smtlib (sidekick-bin.Sidekick_smtlib)

Module Sidekick_smtlib

SMTLib-2 Interface

type 'a or_error = ('a, string) CCResult.t
module Term = Sidekick_base.Term
module Process : sig ... end
module Solver = Process.Solver
val parse : Term.store -> string -> Stmt.t list or_error
val parse_stdin : Term.store -> Stmt.t list or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html deleted file mode 100644 index 44537031..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-bin.Sidekick_smtlib__.Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html index 74176c71..5231e0c2 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-bin.Sidekick_smtlib__.Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-bin.Sidekick_smtlib__.Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html deleted file mode 100644 index 590ce9dc..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-bin.Sidekick_smtlib__.Process.Solver.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html index 0f54f136..8d1b5cf7 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-bin.Sidekick_smtlib__.Process.Solver.P)

Module Solver.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick-bin.Sidekick_smtlib__.Process.Solver.P)

Module Solver.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html deleted file mode 100644 index 8ac7b761..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-bin.Sidekick_smtlib__.Process.Solver.Pre_proof)

Module Solver.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..1f95e086 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html index e35a943b..b4e89983 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html index 714a0cdc..f1b5bce8 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..a1093f9e --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html index be2df834..829af21a 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html index 7d96b658..13b8f63f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html index d93d9349..22cd5034 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..69513917 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-bin.Sidekick_smtlib__.Process.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html index 09debeb2..ff0d51a4 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib__.Process.Solver)

Module Process.Solver

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib__.Process.Solver)

Module Process.Solver

module Lit : Sidekick_core.LIT with module T = T
type proof = Sidekick_base.Proof_stub.t
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html index 14e02d83..3fc7f01c 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html @@ -1,2 +1,2 @@ -Process (sidekick-bin.Sidekick_smtlib__.Process)

Module Sidekick_smtlib__.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file +Process (sidekick-bin.Sidekick_smtlib__.Process)

Module Sidekick_smtlib__.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html deleted file mode 100644 index 72397345..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick-bin.Sidekick_smtlib__Process.Solver.Atom)

Module Solver.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html index 2bdfe440..b970ecf5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-bin.Sidekick_smtlib__Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-bin.Sidekick_smtlib__Process.Solver.Lit)

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html deleted file mode 100644 index 01542a85..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick-bin.Sidekick_smtlib__Process.Solver.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html index 31ef32ff..eaacf9ed 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html @@ -1,2 +1,2 @@ -P (sidekick-bin.Sidekick_smtlib__Process.Solver.P)

Module Solver.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick-bin.Sidekick_smtlib__Process.Solver.P)

Module Solver.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html deleted file mode 100644 index f629290a..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick-bin.Sidekick_smtlib__Process.Solver.Pre_proof)

Module Solver.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..2a76d0ff --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html index 1a153411..517193c6 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html index d0fb18d7..efdd8aee 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/P/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..002c9fbd --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html index 66822440..b8ac7668 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html index 06cb4122..6d160819 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html index 79a1ec36..d0b0b5ed 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..898e8faa --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-bin.Sidekick_smtlib__Process.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html index 4f25501e..1f731a5d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick-bin.Sidekick_smtlib__Process.Solver)

Module Sidekick_smtlib__Process.Solver

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +Solver (sidekick-bin.Sidekick_smtlib__Process.Solver)

Module Sidekick_smtlib__Process.Solver

module Lit : Sidekick_core.LIT with module T = T
type proof = Sidekick_base.Proof_stub.t
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html index 75d9acf0..33a578fc 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib__Process (sidekick-bin.Sidekick_smtlib__Process)

Module Sidekick_smtlib__Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠hyps:Solver.Atom.t list Sidekick_util.Vec.t -> ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠dot_proof:string -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file +Sidekick_smtlib__Process (sidekick-bin.Sidekick_smtlib__Process)

Module Sidekick_smtlib__Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?⁠gc:bool -> ?⁠restarts:bool -> ?⁠pp_cnf:bool -> ?⁠proof_file:string -> ?⁠pp_model:bool -> ?⁠check:bool -> ?⁠time:float -> ?⁠memory:float -> ?⁠progress:bool -> Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/index.html b/dev/sidekick-bin/index.html index 10e46c6a..2e57fcc1 100644 --- a/dev/sidekick-bin/index.html +++ b/dev/sidekick-bin/index.html @@ -1,2 +1,2 @@ -index (sidekick-bin.index)

sidekick-bin index

Library sidekick-bin.smtlib

The entry point of this library is the module: Sidekick_smtlib.

\ No newline at end of file +index (sidekick-bin.index)

sidekick-bin index

Library sidekick-bin.lib

The entry point of this library is the module: Sidekick_bin_lib.

Library sidekick-bin.smtlib

The entry point of this library is the module: Sidekick_smtlib.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html deleted file mode 100644 index dcdd4786..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_arith_lra.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html index e2344e1a..d3d1d75a 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_arith_lra.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Quip/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Quip/index.html deleted file mode 100644 index 7948f5ce..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_arith_lra.Make.1-A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html index 60ce1a64..105ac9c7 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_arith_lra.Make.1-A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_arith_lra.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Pre_proof/index.html deleted file mode 100644 index 18c063f2..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_arith_lra.Make.1-A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..f5a454dc --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index 521451d1..ee63d7b0 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html index 97318cb5..66dba8a5 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..01edf99e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html index a1850d79..e3a0401d 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html index 8e8afa32..faf3a3cf 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html index 730b9019..4759c608 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..ca9bba49 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/index.html index 61db333e..df5d9885 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.Make.1-A.S)

Module 1-A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html index 6e9c9f08..2d1f0527 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_arith_lra.Make.1-A)

Parameter Make.1-A

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val proof_lra : S.P.lit Iter.t -> S.P.t

TODO: more accurate certificates

val proof_lra_l : S.P.lit list -> S.P.t
module Gensym : sig ... end
\ No newline at end of file +1-A (sidekick.Sidekick_arith_lra.Make.1-A)

Parameter Make.1-A

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.proof -> unit
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html deleted file mode 100644 index f37adb4e..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_arith_lra.ARG.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html index 7d0c1234..b9b09a26 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_arith_lra.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html deleted file mode 100644 index 5d626471..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_arith_lra.ARG.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/index.html index dfd98efe..a5eebdf2 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_arith_lra.ARG.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_arith_lra.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html deleted file mode 100644 index 986117b2..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_arith_lra.ARG.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..a04b3a64 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html index c7238f76..fd98a46c 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html index 9a794a21..611c038c 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..db5feede --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html index fdc2f726..8b9ae699 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html index 6614d73f..c01ca909 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html index 2e7ed2e7..3d26600c 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..b10119f4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/index.html index 7b0c7fc8..1f792aed 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.ARG.S)

Module ARG.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html index 332140eb..03ae70b2 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_arith_lra.ARG)

Module type Sidekick_arith_lra.ARG

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val proof_lra : S.P.lit Iter.t -> S.P.t

TODO: more accurate certificates

val proof_lra_l : S.P.lit list -> S.P.t
module Gensym : sig ... end
\ No newline at end of file +ARG (sidekick.Sidekick_arith_lra.ARG)

Module type Sidekick_arith_lra.ARG

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.proof -> unit
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html deleted file mode 100644 index 892f38d2..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_arith_lra.S.A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html index 20efe108..f11fcf19 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_arith_lra.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Quip/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Quip/index.html deleted file mode 100644 index 9aec658a..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_arith_lra.S.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/index.html index 78c2efc9..9f722972 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_arith_lra.S.A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_arith_lra.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Pre_proof/index.html deleted file mode 100644 index 77181dea..00000000 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_arith_lra.S.A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..32b2ba12 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html index 77922774..42fc086f 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html index 4a037efa..e87aead5 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..afb707f3 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html index 99e6c0ab..7866c100 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html index aecf2a3a..7fabd9fb 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html index 282d6467..c387f7f3 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..9b6e1373 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/index.html index 5f764076..a59c2b31 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.S.A.S)

Module A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html index c83c4e4a..95918278 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (sidekick.Sidekick_arith_lra.S.A)

Module S.A

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val proof_lra : S.P.lit Iter.t -> S.P.t

TODO: more accurate certificates

val proof_lra_l : S.P.lit list -> S.P.t
module Gensym : sig ... end
\ No newline at end of file +A (sidekick.Sidekick_arith_lra.S.A)

Module S.A

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.proof -> unit
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Backend_intf/index.html b/dev/sidekick/Sidekick_backend/Backend_intf/index.html deleted file mode 100644 index f970ce97..00000000 --- a/dev/sidekick/Sidekick_backend/Backend_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Backend_intf (sidekick.Sidekick_backend.Backend_intf)

Module Sidekick_backend.Backend_intf

module type S = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html b/dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html deleted file mode 100644 index 068140af..00000000 --- a/dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_backend.Backend_intf.S)

Module type Backend_intf.S

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html deleted file mode 100644 index f54f15ac..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend.Dot.Default.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html deleted file mode 100644 index 3cffb1b5..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend.Dot.Default.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html deleted file mode 100644 index 336713ea..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend.Dot.Default.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html deleted file mode 100644 index 479412b5..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend.Dot.Default.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html deleted file mode 100644 index 41830747..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend.Dot.Default.1-S)

Parameter Default.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Default/index.html b/dev/sidekick/Sidekick_backend/Dot/Default/index.html deleted file mode 100644 index bb8dc559..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Default/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Default (sidekick.Sidekick_backend.Dot.Default)

Module Dot.Default

Provides a reasonnable default to instantiate the Make functor, assuming the original printing functions are compatible with DOT html labels.

Parameters

Signature

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html deleted file mode 100644 index ceabaa6f..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend.Dot.Make.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html deleted file mode 100644 index 8367ee58..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend.Dot.Make.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html deleted file mode 100644 index 3033da0a..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend.Dot.Make.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html deleted file mode 100644 index 480a1734..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend.Dot.Make.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html deleted file mode 100644 index b94fb68e..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend.Dot.Make.1-S)

Parameter Make.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html deleted file mode 100644 index 492df1cf..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -2-A (sidekick.Sidekick_backend.Dot.Make.2-A)

Parameter Make.2-A

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Make/index.html b/dev/sidekick/Sidekick_backend/Dot/Make/index.html deleted file mode 100644 index 2f81ba8b..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_backend.Dot.Make)

Module Dot.Make

Functor for making a module to export proofs to the DOT format.

Parameters

Signature

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html deleted file mode 100644 index e953367d..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend.Dot.Simple.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html deleted file mode 100644 index b7ce6dbf..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend.Dot.Simple.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html deleted file mode 100644 index a76f4aed..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend.Dot.Simple.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html deleted file mode 100644 index 9535e7e6..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend.Dot.Simple.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html deleted file mode 100644 index 289291ff..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend.Dot.Simple.1-S)

Parameter Simple.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html deleted file mode 100644 index fe961b37..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -2-A (sidekick.Sidekick_backend.Dot.Simple.2-A)

Parameter Simple.2-A

type atom

The type of atomic formuals

type hyp = S.formula list
type lemma
type assumption = S.formula

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/Simple/index.html b/dev/sidekick/Sidekick_backend/Dot/Simple/index.html deleted file mode 100644 index 0429859f..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/Simple/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Simple (sidekick.Sidekick_backend.Dot.Simple)

Module Dot.Simple

Functor for making a module to export proofs to the DOT format. The substitution of the hyp type is non-destructive due to a restriction of destructive substitutions on earlier versions of ocaml.

Parameters

Signature

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/index.html b/dev/sidekick/Sidekick_backend/Dot/index.html deleted file mode 100644 index 38108d2c..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Dot (sidekick.Sidekick_backend.Dot)

Module Sidekick_backend.Dot

module type S = Backend_intf.S

Interface for exporting proofs.

module type Arg = sig ... end
module Default : functor (S : Sidekick_sat.S) -> Arg with type atom := S.atom and type hyp := S.clause and type lemma := S.clause and type assumption := S.clause

Provides a reasonnable default to instantiate the Make functor, assuming the original printing functions are compatible with DOT html labels.

module Make : functor (S : Sidekick_sat.S) -> functor (A : Arg with type atom := S.atom and type hyp := S.clause and type lemma := S.clause and type assumption := S.clause) -> S with type t := S.Proof.t

Functor for making a module to export proofs to the DOT format.

module Simple : functor (S : Sidekick_sat.S) -> functor (A : Arg with type atom := S.formula and type hyp = S.formula list and type lemma := S.lemma and type assumption = S.formula) -> S with type t := S.Proof.t

Functor for making a module to export proofs to the DOT format. The substitution of the hyp type is non-destructive due to a restriction of destructive substitutions on earlier versions of ocaml.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html b/dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html deleted file mode 100644 index 43769912..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Arg (sidekick.Sidekick_backend.Dot.Arg)

Module type Dot.Arg

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html b/dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html deleted file mode 100644 index c1134f5a..00000000 --- a/dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_backend.Dot.S)

Module type Dot.S

Interface for exporting proofs.

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/index.html b/dev/sidekick/Sidekick_backend/index.html deleted file mode 100644 index 010cda23..00000000 --- a/dev/sidekick/Sidekick_backend/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_backend (sidekick.Sidekick_backend)

Module Sidekick_backend

module Backend_intf : sig ... end
module Dot : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Backend_intf/index.html b/dev/sidekick/Sidekick_backend__Backend_intf/index.html deleted file mode 100644 index c41dd999..00000000 --- a/dev/sidekick/Sidekick_backend__Backend_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_backend__Backend_intf (sidekick.Sidekick_backend__Backend_intf)

Module Sidekick_backend__Backend_intf

Backend interface

This modules defines the interface of the modules providing export of proofs.

module type S = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html b/dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html deleted file mode 100644 index d585511f..00000000 --- a/dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_backend__Backend_intf.S)

Module type Sidekick_backend__Backend_intf.S

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html deleted file mode 100644 index 1591cdae..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend__Dot.Default.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html deleted file mode 100644 index 800b52ad..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend__Dot.Default.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html deleted file mode 100644 index 7d981e3d..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend__Dot.Default.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html deleted file mode 100644 index 91deb1b5..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend__Dot.Default.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html deleted file mode 100644 index 70fc05f5..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend__Dot.Default.1-S)

Parameter Default.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Default/index.html b/dev/sidekick/Sidekick_backend__Dot/Default/index.html deleted file mode 100644 index 41d9761c..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Default/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Default (sidekick.Sidekick_backend__Dot.Default)

Module Sidekick_backend__Dot.Default

Provides a reasonnable default to instantiate the Make functor, assuming the original printing functions are compatible with DOT html labels.

Parameters

Signature

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html deleted file mode 100644 index 832c6167..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend__Dot.Make.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html deleted file mode 100644 index 8b7693e7..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend__Dot.Make.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html deleted file mode 100644 index 1127a0b7..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend__Dot.Make.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html deleted file mode 100644 index 55e38772..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend__Dot.Make.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html deleted file mode 100644 index d810c542..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend__Dot.Make.1-S)

Parameter Make.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html deleted file mode 100644 index 20cfbc49..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -2-A (sidekick.Sidekick_backend__Dot.Make.2-A)

Parameter Make.2-A

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Make/index.html b/dev/sidekick/Sidekick_backend__Dot/Make/index.html deleted file mode 100644 index 8dea8fce..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_backend__Dot.Make)

Module Sidekick_backend__Dot.Make

Functor for making a module to export proofs to the DOT format.

Parameters

Signature

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html deleted file mode 100644 index 780ad67a..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_backend__Dot.Simple.1-S.Atom)

Module 1-S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html deleted file mode 100644 index 42eadba5..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Clause (sidekick.Sidekick_backend__Dot.Simple.1-S.Clause)

Module 1-S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html deleted file mode 100644 index 491dc91e..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_backend__Dot.Simple.1-S.Formula)

Module 1-S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html deleted file mode 100644 index a0b9ef67..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_backend__Dot.Simple.1-S.Proof)

Module 1-S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html deleted file mode 100644 index f22bce76..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-S (sidekick.Sidekick_backend__Dot.Simple.1-S)

Parameter Simple.1-S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html deleted file mode 100644 index 1be9d138..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -2-A (sidekick.Sidekick_backend__Dot.Simple.2-A)

Parameter Simple.2-A

type atom

The type of atomic formuals

type hyp = S.formula list
type lemma
type assumption = S.formula

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/Simple/index.html b/dev/sidekick/Sidekick_backend__Dot/Simple/index.html deleted file mode 100644 index 4338bcfc..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/Simple/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Simple (sidekick.Sidekick_backend__Dot.Simple)

Module Sidekick_backend__Dot.Simple

Functor for making a module to export proofs to the DOT format. The substitution of the hyp type is non-destructive due to a restriction of destructive substitutions on earlier versions of ocaml.

Parameters

Signature

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/index.html b/dev/sidekick/Sidekick_backend__Dot/index.html deleted file mode 100644 index e11286c3..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_backend__Dot (sidekick.Sidekick_backend__Dot)

Module Sidekick_backend__Dot

Dot backend for proofs

This module provides functions to export proofs into the dot graph format. Graphs in dot format can be used to generates images using the graphviz tool.

module type S = Sidekick_backend.Backend_intf.S

Interface for exporting proofs.

module type Arg = sig ... end
module Default : functor (S : Sidekick_sat.S) -> Arg with type atom := S.atom and type hyp := S.clause and type lemma := S.clause and type assumption := S.clause

Provides a reasonnable default to instantiate the Make functor, assuming the original printing functions are compatible with DOT html labels.

module Make : functor (S : Sidekick_sat.S) -> functor (A : Arg with type atom := S.atom and type hyp := S.clause and type lemma := S.clause and type assumption := S.clause) -> S with type t := S.Proof.t

Functor for making a module to export proofs to the DOT format.

module Simple : functor (S : Sidekick_sat.S) -> functor (A : Arg with type atom := S.formula and type hyp = S.formula list and type lemma := S.lemma and type assumption = S.formula) -> S with type t := S.Proof.t

Functor for making a module to export proofs to the DOT format. The substitution of the hyp type is non-destructive due to a restriction of destructive substitutions on earlier versions of ocaml.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html b/dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html deleted file mode 100644 index 587a2afd..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Arg (sidekick.Sidekick_backend__Dot.Arg)

Module type Sidekick_backend__Dot.Arg

type atom

The type of atomic formuals

type hyp
type lemma
type assumption

The type of theory-specifi proofs (also called lemmas).

val print_atom : Stdlib.Format.formatter -> atom -> unit

Print the contents of the given atomic formulas. WARNING: this function should take care to escape and/or not output special reserved characters for the dot format (such as quotes and so on).

val hyp_info : hyp -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val lemma_info : lemma -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list
val assumption_info : assumption -> string * string option * (Stdlib.Format.formatter -> unit -> unit) list

Generate some information about the leafs of the proof tree. Currently this backend print each lemma/assumption/hypothesis as a single leaf of the proof tree. These function should return a triplet (rule, color, l), such that:

  • rule is a name for the proof (arbitrary, does not need to be unique, but should rather be descriptive)
  • color is a color name (optional) understood by DOT
  • l is a list of printers that will be called to print some additional information
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html b/dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html deleted file mode 100644 index b4fd8ac9..00000000 --- a/dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_backend__Dot.S)

Module type Sidekick_backend__Dot.S

Interface for exporting proofs.

type t

The type of proofs.

val pp : Stdlib.Format.formatter -> t -> unit

A function for printing proofs in the desired format.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/Expl/index.html b/dev/sidekick/Sidekick_cc/Make/Expl/index.html index 179c3b83..190fea8c 100644 --- a/dev/sidekick/Sidekick_cc/Make/Expl/index.html +++ b/dev/sidekick/Sidekick_cc/Make/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_cc.Make.Expl)

Module Make.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_cc.Make.Expl)

Module Make.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/P/index.html b/dev/sidekick/Sidekick_cc/Make/P/index.html new file mode 100644 index 00000000..c05b5f54 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_cc.Make.P)

Module Make.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html new file mode 100644 index 00000000..f1202941 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_cc.Make.1-A.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html index 4f6253b6..a49995ec 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_cc.Make.1-A.Actions)

Module 1-A.Actions

module T = T
module Lit = Lit
module P = P
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_cc.Make.1-A.Actions)

Module 1-A.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html index 9e1215c9..a9d99abf 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_cc.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_cc.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Quip/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Quip/index.html deleted file mode 100644 index 47e3a511..00000000 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_cc.Make.1-A.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html index 88b0b9db..6a2b775d 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_cc.Make.1-A.P)

Module 1-A.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_cc.Make.1-A.P)

Module 1-A.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html index 304dcc66..0dc1e4f4 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_cc.Make.1-A)

Parameter Make.1-A

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module P = P and module Lit = Lit
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file +1-A (sidekick.Sidekick_cc.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/index.html b/dev/sidekick/Sidekick_cc/Make/index.html index 99574f0c..162cb4e2 100644 --- a/dev/sidekick/Sidekick_cc/Make/index.html +++ b/dev/sidekick/Sidekick_cc/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_cc.Make)

Module Sidekick_cc.Make

Parameters

Signature

module T = A.T
module P = A.P
module Lit = A.Lit
module Actions = A.Actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +Make (sidekick.Sidekick_cc.Make)

Module Sidekick_cc.Make

Parameters

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
module Actions = A.Actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/index.html b/dev/sidekick/Sidekick_cc/index.html index 075c4b0b..17c7e4cc 100644 --- a/dev/sidekick/Sidekick_cc/index.html +++ b/dev/sidekick/Sidekick_cc/index.html @@ -1,2 +1,2 @@ -Sidekick_cc (sidekick.Sidekick_cc)

Module Sidekick_cc

Congruence Closure

module type S = Sidekick_core.CC_S
module Make : functor (A : Sidekick_core.CC_ARG) -> S with module T = A.T and module Lit = A.Lit and module P = A.P and module Actions = A.Actions
\ No newline at end of file +Sidekick_cc (sidekick.Sidekick_cc)

Module Sidekick_cc

Congruence Closure

module type S = Sidekick_core.CC_S
module Make : functor (A : Sidekick_core.CC_ARG) -> S with module T = A.T and module Lit = A.Lit and type proof = A.proof and module Actions = A.Actions
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Actions/P/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Actions/P/index.html new file mode 100644 index 00000000..74190213 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/module-type-S/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_cc.S.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html index 1a76916a..5b4330c4 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_cc.S.Actions)

Module S.Actions

module T = T
module Lit = Lit
module P = P
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_cc.S.Actions)

Module S.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html index 3132cc76..579f7971 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_cc.S.Expl)

Module S.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_cc.S.Expl)

Module S.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html index db2d40b9..20764609 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_cc.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_cc.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html b/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html deleted file mode 100644 index 366e4db4..00000000 --- a/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_cc.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/P/index.html b/dev/sidekick/Sidekick_cc/module-type-S/P/index.html index f9863dd5..bdcb5948 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/P/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_cc.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_cc.S.P)

Module S.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/module-type-S/index.html b/dev/sidekick/Sidekick_cc/module-type-S/index.html index 55bbe2b6..1ae4dfbf 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_cc.S)

Module type Sidekick_cc.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +S (sidekick.Sidekick_cc.S)

Module type Sidekick_cc.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html new file mode 100644 index 00000000..0c5dc49b --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html index e6fcef93..1e7d87ff 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html index f9e91649..851fa05b 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html new file mode 100644 index 00000000..ee78f08d --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html index 3d41585a..cce38449 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC)

Module SI.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC)

Module SI.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html index df31d748..07fe82d4 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Lit)

Module SI.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Lit)

Module SI.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Quip/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Quip/index.html deleted file mode 100644 index 965ceb8f..00000000 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html index 9be3ebea..474917a3 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P)

Module SI.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = term
type lit = Lit.t
include CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html index 00a662de..101a2ecc 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html index 13e43d4f..64390e80 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html @@ -1,2 +1,2 @@ -SI (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI)

Module 1-M.SI

module T : TERM
module P : PROOF with type term = T.Term.t
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit : LIT with module T = T
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SI (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI)

Module 1-M.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P : PROOF with type lit = Lit.t and type term = term and type t = proof
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..a742a30d --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/index.html b/dev/sidekick/Sidekick_core/index.html index 3a829a96..2f5157a8 100644 --- a/dev/sidekick/Sidekick_core/index.html +++ b/dev/sidekick/Sidekick_core/index.html @@ -1,2 +1,2 @@ -Sidekick_core (sidekick.Sidekick_core)

Module Sidekick_core

Main Signatures

Theories and concrete solvers rely on an environment that defines several important types:

  • sorts
  • terms (to represent logic expressions and formulas)
  • a congruence closure instance
  • a bridge to some SAT solver

In this module we define most of the main signatures used throughout Sidekick.

module Fmt = CCFormat
module CC_view : sig ... end

View terms through the lens of the Congruence Closure

module type TERM = sig ... end

Main representation of Terms and Types

module type PROOF = sig ... end

Proofs of unsatisfiability

module type LIT = sig ... end

Literals

module type CC_ACTIONS = sig ... end

Actions provided to the congruence closure.

module type CC_ARG = sig ... end

Arguments to a congruence closure's implementation

module type CC_S = sig ... end

Main congruence closure.

module type SOLVER_INTERNAL = sig ... end

A view of the solver from a theory's point of view.

module type SOLVER = sig ... end

User facing view of the solver

module type MONOID_ARG = sig ... end

Helper for the congruence closure

module Monoid_of_repr : functor (M : MONOID_ARG) -> sig ... end

State for a per-equivalence-class monoid.

\ No newline at end of file +Sidekick_core (sidekick.Sidekick_core)

Module Sidekick_core

Main Signatures

Theories and concrete solvers rely on an environment that defines several important types:

  • sorts
  • terms (to represent logic expressions and formulas)
  • a congruence closure instance
  • a bridge to some SAT solver

In this module we define most of the main signatures used throughout Sidekick.

module Fmt = CCFormat
module CC_view : sig ... end

View terms through the lens of the Congruence Closure

module type TERM = sig ... end

Main representation of Terms and Types

module type CC_PROOF = sig ... end

Proofs for the congruence closure

module type SAT_PROOF = sig ... end

Signature for SAT-solver proof emission, using DRUP.

module type PROOF = sig ... end

Proofs of unsatisfiability.

module type LIT = sig ... end

Literals

module type CC_ACTIONS = sig ... end

Actions provided to the congruence closure.

module type CC_ARG = sig ... end

Arguments to a congruence closure's implementation

module type CC_S = sig ... end

Main congruence closure signature.

module type SOLVER_INTERNAL = sig ... end

A view of the solver from a theory's point of view.

module type SOLVER = sig ... end

User facing view of the solver

module type MONOID_ARG = sig ... end

Helper for the congruence closure

module Monoid_of_repr : functor (M : MONOID_ARG) -> sig ... end

State for a per-equivalence-class monoid.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html index 76108f17..2197d29f 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.CC_ACTIONS.Lit)

Module CC_ACTIONS.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_ACTIONS.Lit)

Module CC_ACTIONS.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Quip/index.html deleted file mode 100644 index bd0955c3..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.CC_ACTIONS.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html index 4f0cce39..162ad3e9 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.CC_ACTIONS.P)

Module CC_ACTIONS.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.CC_ACTIONS.P)

Module CC_ACTIONS.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html index fd338b96..e67a0ccf 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html @@ -1,2 +1,2 @@ -CC_ACTIONS (sidekick.Sidekick_core.CC_ACTIONS)

Module type Sidekick_core.CC_ACTIONS

Actions provided to the congruence closure.

The congruence closure must be able to propagate literals when it detects that they are true or false; it must also be able to create conflicts when the set of (dis)equalities is inconsistent

module T : TERM
module Lit : LIT with module T = T
module P : PROOF with type term = T.Term.t
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +CC_ACTIONS (sidekick.Sidekick_core.CC_ACTIONS)

Module type Sidekick_core.CC_ACTIONS

Actions provided to the congruence closure.

The congruence closure must be able to propagate literals when it detects that they are true or false; it must also be able to create conflicts when the set of (dis)equalities is inconsistent

module T : TERM
module Lit : LIT with module T = T
type proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html new file mode 100644 index 00000000..afad0d62 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.CC_ARG.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html index 6feafd16..050f8e5c 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

module T = T
module Lit = Lit
module P = P
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html index 2bd33028..d2587d99 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.CC_ARG.Lit)

Module CC_ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_ARG.Lit)

Module CC_ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Quip/index.html deleted file mode 100644 index 87af0f2d..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.CC_ARG.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html index ed63693c..6d29a51c 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.CC_ARG.P)

Module CC_ARG.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.CC_ARG.P)

Module CC_ARG.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html index 05dfd544..262f42e4 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html @@ -1,2 +1,2 @@ -CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

Arguments to a congruence closure's implementation

module T : TERM
module P : PROOF with type term = T.Term.t
module Lit : LIT with module T = T
module Actions : CC_ACTIONS with module T = T and module P = P and module Lit = Lit
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file +CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

Arguments to a congruence closure's implementation

module T : TERM
module Lit : LIT with module T = T
type proof
module P : CC_PROOF with type lit = Lit.t and type t = proof
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t

View the term through the lens of the congruence closure

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-CC_PROOF/index.html new file mode 100644 index 00000000..0bf24090 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_PROOF/index.html @@ -0,0 +1,2 @@ + +CC_PROOF (sidekick.Sidekick_core.CC_PROOF)

Module type Sidekick_core.CC_PROOF

Proofs for the congruence closure

type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html new file mode 100644 index 00000000..01a66a54 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.CC_S.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html index 5c611fe5..3af70c94 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.CC_S.Actions)

Module CC_S.Actions

module T = T
module Lit = Lit
module P = P
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.CC_S.Actions)

Module CC_S.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html index bfdc9fdb..16e8b277 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.CC_S.Expl)

Module CC_S.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.CC_S.Expl)

Module CC_S.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html index d30c0c0e..b3e027aa 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.CC_S.Lit)

Module CC_S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_S.Lit)

Module CC_S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/P/Quip/index.html deleted file mode 100644 index 07e4bdad..00000000 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.CC_S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html index 2e892053..22592825 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.CC_S.P)

Module CC_S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.CC_S.P)

Module CC_S.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html index c9bea19f..864c948e 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html @@ -1,2 +1,2 @@ -CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

Main congruence closure.

The congruence closure handles the theory QF_UF (uninterpreted function symbols). It is also responsible for theory combination, and provides a general framework for equality reasoning that other theories piggyback on.

For example, the theory of datatypes relies on the congruence closure to do most of the work, and "only" adds injectivity/disjointness/acyclicity lemmas when needed.

Similarly, a theory of arrays would hook into the congruence closure and assert (dis)equalities as needed.

module T : TERM
module P : PROOF with type term = T.Term.t
module Lit : LIT with module T = T
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

Main congruence closure signature.

The congruence closure handles the theory QF_UF (uninterpreted function symbols). It is also responsible for theory combination, and provides a general framework for equality reasoning that other theories piggyback on.

For example, the theory of datatypes relies on the congruence closure to do most of the work, and "only" adds injectivity/disjointness/acyclicity lemmas when needed.

Similarly, a theory of arrays would hook into the congruence closure and assert (dis)equalities as needed.

module T : TERM
module Lit : LIT with module T = T
type proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/index.html index 69044cbd..e75ecfb6 100644 --- a/dev/sidekick/Sidekick_core/module-type-LIT/index.html +++ b/dev/sidekick/Sidekick_core/module-type-LIT/index.html @@ -1,2 +1,2 @@ -LIT (sidekick.Sidekick_core.LIT)

Module type Sidekick_core.LIT

Literals

Literals are a pair of a boolean-sorted term, and a sign. Positive literals are the same as their term, and negative literals are the negation of their term.

The SAT solver deals only in literals and clauses (sets of literals). Everything else belongs in the SMT solver.

module T : TERM

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +LIT (sidekick.Sidekick_core.LIT)

Module type Sidekick_core.LIT

Literals

Literals are a pair of a boolean-sorted term, and a sign. Positive literals are the same as their term, and negative literals are the negation of their term.

The SAT solver deals only in literals and clauses (sets of literals). Everything else belongs in the SMT solver.

module T : TERM

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html new file mode 100644 index 00000000..dd3bf0a4 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html index 69fcb60b..9ecc9a14 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html index c82a0555..6e4f86c2 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html new file mode 100644 index 00000000..72e46b3e --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html index b3526834..9c0ccf30 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.MONOID_ARG.SI.CC)

Module SI.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.MONOID_ARG.SI.CC)

Module SI.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html index d63db1c3..7cf91bff 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.MONOID_ARG.SI.Lit)

Module SI.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.MONOID_ARG.SI.Lit)

Module SI.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Quip/index.html deleted file mode 100644 index b5b2bc4a..00000000 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.MONOID_ARG.SI.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html index e9a8d009..d7dfa23f 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.MONOID_ARG.SI.P)

Module SI.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.MONOID_ARG.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = term
type lit = Lit.t
include CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html index 213f8e23..b418e297 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.MONOID_ARG.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.MONOID_ARG.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html index e8baf522..747f829c 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html @@ -1,2 +1,2 @@ -SI (sidekick.Sidekick_core.MONOID_ARG.SI)

Module MONOID_ARG.SI

module T : TERM
module P : PROOF with type term = T.Term.t
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit : LIT with module T = T
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SI (sidekick.Sidekick_core.MONOID_ARG.SI)

Module MONOID_ARG.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P : PROOF with type lit = Lit.t and type term = term and type t = proof
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..ee84de70 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_core.MONOID_ARG.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html deleted file mode 100644 index 3da53865..00000000 --- a/dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.PROOF.Quip)

Module PROOF.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-PROOF/index.html index 10162799..bd3d8b58 100644 --- a/dev/sidekick/Sidekick_core/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_core/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_core.PROOF)

Module type Sidekick_core.PROOF

Proofs of unsatisfiability

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +PROOF (sidekick.Sidekick_core.PROOF)

Module type Sidekick_core.PROOF

Proofs of unsatisfiability.

We use DRUP(T)-style traces where we simply emit clauses as we go, annotating enough for the checker to reconstruct them. This allows for low overhead proof production.

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term
type lit
include CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html new file mode 100644 index 00000000..d8e617cc --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html @@ -0,0 +1,2 @@ + +SAT_PROOF (sidekick.Sidekick_core.SAT_PROOF)

Module type Sidekick_core.SAT_PROOF

Signature for SAT-solver proof emission, using DRUP.

We do not store the resolution steps, just the stream of clauses deduced. See Sidekick_drup for checking these proofs.

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html deleted file mode 100644 index 1b0e4708..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_core.SOLVER.Atom)

Module SOLVER.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html index 41ea399c..5da13af4 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.SOLVER.Lit)

Module SOLVER.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.SOLVER.Lit)

Module SOLVER.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html deleted file mode 100644 index 1075c0d1..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.SOLVER.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html index 8cfb9f50..dc168017 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.SOLVER.P)

Module SOLVER.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER.P)

Module SOLVER.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html deleted file mode 100644 index f0b9325c..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_core.SOLVER.Pre_proof)

Module SOLVER.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Fmt.printer
val pp_dot : t Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..11bc173f --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html index ec5412ac..aeb23741 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html index f4968050..dee05d12 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..8d547484 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html index dc1a3ab4..636cf869 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.SOLVER.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.SOLVER.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html index 37ee63d8..39e62bce 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.SOLVER.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html index 079fc859..e9185b5e 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..b3bfe273 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html index 1c326c1f..5a76f266 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html @@ -1,2 +1,2 @@ -SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

User facing view of the solver

This is the solver a user of sidekick can see, after instantiating everything. The user can add some theories, clauses, etc. and asks the solver to check satisfiability.

Theory implementors will mostly interact with SOLVER_INTERNAL.

module T : TERM
module P : PROOF with type term = T.Term.t
module Lit : LIT with module T = T
module Solver_internal : SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

User facing view of the solver

This is the solver a user of sidekick can see, after instantiating everything. The user can add some theories, clauses, etc. and asks the solver to check satisfiability.

Theory implementors will mostly interact with SOLVER_INTERNAL.

module T : TERM
module Lit : LIT with module T = T
type proof
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html new file mode 100644 index 00000000..2578d829 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html index 6ced4189..ba51a6aa 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html index b32eec68..ee02eb72 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html new file mode 100644 index 00000000..beabe273 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html index 9e502d35..d52f553d 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_core.SOLVER_INTERNAL.CC)

Module SOLVER_INTERNAL.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_core.SOLVER_INTERNAL.CC)

Module SOLVER_INTERNAL.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html index 1d43b3cb..a5058b52 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.Lit)

Module SOLVER_INTERNAL.Lit

Literals

A literal is a (preprocessed) term along with its sign. It is directly manipulated by the SAT solver.

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.Lit)

Module SOLVER_INTERNAL.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Quip/index.html deleted file mode 100644 index 9765eb6f..00000000 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_core.SOLVER_INTERNAL.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html index addc4e54..28149a6f 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_core.SOLVER_INTERNAL.P)

Module SOLVER_INTERNAL.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER_INTERNAL.P)

Module SOLVER_INTERNAL.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = term
type lit = Lit.t
include CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html index c3cd04c6..e796314c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_core.SOLVER_INTERNAL.Simplify)

Module SOLVER_INTERNAL.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER_INTERNAL.Simplify)

Module SOLVER_INTERNAL.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html index 9297e19f..6ac50467 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html @@ -1,2 +1,2 @@ -SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view.

Theories should interact with the solver via this module, to assert new lemmas, propagate literals, access the congruence closure, etc.

module T : TERM
module P : PROOF with type term = T.Term.t
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit : LIT with module T = T
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view.

Theories should interact with the solver via this module, to assert new lemmas, propagate literals, access the congruence closure, etc.

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P : PROOF with type lit = Lit.t and type term = term and type t = proof
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..5f08dab1 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER_INTERNAL.PREPROCESS_ACTS)

Module type SOLVER_INTERNAL.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/.dune-keep b/dev/sidekick/Sidekick_drup/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_drup/Make/Atom/index.html b/dev/sidekick/Sidekick_drup/Make/Atom/index.html new file mode 100644 index 00000000..f194ee67 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/Make/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_drup.Make.Atom)

Module Make.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

raises Invalid_argument

if the argument is 0

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/Checker/index.html b/dev/sidekick/Sidekick_drup/Make/Checker/index.html new file mode 100644 index 00000000..8a526ffc --- /dev/null +++ b/dev/sidekick/Sidekick_drup/Make/Checker/index.html @@ -0,0 +1,2 @@ + +Checker (sidekick.Sidekick_drup.Make.Checker)

Module Make.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/Clause/index.html b/dev/sidekick/Sidekick_drup/Make/Clause/index.html new file mode 100644 index 00000000..319442e6 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/Make/Clause/index.html @@ -0,0 +1,2 @@ + +Clause (sidekick.Sidekick_drup.Make.Clause)

Module Make.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:(atom -> unit) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/index.html b/dev/sidekick/Sidekick_drup/Make/index.html new file mode 100644 index 00000000..c290a3d5 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_drup.Make)

Module Sidekick_drup.Make

Parameters

Signature

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/index.html b/dev/sidekick/Sidekick_drup/index.html new file mode 100644 index 00000000..133e0ef2 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/index.html @@ -0,0 +1,2 @@ + +Sidekick_drup (sidekick.Sidekick_drup)

Module Sidekick_drup

DRUP trace checker.

This module provides a checker for DRUP traces, including step-by-step checking for traces that interleave DRUP steps with other kinds of steps.

module Fmt = CCFormat
module VecI32 = Sidekick_util.VecI32
module type S = sig ... end

An instance of the checker

module Make : functor () S
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html new file mode 100644 index 00000000..30bf7b47 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +Atom (sidekick.Sidekick_drup.S.Atom)

Module S.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

raises Invalid_argument

if the argument is 0

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html new file mode 100644 index 00000000..793c6492 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html @@ -0,0 +1,2 @@ + +Checker (sidekick.Sidekick_drup.S.Checker)

Module S.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html new file mode 100644 index 00000000..99bf9668 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html @@ -0,0 +1,2 @@ + +Clause (sidekick.Sidekick_drup.S.Clause)

Module S.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:(atom -> unit) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/index.html b/dev/sidekick/Sidekick_drup/module-type-S/index.html new file mode 100644 index 00000000..fd93c430 --- /dev/null +++ b/dev/sidekick/Sidekick_drup/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_drup.S)

Module type Sidekick_drup.S

An instance of the checker

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/.dune-keep b/dev/sidekick/Sidekick_lit/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html new file mode 100644 index 00000000..bde9b11f --- /dev/null +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_lit.Make.1-T.Fun)

Module 1-T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html new file mode 100644 index 00000000..bb4662a2 --- /dev/null +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_lit.Make.1-T.Term)

Module 1-T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html new file mode 100644 index 00000000..faa05123 --- /dev/null +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_lit.Make.1-T.Ty)

Module 1-T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html new file mode 100644 index 00000000..96f859ce --- /dev/null +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html @@ -0,0 +1,2 @@ + +1-T (sidekick.Sidekick_lit.Make.1-T)

Parameter Make.1-T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/index.html b/dev/sidekick/Sidekick_lit/Make/index.html new file mode 100644 index 00000000..6398c8a9 --- /dev/null +++ b/dev/sidekick/Sidekick_lit/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_lit.Make)

Module Sidekick_lit.Make

Parameters

Signature

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/index.html b/dev/sidekick/Sidekick_lit/index.html new file mode 100644 index 00000000..bd238dc9 --- /dev/null +++ b/dev/sidekick/Sidekick_lit/index.html @@ -0,0 +1,2 @@ + +Sidekick_lit (sidekick.Sidekick_lit)

Module Sidekick_lit

Implementation of literals from terms

module Make : functor (T : Sidekick_core.TERM) -> Sidekick_core.LIT with module T = T
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html deleted file mode 100644 index 07d3af10..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_msat_solver.Make.Atom)

Module Make.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html deleted file mode 100644 index 1ebf9d51..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.Make.Lit)

Module Make.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html deleted file mode 100644 index eb7aa3d1..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Model (sidekick.Sidekick_msat_solver.Make.Model)

Module Make.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html deleted file mode 100644 index 1da2fe98..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_msat_solver.Make.Pre_proof)

Module Make.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html deleted file mode 100644 index bc63bd2b..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html deleted file mode 100644 index 4e2aeffa..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/Expl/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Expl (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html deleted file mode 100644 index cb38e7b6..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -N (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See Sidekick_core.CC_S.allocate_bitfield.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html deleted file mode 100644 index 46ce22c0..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC (sidekick.Sidekick_msat_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html deleted file mode 100644 index 0a14b6cc..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Simplify (sidekick.Sidekick_msat_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html deleted file mode 100644 index 7a0214e5..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Solver_internal (sidekick.Sidekick_msat_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html b/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html deleted file mode 100644 index a75aaded..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Unknown (sidekick.Sidekick_msat_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/Quip/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/Quip/index.html deleted file mode 100644 index 5e35c2ff..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_msat_solver.Make.1-A.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html deleted file mode 100644 index db0fb900..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/P/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -P (sidekick.Sidekick_msat_solver.Make.1-A.P)

Module 1-A.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html deleted file mode 100644 index fc908147..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.Make.1-A.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html deleted file mode 100644 index a260a083..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.Make.1-A.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
-let y = f x x in
-let z = g y x in
-z = z

the DAG has the following nodes:

n1: 2
-n2: f n1 n1
-n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html deleted file mode 100644 index e38f5700..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.Make.1-A.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html deleted file mode 100644 index 3b53f131..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -1-A (sidekick.Sidekick_msat_solver.Make.1-A)

Parameter Make.1-A

module P : Sidekick_core.PROOF with type term = T.Term.t
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/index.html b/dev/sidekick/Sidekick_msat_solver/Make/index.html deleted file mode 100644 index 398560a9..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_msat_solver.Make)

Module Sidekick_msat_solver.Make

Main functor to get a solver.

Parameters

Signature

module T = A.T
module P = A.P
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html b/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html deleted file mode 100644 index ae1d5d9c..00000000 --- a/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -THEORY (sidekick.Sidekick_msat_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory (ideally, unique and short)

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

Called once for every solver this theory is added to.

val push_level : t -> unit

Push backtracking level. When the corresponding pop is called, the theory's state should be restored to a state equivalent to what it was just before push_level.

it does not have to be exactly the same state, it just needs to be equivalent.

val pop_levels : t -> int -> unit

pop_levels theory n pops n backtracking levels, restoring theory to its state before calling push_level n times.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/index.html b/dev/sidekick/Sidekick_msat_solver/index.html deleted file mode 100644 index fa213543..00000000 --- a/dev/sidekick/Sidekick_msat_solver/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_msat_solver (sidekick.Sidekick_msat_solver)

Module Sidekick_msat_solver

Core of the SMT solver using Sidekick_sat

Sidekick_sat (in src/sat/) is a modular SAT solver in pure OCaml.

This builds a Sidekick_core.SOLVER on top of it.

module type ARG = sig ... end

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module type S = Sidekick_core.SOLVER
module Make : functor (A : ARG) -> S with module T = A.T and module P = A.P

Main functor to get a solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/Quip/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/Quip/index.html deleted file mode 100644 index 832ffbed..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_msat_solver.ARG.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html deleted file mode 100644 index f795f81a..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -P (sidekick.Sidekick_msat_solver.ARG.P)

Module ARG.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html deleted file mode 100644 index e5fab2e0..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.ARG.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html deleted file mode 100644 index 4fd54db4..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Term/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.ARG.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
-let y = f x x in
-let z = g y x in
-z = z

the DAG has the following nodes:

n1: 2
-n2: f n1 n1
-n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html deleted file mode 100644 index df3f6f01..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.ARG.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html deleted file mode 100644 index e7d471a9..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -T (sidekick.Sidekick_msat_solver.ARG.T)

Module ARG.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html deleted file mode 100644 index 37b60ca5..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -ARG (sidekick.Sidekick_msat_solver.ARG)

Module type Sidekick_msat_solver.ARG

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module P : Sidekick_core.PROOF with type term = T.Term.t
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html deleted file mode 100644 index 835b5f0b..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_msat_solver.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html deleted file mode 100644 index 2ec441be..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Lit (sidekick.Sidekick_msat_solver.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html deleted file mode 100644 index f95b4951..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Model (sidekick.Sidekick_msat_solver.S.Model)

Module S.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/Quip/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/P/Quip/index.html deleted file mode 100644 index 98d5da7d..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_msat_solver.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html deleted file mode 100644 index c87e354a..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -P (sidekick.Sidekick_msat_solver.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Pre_proof/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Pre_proof/index.html deleted file mode 100644 index 1ec8f3b7..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_msat_solver.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html deleted file mode 100644 index 12ad623b..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Actions/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Actions (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html deleted file mode 100644 index f2f77b1c..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/Expl/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Expl (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html deleted file mode 100644 index 4f90a10e..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/N/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -N (sidekick.Sidekick_msat_solver.S.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See Sidekick_core.CC_S.allocate_bitfield.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html deleted file mode 100644 index 0e81ea2b..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/CC/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -CC (sidekick.Sidekick_msat_solver.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html deleted file mode 100644 index 78f90f3d..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/Simplify/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Simplify (sidekick.Sidekick_msat_solver.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html deleted file mode 100644 index 6f194689..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Solver_internal/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Solver_internal (sidekick.Sidekick_msat_solver.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html deleted file mode 100644 index b6f39f34..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Fun/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Fun (sidekick.Sidekick_msat_solver.S.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html deleted file mode 100644 index cac7572f..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Term/index.html +++ /dev/null @@ -1,8 +0,0 @@ - -Term (sidekick.Sidekick_msat_solver.S.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
-let y = f x x in
-let z = g y x in
-z = z

the DAG has the following nodes:

n1: 2
-n2: f n1 n1
-n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html deleted file mode 100644 index b2dcfe45..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Ty (sidekick.Sidekick_msat_solver.S.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html deleted file mode 100644 index aa156bb5..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -T (sidekick.Sidekick_msat_solver.S.T)

Module S.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html deleted file mode 100644 index 5e4d2609..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Unknown (sidekick.Sidekick_msat_solver.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html deleted file mode 100644 index 35a8d0cc..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_msat_solver.S)

Module type Sidekick_msat_solver.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html deleted file mode 100644 index 2afc62df..00000000 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/module-type-THEORY/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -THEORY (sidekick.Sidekick_msat_solver.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory (ideally, unique and short)

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

Called once for every solver this theory is added to.

val push_level : t -> unit

Push backtracking level. When the corresponding pop is called, the theory's state should be restored to a state equivalent to what it was just before push_level.

it does not have to be exactly the same state, it just needs to be equivalent.

val pop_levels : t -> int -> unit

pop_levels theory n pops n backtracking levels, restoring theory to its state before calling push_level n times.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html deleted file mode 100644 index 6fcf7917..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Atom)

Module Make_cdcl_t.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html index 5dc22a46..ba2b9e4d 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html deleted file mode 100644 index 85eef5e8..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Proof)

Module Make_cdcl_t.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html deleted file mode 100644 index 9105b121..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..d8e0e4fa --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..10139e19 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html index 60642e26..5ef16523 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) Solver_intf.acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +1-Th (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type lit
module Lit : Solver_intf.LIT with type t = lit
type proof

Proof storage/recording

module Proof : Solver_intf.PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html index f3c95901..ff6ddcb8 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html @@ -1,2 +1,2 @@ -Make_cdcl_t (sidekick.Sidekick_sat.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = Th.t
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_cdcl_t (sidekick.Sidekick_sat.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = Th.t
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html deleted file mode 100644 index 52ab929a..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat.Solver.Make_pure_sat.Atom)

Module Make_pure_sat.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html index a046c63b..c9b465a2 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html deleted file mode 100644 index fe87e1d4..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat.Solver.Make_pure_sat.Proof)

Module Make_pure_sat.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Formula/index.html deleted file mode 100644 index dfc345cd..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..de5fadb1 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..ac47cace --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html index d0dbcd7c..204a56fa 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type proof
\ No newline at end of file +1-Th (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type lit
module Lit : Solver_intf.LIT with type t = lit
type proof
module Proof : Solver_intf.PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html index 90b933a7..7749b079 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html @@ -1,2 +1,2 @@ -Make_pure_sat (sidekick.Sidekick_sat.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = unit
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_pure_sat (sidekick.Sidekick_sat.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = unit
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/index.html b/dev/sidekick/Sidekick_sat/Solver/index.html index afc8fa5f..7eaa7bab 100644 --- a/dev/sidekick/Sidekick_sat/Solver/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick.Sidekick_sat.Solver)

Module Sidekick_sat.Solver

module type S = Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Solver_intf.PLUGIN_SAT) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = unit
module Make_cdcl_t : functor (Th : Solver_intf.PLUGIN_CDCL_T) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = Th.t
\ No newline at end of file +Solver (sidekick.Sidekick_sat.Solver)

Module Sidekick_sat.Solver

module type S = Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Solver_intf.PLUGIN_SAT) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = unit
module Make_cdcl_t : functor (Th : Solver_intf.PLUGIN_CDCL_T) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = Th.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html deleted file mode 100644 index 278a7435..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat.Solver.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html index a794bf65..74dcca65 100644 --- a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html deleted file mode 100644 index ff2e3c6d..00000000 --- a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Lit/index.html new file mode 100644 index 00000000..0f5a18f3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html index a69e6ddb..dcdeac98 100644 --- a/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html index 3d015727..c19fc2ec 100644 --- a/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat.Solver.S)

Module type Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat.Solver.S)

Module type Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : Solver_intf.LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : Solver_intf.PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/index.html index d6dba15c..ee2acfeb 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/index.html @@ -1,2 +1,2 @@ -Solver_intf (sidekick.Sidekick_sat.Solver_intf)

Module Sidekick_sat.Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type formula = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('atom, 'clause, 'proof) unsat_state = (module UNSAT_STATE with type atom = 'atom and type clause = 'clause and type proof = 'proof)

The type of values returned when the solver reaches an UNSAT state.

type negated =
| Negated

changed sign

| Same_sign

kept sign

This type is used during the normalisation of formulas. See Expr_intf.S.norm for more details.

type ('formula, 'proof) reason =
| Consequence of unit -> 'formula list * 'proof

The type of reasons for propagations of a formula f.

Consequence (l, p) means that the formulas in l imply the propagated formula f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('formula, 'proof) acts = (module ACTS with type formula = 'formula and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type FORMULA = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type PROOF = sig ... end
module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file +Solver_intf (sidekick.Sidekick_sat.Solver_intf)

Module Sidekick_sat.Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type lit = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('lit, 'clause) unsat_state = (module UNSAT_STATE with type clause = 'clause and type lit = 'lit)

The type of values returned when the solver reaches an UNSAT state.

type same_sign = bool

This type is used during the normalisation of lits. true means the literal stayed the same, false that its sign was flipped.

type ('lit, 'proof) reason =
| Consequence of unit -> 'lit list * 'proof

The type of reasons for propagations of a lit f.

Consequence (l, p) means that the lits in l imply the propagated lit f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('lit, 'proof) acts = (module ACTS with type lit = 'lit and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type LIT = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html index 489cae8c..4c3ffd1b 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html @@ -1,2 +1,2 @@ -ACTS (sidekick.Sidekick_sat.Solver_intf.ACTS)

Module type Solver_intf.ACTS

type formula
type proof
val iter_assumptions : (formula -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : formula -> lbool

Obtain current value of the given literal

val mk_lit : ?⁠default_pol:bool -> formula -> unit

Map the given formula to a literal, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> formula list -> proof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : formula list -> proof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : formula -> (formulaproof) reason -> unit

Propagate a formula, i.e. the theory can evaluate the formula to be true (see the definition of eval_res

val add_decision_lit : formula -> bool -> unit

Ask the SAT solver to decide on the given formula with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file +ACTS (sidekick.Sidekick_sat.Solver_intf.ACTS)

Module type Solver_intf.ACTS

type lit
type proof
type dproof = proof -> unit
val iter_assumptions : (lit -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> lbool

Obtain current value of the given literal

val add_lit : ?⁠default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> lit list -> dproof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : lit list -> dproof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> (litdproof) reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html deleted file mode 100644 index 8b83b1f4..00000000 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -FORMULA (sidekick.Sidekick_sat.Solver_intf.FORMULA)

Module type Solver_intf.FORMULA

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html new file mode 100644 index 00000000..a51c14e7 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html @@ -0,0 +1,2 @@ + +LIT (sidekick.Sidekick_sat.Solver_intf.LIT)

Module type Solver_intf.LIT

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html deleted file mode 100644 index 73307317..00000000 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Formula)

Module PLUGIN_CDCL_T.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html new file mode 100644 index 00000000..b8a49996 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html new file mode 100644 index 00000000..927d391e --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html index 51829e6f..e36fd20f 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -1,2 +1,2 @@ -PLUGIN_CDCL_T (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

module Formula : FORMULA
type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +PLUGIN_CDCL_T (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

type lit
module Lit : LIT with type t = lit
type proof

Proof storage/recording

module Proof : PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html deleted file mode 100644 index 2cb60f0b..00000000 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Formula)

Module PLUGIN_SAT.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html new file mode 100644 index 00000000..902b20cb --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Lit)

Module PLUGIN_SAT.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html new file mode 100644 index 00000000..2912d09d --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Proof)

Module PLUGIN_SAT.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html index 53911852..c9a9d69e 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html @@ -1,2 +1,2 @@ -PLUGIN_SAT (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

module Formula : FORMULA
type proof
\ No newline at end of file +PLUGIN_SAT (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

type lit
module Lit : LIT with type t = lit
type proof
module Proof : PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html index f127632d..33dbf5f5 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_sat.Solver_intf.PROOF)

Module type Solver_intf.PROOF

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula
type atom
type lemma
type clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +PROOF (sidekick.Sidekick_sat.Solver_intf.PROOF)

Module type Solver_intf.PROOF

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html deleted file mode 100644 index 0ee76f29..00000000 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat.Solver_intf.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html index f7103c35..0033568a 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Formula/index.html deleted file mode 100644 index 202eccc0..00000000 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.Solver_intf.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html new file mode 100644 index 00000000..fcf05417 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.Solver_intf.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html index 412dccdd..5ada8b56 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html index 2f2dbd61..0d6a56d1 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula : FORMULA
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html index 9f145de2..bbb5e506 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html @@ -1,2 +1,2 @@ -SAT_STATE (sidekick.Sidekick_sat.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type formula
val eval : formula -> bool

Returns the valuation of a formula in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : formula -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the atom to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (formula -> unit) -> unit

Iter through the formulas in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file +SAT_STATE (sidekick.Sidekick_sat.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (lit -> unit) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html index 6e216d66..d9ea73bc 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html @@ -1,2 +1,2 @@ -UNSAT_STATE (sidekick.Sidekick_sat.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type atom
type clause
type proof
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val get_proof : unit -> proof

returns a persistent proof of the empty clause from the Unsat result.

val unsat_assumptions : unit -> atom list

Subset of assumptions responsible for "unsat"

\ No newline at end of file +UNSAT_STATE (sidekick.Sidekick_sat.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type lit
type clause
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val unsat_assumptions : unit -> lit Iter.t

Subset of assumptions responsible for "unsat"

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/index.html b/dev/sidekick/Sidekick_sat/index.html index 19f95456..345143a9 100644 --- a/dev/sidekick/Sidekick_sat/index.html +++ b/dev/sidekick/Sidekick_sat/index.html @@ -1,2 +1,2 @@ -Sidekick_sat (sidekick.Sidekick_sat)

Module Sidekick_sat

Main API

module Solver_intf : sig ... end

Interface for Solvers

module type S = Solver_intf.S
module type PROOF = Solver_intf.PROOF
type lbool = Solver_intf.lbool =
| L_true
| L_false
| L_undefined
type 'form sat_state = 'form Solver_intf.sat_state
type ('formula, 'proof) reason = ('formula'proof) Solver_intf.reason =
| Consequence of unit -> 'formula list * 'proof
module type ACTS = Solver_intf.ACTS
type ('formula, 'proof) acts = ('formula'proof) Solver_intf.acts
type negated = Solver_intf.negated =
| Negated
| Same_sign
val pp_negated : Stdlib.Format.formatter -> negated -> unit

Print negated values

val pp_lbool : Stdlib.Format.formatter -> lbool -> unit

Print lbool values

exception No_proof
module Solver : sig ... end
module Make_cdcl_t = Solver.Make_cdcl_t
module Make_pure_sat = Solver.Make_pure_sat
\ No newline at end of file +Sidekick_sat (sidekick.Sidekick_sat)

Module Sidekick_sat

Main API

module Solver_intf : sig ... end

Interface for Solvers

module type S = Solver_intf.S
module type LIT = Solver_intf.LIT
module type PROOF = Solver_intf.PROOF
type lbool = Solver_intf.lbool =
| L_true
| L_false
| L_undefined
type 'form sat_state = 'form Solver_intf.sat_state
type ('lit, 'proof) reason = ('lit'proof) Solver_intf.reason =
| Consequence of unit -> 'lit list * 'proof
module type ACTS = Solver_intf.ACTS
type ('lit, 'proof) acts = ('lit'proof) Solver_intf.acts
type negated = bool
val pp_lbool : Stdlib.Format.formatter -> lbool -> unit

Print lbool values

exception No_proof
module Solver : sig ... end
module Make_cdcl_t = Solver.Make_cdcl_t
module Make_pure_sat = Solver.Make_pure_sat
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html index 0224533c..d12d6474 100644 --- a/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html @@ -1,2 +1,2 @@ -ACTS (sidekick.Sidekick_sat.ACTS)

Module type Sidekick_sat.ACTS

type formula
type proof
val iter_assumptions : (formula -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : formula -> Solver_intf.lbool

Obtain current value of the given literal

val mk_lit : ?⁠default_pol:bool -> formula -> unit

Map the given formula to a literal, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> formula list -> proof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : formula list -> proof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : formula -> (formulaproof) Solver_intf.reason -> unit

Propagate a formula, i.e. the theory can evaluate the formula to be true (see the definition of eval_res

val add_decision_lit : formula -> bool -> unit

Ask the SAT solver to decide on the given formula with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file +ACTS (sidekick.Sidekick_sat.ACTS)

Module type Sidekick_sat.ACTS

type lit
type proof
type dproof = proof -> unit
val iter_assumptions : (lit -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> Solver_intf.lbool

Obtain current value of the given literal

val add_lit : ?⁠default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> lit list -> dproof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : lit list -> dproof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> (litdproof) Solver_intf.reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html b/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html deleted file mode 100644 index 94570dd6..00000000 --- a/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -FORMULA (sidekick.Sidekick_sat.FORMULA)

Module type Sidekick_sat.FORMULA

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-LIT/index.html b/dev/sidekick/Sidekick_sat/module-type-LIT/index.html new file mode 100644 index 00000000..7c095299 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-LIT/index.html @@ -0,0 +1,2 @@ + +LIT (sidekick.Sidekick_sat.LIT)

Module type Sidekick_sat.LIT

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html deleted file mode 100644 index 91a7b3e9..00000000 --- a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.PLUGIN_CDCL_T.Formula)

Module PLUGIN_CDCL_T.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Lit/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Lit/index.html new file mode 100644 index 00000000..c9c936d0 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Proof/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Proof/index.html new file mode 100644 index 00000000..c223b71d --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html index 8d7b3fe1..223673b7 100644 --- a/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html @@ -1,2 +1,2 @@ -PLUGIN_CDCL_T (sidekick.Sidekick_sat.PLUGIN_CDCL_T)

Module type Sidekick_sat.PLUGIN_CDCL_T

type t

The plugin state itself

type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) Solver_intf.acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +PLUGIN_CDCL_T (sidekick.Sidekick_sat.PLUGIN_CDCL_T)

Module type Sidekick_sat.PLUGIN_CDCL_T

type t

The plugin state itself

type lit
module Lit : Solver_intf.LIT with type t = lit
type proof

Proof storage/recording

module Proof : Solver_intf.PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html b/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html index 82366715..3b2643fd 100644 --- a/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_sat.PROOF)

Module type Sidekick_sat.PROOF

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula
type atom
type lemma
type clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +PROOF (sidekick.Sidekick_sat.PROOF)

Module type Sidekick_sat.PROOF

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html deleted file mode 100644 index 454c2b2d..00000000 --- a/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html index 3f26fd83..60d682a6 100644 --- a/dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html deleted file mode 100644 index 070dcdec..00000000 --- a/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Lit/index.html new file mode 100644 index 00000000..8d52055e --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html index 0046c1f0..513d153b 100644 --- a/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-S/index.html b/dev/sidekick/Sidekick_sat/module-type-S/index.html index 76ab1e2b..8e5c5cc8 100644 --- a/dev/sidekick/Sidekick_sat/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat.S)

Module type Sidekick_sat.S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat.S)

Module type Sidekick_sat.S

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : Solver_intf.LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : Solver_intf.PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html index 7de3aae8..887c9222 100644 --- a/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html @@ -1,2 +1,2 @@ -SAT_STATE (sidekick.Sidekick_sat.SAT_STATE)

Module type Sidekick_sat.SAT_STATE

type formula
val eval : formula -> bool

Returns the valuation of a formula in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : formula -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the atom to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (formula -> unit) -> unit

Iter through the formulas in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file +SAT_STATE (sidekick.Sidekick_sat.SAT_STATE)

Module type Sidekick_sat.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (lit -> unit) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html b/dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html index f7e19fcb..2d46ffdc 100644 --- a/dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick.Sidekick_sat__.Heap.Make.1-X)

Parameter Make.1-X

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +1-X (sidekick.Sidekick_sat__.Heap.Make.1-X)

Parameter Make.1-X

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap/Make/index.html b/dev/sidekick/Sidekick_sat__/Heap/Make/index.html index 0bd1fff1..ccb3e5dc 100644 --- a/dev/sidekick/Sidekick_sat__/Heap/Make/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_sat__.Heap.Make)

Module Heap.Make

Parameters

Signature

type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +Make (sidekick.Sidekick_sat__.Heap.Make)

Module Heap.Make

Parameters

Signature

type elt_store = X.store
type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap/index.html b/dev/sidekick/Sidekick_sat__/Heap/index.html index 42b0c1a4..2fb4cb49 100644 --- a/dev/sidekick/Sidekick_sat__/Heap/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap/index.html @@ -1,2 +1,2 @@ -Heap (sidekick.Sidekick_sat__.Heap)

Module Sidekick_sat__.Heap

module Make : functor (X : RANKED) -> S with type elt = X.t
\ No newline at end of file +Heap (sidekick.Sidekick_sat__.Heap)

Module Sidekick_sat__.Heap

module Make : functor (X : RANKED) -> S with type elt = X.t and type elt_store = X.store
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html index 1fbcc741..b44e408d 100644 --- a/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html @@ -1,2 +1,2 @@ -RANKED (sidekick.Sidekick_sat__.Heap.RANKED)

Module type Heap.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +RANKED (sidekick.Sidekick_sat__.Heap.RANKED)

Module type Heap.RANKED

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html index 8e523db2..aee71979 100644 --- a/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__.Heap.S)

Module type Heap.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +S (sidekick.Sidekick_sat__.Heap.S)

Module type Heap.S

type elt_store
type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html index 9751f4a8..b18a2884 100644 --- a/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html @@ -1,2 +1,2 @@ -RANKED (sidekick.Sidekick_sat__.Heap_intf.RANKED)

Module type Heap_intf.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +RANKED (sidekick.Sidekick_sat__.Heap_intf.RANKED)

Module type Heap_intf.RANKED

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html index 98f6d0b3..95fd3340 100644 --- a/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__.Heap_intf.S)

Module type Heap_intf.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +S (sidekick.Sidekick_sat__.Heap_intf.S)

Module type Heap_intf.S

type elt_store
type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html deleted file mode 100644 index 6d647dd7..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.Atom)

Module Make_cdcl_t.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html index 5d69a761..77b91563 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html deleted file mode 100644 index 1d7bddaa..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.Proof)

Module Make_cdcl_t.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html deleted file mode 100644 index f0ab4f8a..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..a17c5db3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..00615ee2 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html index 92e5701d..ba5eca44 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) Sidekick_sat.Solver_intf.acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) Sidekick_sat.Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +1-Th (sidekick.Sidekick_sat__.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type lit
module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type proof

Proof storage/recording

module Proof : Sidekick_sat.Solver_intf.PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) Sidekick_sat.Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) Sidekick_sat.Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html index 99a0f089..8c6a6ef7 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html @@ -1,2 +1,2 @@ -Make_cdcl_t (sidekick.Sidekick_sat__.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = Th.t
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_cdcl_t (sidekick.Sidekick_sat__.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = Th.t
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html deleted file mode 100644 index 35a688ed..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__.Solver.Make_pure_sat.Atom)

Module Make_pure_sat.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html index d7153d3c..5c7c5c2d 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html deleted file mode 100644 index 9b27cc62..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat__.Solver.Make_pure_sat.Proof)

Module Make_pure_sat.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Formula/index.html deleted file mode 100644 index 7afff8be..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver.Make_pure_sat.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..fdc0cc64 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver.Make_pure_sat.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..f5cc388f --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__.Solver.Make_pure_sat.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html index 86f9e4c2..7be9d896 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat__.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type proof
\ No newline at end of file +1-Th (sidekick.Sidekick_sat__.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type lit
module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type proof
module Proof : Sidekick_sat.Solver_intf.PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html index fd058a4f..41c327e5 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html @@ -1,2 +1,2 @@ -Make_pure_sat (sidekick.Sidekick_sat__.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = unit
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_pure_sat (sidekick.Sidekick_sat__.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = unit
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/index.html b/dev/sidekick/Sidekick_sat__/Solver/index.html index 97ff6359..2838a9d3 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/index.html @@ -1,2 +1,2 @@ -Solver (sidekick.Sidekick_sat__.Solver)

Module Sidekick_sat__.Solver

module type S = Sidekick_sat.Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_SAT) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = unit
module Make_cdcl_t : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_CDCL_T) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = Th.t
\ No newline at end of file +Solver (sidekick.Sidekick_sat__.Solver)

Module Sidekick_sat__.Solver

module type S = Sidekick_sat.Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_SAT) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = unit
module Make_cdcl_t : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_CDCL_T) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = Th.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html deleted file mode 100644 index b2424963..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__.Solver.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html index ea030353..70f98d2d 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__.Solver.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__.Solver.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html deleted file mode 100644 index 148118a7..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Lit/index.html new file mode 100644 index 00000000..0f9a293c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html index c32c3f6b..3fd76fb4 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat__.Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat__.Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html index aa5641da..82becb3c 100644 --- a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__.Solver.S)

Module type Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat__.Solver.S)

Module type Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/index.html index dbb68a9a..ff36f25f 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/index.html @@ -1,2 +1,2 @@ -Solver_intf (sidekick.Sidekick_sat__.Solver_intf)

Module Sidekick_sat__.Solver_intf

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type formula = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('atom, 'clause, 'proof) unsat_state = (module UNSAT_STATE with type atom = 'atom and type clause = 'clause and type proof = 'proof)

The type of values returned when the solver reaches an UNSAT state.

type negated =
| Negated

changed sign

| Same_sign

kept sign

This type is used during the normalisation of formulas. See Expr_intf.S.norm for more details.

type ('formula, 'proof) reason =
| Consequence of unit -> 'formula list * 'proof

The type of reasons for propagations of a formula f.

Consequence (l, p) means that the formulas in l imply the propagated formula f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('formula, 'proof) acts = (module ACTS with type formula = 'formula and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type FORMULA = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type PROOF = sig ... end
module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file +Solver_intf (sidekick.Sidekick_sat__.Solver_intf)

Module Sidekick_sat__.Solver_intf

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type lit = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('lit, 'clause) unsat_state = (module UNSAT_STATE with type clause = 'clause and type lit = 'lit)

The type of values returned when the solver reaches an UNSAT state.

type same_sign = bool

This type is used during the normalisation of lits. true means the literal stayed the same, false that its sign was flipped.

type ('lit, 'proof) reason =
| Consequence of unit -> 'lit list * 'proof

The type of reasons for propagations of a lit f.

Consequence (l, p) means that the lits in l imply the propagated lit f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('lit, 'proof) acts = (module ACTS with type lit = 'lit and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type LIT = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html index 939dcd10..fb7a92cc 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html @@ -1,2 +1,2 @@ -ACTS (sidekick.Sidekick_sat__.Solver_intf.ACTS)

Module type Solver_intf.ACTS

type formula
type proof
val iter_assumptions : (formula -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : formula -> lbool

Obtain current value of the given literal

val mk_lit : ?⁠default_pol:bool -> formula -> unit

Map the given formula to a literal, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> formula list -> proof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : formula list -> proof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : formula -> (formulaproof) reason -> unit

Propagate a formula, i.e. the theory can evaluate the formula to be true (see the definition of eval_res

val add_decision_lit : formula -> bool -> unit

Ask the SAT solver to decide on the given formula with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file +ACTS (sidekick.Sidekick_sat__.Solver_intf.ACTS)

Module type Solver_intf.ACTS

type lit
type proof
type dproof = proof -> unit
val iter_assumptions : (lit -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> lbool

Obtain current value of the given literal

val add_lit : ?⁠default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> lit list -> dproof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : lit list -> dproof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> (litdproof) reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html deleted file mode 100644 index d7dce317..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -FORMULA (sidekick.Sidekick_sat__.Solver_intf.FORMULA)

Module type Solver_intf.FORMULA

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-LIT/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-LIT/index.html new file mode 100644 index 00000000..2c52c846 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-LIT/index.html @@ -0,0 +1,2 @@ + +LIT (sidekick.Sidekick_sat__.Solver_intf.LIT)

Module type Solver_intf.LIT

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html deleted file mode 100644 index 26c59969..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_CDCL_T.Formula)

Module PLUGIN_CDCL_T.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html new file mode 100644 index 00000000..6e8b48b3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html new file mode 100644 index 00000000..674104dd --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html index e9ddc319..cb1ef4af 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -1,2 +1,2 @@ -PLUGIN_CDCL_T (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

module Formula : FORMULA
type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +PLUGIN_CDCL_T (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

type lit
module Lit : LIT with type t = lit
type proof

Proof storage/recording

module Proof : PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html deleted file mode 100644 index 1f84fbb8..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_SAT.Formula)

Module PLUGIN_SAT.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html new file mode 100644 index 00000000..78915a2c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_SAT.Lit)

Module PLUGIN_SAT.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html new file mode 100644 index 00000000..45a5dc72 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_SAT.Proof)

Module PLUGIN_SAT.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html index 827e9b75..b5de585f 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html @@ -1,2 +1,2 @@ -PLUGIN_SAT (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

module Formula : FORMULA
type proof
\ No newline at end of file +PLUGIN_SAT (sidekick.Sidekick_sat__.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

type lit
module Lit : LIT with type t = lit
type proof
module Proof : PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html index 64d43958..bd19157f 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_sat__.Solver_intf.PROOF)

Module type Solver_intf.PROOF

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula
type atom
type lemma
type clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +PROOF (sidekick.Sidekick_sat__.Solver_intf.PROOF)

Module type Solver_intf.PROOF

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html deleted file mode 100644 index b82bd2d3..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__.Solver_intf.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html index 2d48bd19..f58869e4 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html deleted file mode 100644 index 97f86186..00000000 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__.Solver_intf.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Lit/index.html new file mode 100644 index 00000000..e8541519 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__.Solver_intf.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html index 2a565a3c..b1038edb 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat__.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat__.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html index e1e7d64e..c718aee8 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula : FORMULA
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat__.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html index d1c4083e..38e999b2 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html @@ -1,2 +1,2 @@ -SAT_STATE (sidekick.Sidekick_sat__.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type formula
val eval : formula -> bool

Returns the valuation of a formula in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : formula -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the atom to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (formula -> unit) -> unit

Iter through the formulas in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file +SAT_STATE (sidekick.Sidekick_sat__.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (lit -> unit) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html index 8d338ef8..8bfe31b1 100644 --- a/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html @@ -1,2 +1,2 @@ -UNSAT_STATE (sidekick.Sidekick_sat__.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type atom
type clause
type proof
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val get_proof : unit -> proof

returns a persistent proof of the empty clause from the Unsat result.

val unsat_assumptions : unit -> atom list

Subset of assumptions responsible for "unsat"

\ No newline at end of file +UNSAT_STATE (sidekick.Sidekick_sat__.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type lit
type clause
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val unsat_assumptions : unit -> lit Iter.t

Subset of assumptions responsible for "unsat"

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html b/dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html index 33651388..02c67fa1 100644 --- a/dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html +++ b/dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick.Sidekick_sat__Heap.Make.1-X)

Parameter Make.1-X

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +1-X (sidekick.Sidekick_sat__Heap.Make.1-X)

Parameter Make.1-X

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/Make/index.html b/dev/sidekick/Sidekick_sat__Heap/Make/index.html index 975d546a..71d720ed 100644 --- a/dev/sidekick/Sidekick_sat__Heap/Make/index.html +++ b/dev/sidekick/Sidekick_sat__Heap/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_sat__Heap.Make)

Module Sidekick_sat__Heap.Make

Parameters

Signature

type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +Make (sidekick.Sidekick_sat__Heap.Make)

Module Sidekick_sat__Heap.Make

Parameters

Signature

type elt_store = X.store
type elt = X.t

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/index.html b/dev/sidekick/Sidekick_sat__Heap/index.html index 7e440f3e..1d276534 100644 --- a/dev/sidekick/Sidekick_sat__Heap/index.html +++ b/dev/sidekick/Sidekick_sat__Heap/index.html @@ -1,2 +1,2 @@ -Sidekick_sat__Heap (sidekick.Sidekick_sat__Heap)

Module Sidekick_sat__Heap

module Make : functor (X : RANKED) -> S with type elt = X.t
\ No newline at end of file +Sidekick_sat__Heap (sidekick.Sidekick_sat__Heap)

Module Sidekick_sat__Heap

module Make : functor (X : RANKED) -> S with type elt = X.t and type elt_store = X.store
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html index 3cf99565..62b75a42 100644 --- a/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html +++ b/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html @@ -1,2 +1,2 @@ -RANKED (sidekick.Sidekick_sat__Heap.RANKED)

Module type Sidekick_sat__Heap.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +RANKED (sidekick.Sidekick_sat__Heap.RANKED)

Module type Sidekick_sat__Heap.RANKED

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html index 5b55015c..45ee7e4f 100644 --- a/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__Heap.S)

Module type Sidekick_sat__Heap.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +S (sidekick.Sidekick_sat__Heap.S)

Module type Sidekick_sat__Heap.S

type elt_store
type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html index 91886360..6ce2ebb8 100644 --- a/dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html +++ b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html @@ -1,2 +1,2 @@ -RANKED (sidekick.Sidekick_sat__Heap_intf.RANKED)

Module type Sidekick_sat__Heap_intf.RANKED

type t
val idx : t -> int

Index in heap. return -1 if never set

val set_idx : t -> int -> unit

Update index in heap

val cmp : t -> t -> bool
\ No newline at end of file +RANKED (sidekick.Sidekick_sat__Heap_intf.RANKED)

Module type Sidekick_sat__Heap_intf.RANKED

type store
type t = private int
val heap_idx : store -> t -> int

Index in heap. return -1 if never set

val set_heap_idx : store -> t -> int -> unit

Update index in heap

val cmp : store -> t -> t -> bool
val of_int_unsafe : int -> t

turn an integer back into an element

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html index 4fa32704..3298cda1 100644 --- a/dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__Heap_intf.S)

Module type Sidekick_sat__Heap_intf.S

type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : unit -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file +S (sidekick.Sidekick_sat__Heap_intf.S)

Module type Sidekick_sat__Heap_intf.S

type elt_store
type elt

Type of elements

type t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

val create : elt_store -> t

Create a heap

val decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

val in_heap : t -> elt -> bool
val size : t -> int

Number of integers within the heap

val is_empty : t -> bool
val clear : t -> unit

Clear the content of the heap

val insert : t -> elt -> unit

Insert a new element into the heap

val remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

raises Not_found

if the heap is empty

val filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html deleted file mode 100644 index 06856e0a..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__Solver.Make_cdcl_t.Atom)

Module Make_cdcl_t.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html index 679b1a3d..50f24f13 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html deleted file mode 100644 index 103b5329..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat__Solver.Make_cdcl_t.Proof)

Module Make_cdcl_t.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Formula/index.html deleted file mode 100644 index 8877acaa..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver.Make_cdcl_t.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..307ae42f --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver.Make_cdcl_t.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..336997ae --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__Solver.Make_cdcl_t.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html index 40b257e1..75580781 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat__Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) Sidekick_sat.Solver_intf.acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) Sidekick_sat.Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +1-Th (sidekick.Sidekick_sat__Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type lit
module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type proof

Proof storage/recording

module Proof : Sidekick_sat.Solver_intf.PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) Sidekick_sat.Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) Sidekick_sat.Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html index fac3d6b5..6e3f47d4 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html @@ -1,2 +1,2 @@ -Make_cdcl_t (sidekick.Sidekick_sat__Solver.Make_cdcl_t)

Module Sidekick_sat__Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = Th.t
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_cdcl_t (sidekick.Sidekick_sat__Solver.Make_cdcl_t)

Module Sidekick_sat__Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = Th.t
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html deleted file mode 100644 index 94bf3155..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__Solver.Make_pure_sat.Atom)

Module Make_pure_sat.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html index 2c2bf122..f5a9b68a 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html deleted file mode 100644 index 7b03a223..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Proof (sidekick.Sidekick_sat__Solver.Make_pure_sat.Proof)

Module Make_pure_sat.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Formula/index.html deleted file mode 100644 index b5f9712a..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver.Make_pure_sat.1-Th.Formula)

Module 1-Th.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Lit/index.html new file mode 100644 index 00000000..b90ca66c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver.Make_pure_sat.1-Th.Lit)

Module 1-Th.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Proof/index.html new file mode 100644 index 00000000..d8a75b1d --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__Solver.Make_pure_sat.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html index 935ffa27..61de7198 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html @@ -1,2 +1,2 @@ -1-Th (sidekick.Sidekick_sat__Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type proof
\ No newline at end of file +1-Th (sidekick.Sidekick_sat__Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type lit
module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type proof
module Proof : Sidekick_sat.Solver_intf.PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html index d4c7e0a3..6622c9f3 100644 --- a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html @@ -1,2 +1,2 @@ -Make_pure_sat (sidekick.Sidekick_sat__Solver.Make_pure_sat)

Module Sidekick_sat__Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula = Th.Formula
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory = unit
type lemma = Th.proof

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +Make_pure_sat (sidekick.Sidekick_sat__Solver.Make_pure_sat)

Module Sidekick_sat__Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type theory = unit
type proof = Th.proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/index.html b/dev/sidekick/Sidekick_sat__Solver/index.html index b2944dd5..dde4247d 100644 --- a/dev/sidekick/Sidekick_sat__Solver/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/index.html @@ -1,2 +1,2 @@ -Sidekick_sat__Solver (sidekick.Sidekick_sat__Solver)

Module Sidekick_sat__Solver

module type S = Sidekick_sat.Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_SAT) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = unit
module Make_cdcl_t : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_CDCL_T) -> S with module Formula = Th.Formula and type lemma = Th.proof and type theory = Th.t
\ No newline at end of file +Sidekick_sat__Solver (sidekick.Sidekick_sat__Solver)

Module Sidekick_sat__Solver

module type S = Sidekick_sat.Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_SAT) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = unit
module Make_cdcl_t : functor (Th : Sidekick_sat.Solver_intf.PLUGIN_CDCL_T) -> S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and module Proof = Th.Proof and type theory = Th.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html deleted file mode 100644 index d8bf3209..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__Solver.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t Sidekick_sat.Solver_intf.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html index 4b65339a..c328771d 100644 --- a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__Solver.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t Sidekick_sat.Solver_intf.printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__Solver.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t Sidekick_sat.Solver_intf.printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html deleted file mode 100644 index 4b139269..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * Sidekick_sat.Solver_intf.negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Lit/index.html new file mode 100644 index 00000000..f8bc2935 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t Sidekick_sat.Solver_intf.printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Sidekick_sat.Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html index d555fef1..7b3c393c 100644 --- a/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat__Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat__Solver.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html index 973c6e13..b55aa306 100644 --- a/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__Solver.S)

Module type Sidekick_sat__Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat__Solver.S)

Module type Sidekick_sat__Solver.S

Safe external interface of solvers.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : Sidekick_sat.Solver_intf.LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : Sidekick_sat.Solver_intf.PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit Sidekick_sat.Solver_intf.sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) Sidekick_sat.Solver_intf.unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Sidekick_sat.Solver_intf.lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/index.html index 650b37ee..f79f99ed 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/index.html @@ -1,2 +1,2 @@ -Sidekick_sat__Solver_intf (sidekick.Sidekick_sat__Solver_intf)

Module Sidekick_sat__Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type formula = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('atom, 'clause, 'proof) unsat_state = (module UNSAT_STATE with type atom = 'atom and type clause = 'clause and type proof = 'proof)

The type of values returned when the solver reaches an UNSAT state.

type negated =
| Negated

changed sign

| Same_sign

kept sign

This type is used during the normalisation of formulas. See Expr_intf.S.norm for more details.

type ('formula, 'proof) reason =
| Consequence of unit -> 'formula list * 'proof

The type of reasons for propagations of a formula f.

Consequence (l, p) means that the formulas in l imply the propagated formula f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('formula, 'proof) acts = (module ACTS with type formula = 'formula and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type FORMULA = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type PROOF = sig ... end
module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file +Sidekick_sat__Solver_intf (sidekick.Sidekick_sat__Solver_intf)

Module Sidekick_sat__Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type lit = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('lit, 'clause) unsat_state = (module UNSAT_STATE with type clause = 'clause and type lit = 'lit)

The type of values returned when the solver reaches an UNSAT state.

type same_sign = bool

This type is used during the normalisation of lits. true means the literal stayed the same, false that its sign was flipped.

type ('lit, 'proof) reason =
| Consequence of unit -> 'lit list * 'proof

The type of reasons for propagations of a lit f.

Consequence (l, p) means that the lits in l imply the propagated lit f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined

Valuation of an atom

module type ACTS = sig ... end
type ('lit, 'proof) acts = (module ACTS with type lit = 'lit and type proof = 'proof)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type LIT = sig ... end
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html index 16004180..022b493d 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html @@ -1,2 +1,2 @@ -ACTS (sidekick.Sidekick_sat__Solver_intf.ACTS)

Module type Sidekick_sat__Solver_intf.ACTS

type formula
type proof
val iter_assumptions : (formula -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : formula -> lbool

Obtain current value of the given literal

val mk_lit : ?⁠default_pol:bool -> formula -> unit

Map the given formula to a literal, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> formula list -> proof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : formula list -> proof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : formula -> (formulaproof) reason -> unit

Propagate a formula, i.e. the theory can evaluate the formula to be true (see the definition of eval_res

val add_decision_lit : formula -> bool -> unit

Ask the SAT solver to decide on the given formula with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file +ACTS (sidekick.Sidekick_sat__Solver_intf.ACTS)

Module type Sidekick_sat__Solver_intf.ACTS

type lit
type proof
type dproof = proof -> unit
val iter_assumptions : (lit -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> lbool

Obtain current value of the given literal

val add_lit : ?⁠default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?⁠keep:bool -> lit list -> dproof -> unit

Add a clause to the solver.

parameter keep

if true, the clause will be kept by the solver. Otherwise the solver is allowed to GC the clause and propose this partial model again.

val raise_conflict : lit list -> dproof -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> (litdproof) reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html deleted file mode 100644 index 8e45ee27..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -FORMULA (sidekick.Sidekick_sat__Solver_intf.FORMULA)

Module type Sidekick_sat__Solver_intf.FORMULA

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-LIT/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-LIT/index.html new file mode 100644 index 00000000..aa2cfeb0 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-LIT/index.html @@ -0,0 +1,2 @@ + +LIT (sidekick.Sidekick_sat__Solver_intf.LIT)

Module type Sidekick_sat__Solver_intf.LIT

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html deleted file mode 100644 index ff0dbf25..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver_intf.PLUGIN_CDCL_T.Formula)

Module PLUGIN_CDCL_T.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html new file mode 100644 index 00000000..76a94091 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver_intf.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html new file mode 100644 index 00000000..8e1a197a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__Solver_intf.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html index 1c3f8b17..e8fde80a 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -1,2 +1,2 @@ -PLUGIN_CDCL_T (sidekick.Sidekick_sat__Solver_intf.PLUGIN_CDCL_T)

Module type Sidekick_sat__Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

module Formula : FORMULA
type proof
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (Formula.tproof) acts -> unit

Assume the formulas in the slice, possibly using the slice to push new formulas to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (Formula.tproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +PLUGIN_CDCL_T (sidekick.Sidekick_sat__Solver_intf.PLUGIN_CDCL_T)

Module type Sidekick_sat__Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

type lit
module Lit : LIT with type t = lit
type proof

Proof storage/recording

module Proof : PROOF with type t = proof and type lit = lit
val push_level : t -> unit

Create a new backtrack level

val pop_levels : t -> int -> unit

Pop n levels of the theory

val partial_check : t -> (litproof) acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproof) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Formula/index.html deleted file mode 100644 index 39b99a00..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver_intf.PLUGIN_SAT.Formula)

Module PLUGIN_SAT.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Lit/index.html new file mode 100644 index 00000000..6d9667ac --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver_intf.PLUGIN_SAT.Lit)

Module PLUGIN_SAT.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Proof/index.html new file mode 100644 index 00000000..e3c8c9d2 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Proof/index.html @@ -0,0 +1,2 @@ + +Proof (sidekick.Sidekick_sat__Solver_intf.PLUGIN_SAT.Proof)

Module PLUGIN_SAT.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html index 2ac363fd..80d4df70 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html @@ -1,2 +1,2 @@ -PLUGIN_SAT (sidekick.Sidekick_sat__Solver_intf.PLUGIN_SAT)

Module type Sidekick_sat__Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

module Formula : FORMULA
type proof
\ No newline at end of file +PLUGIN_SAT (sidekick.Sidekick_sat__Solver_intf.PLUGIN_SAT)

Module type Sidekick_sat__Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

type lit
module Lit : LIT with type t = lit
type proof
module Proof : PROOF with type t = proof and type lit = lit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html index 4270ec55..5436920d 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_sat__Solver_intf.PROOF)

Module type Sidekick_sat__Solver_intf.PROOF

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula
type atom
type lemma
type clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +PROOF (sidekick.Sidekick_sat__Solver_intf.PROOF)

Module type Sidekick_sat__Solver_intf.PROOF

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html deleted file mode 100644 index 9954b4bb..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_sat__Solver_intf.S.Atom)

Module S.Atom

type t = atom
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val abs : t -> t
val formula : t -> formula
val pp : t printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html index 4ca408ce..14880d78 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat__Solver_intf.S.Clause)

Module S.Clause

type t = clause
val atoms : t -> atom array
val atoms_l : t -> atom list
val equal : t -> t -> bool
val short_name : t -> string
val pp : t printer
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Clause (sidekick.Sidekick_sat__Solver_intf.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
val pp : store -> t printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Formula/index.html deleted file mode 100644 index 1010acb8..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Formula/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Formula (sidekick.Sidekick_sat__Solver_intf.S.Formula)

Module S.Formula

type t

The type of atomic formulas over terms.

val equal : t -> t -> bool

Equality over formulas.

val hash : t -> int

Hashing function for formulas. Should be such that two formulas equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm : t -> t * negated

Returns a 'normalized' form of the formula, possibly negated (in which case return Negated). norm must be so that a and neg a normalise to the same formula, but one returns Negated and the other Same_sign.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Lit/index.html new file mode 100644 index 00000000..2cacbc93 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_sat__Solver_intf.S.Lit)

Module S.Lit

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html index e8ae105f..92ce99d7 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat__Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

Type declarations

exception Resolution_error of string

Raised when resolution failed.

type formula = formula
type atom = atom
type lemma = lemma
type clause = clause

Abstract types for atoms, clauses and theory-specific lemmas

type t

Lazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.

and proof_node = {
conclusion : clause;

The conclusion of the proof

step : step;

The reasoning step used to prove the conclusion

}

A proof can be expanded into a proof node, which show the first step of the proof.

and step =
| Hypothesis of lemma

The conclusion is a user-provided hypothesis

| Assumption

The conclusion has been locally assumed by the user

| Lemma of lemma

The conclusion is a tautology provided by the theory, with associated proof

| Duplicate of t * atom list

The conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.

| Hyper_res of hyper_res_step

The type of reasoning steps allowed in a proof.

and hyper_res_step = {
hr_init : t;
hr_steps : (atom * t) list;
}

Proof building functions

val prove : clause -> t

Given a clause, return a proof of that clause.

raises Resolution_error

if it does not succeed.

val prove_unsat : clause -> t

Given a conflict clause c, returns a proof of the empty clause.

raises Resolution_error

if it does not succeed.

val prove_atom : atom -> t option

Given an atom a, returns a proof of the clause [a] if a is true at level 0

val res_of_hyper_res : hyper_res_step -> t * t * atom

Turn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.

Proof Nodes

val parents : step -> t list

Returns the parents of a proof node.

val is_leaf : step -> bool

Returns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma. true if and only if parents returns the empty list.

val expl : step -> string

Returns a short string description for the proof step; for instance "hypothesis" for a Hypothesis (it currently returns the variant name in lowercase).

Proof Manipulation

val expand : t -> proof_node

Return the proof step at the root of a given proof.

val conclusion : t -> clause

What is proved at the root of the clause

val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'a

fold f acc p, fold f over the proof p and all its node. It is guaranteed that f is executed exactly once on each proof node in the tree, and that the execution of f on a proof node happens after the execution on the parents of the nodes.

val unsat_core : t -> clause list

Returns the unsat_core of the given proof, i.e the lists of conclusions of all leafs of the proof. More efficient than using the fold function since it has access to the internal representation of proofs

Misc

val check_empty_conclusion : t -> unit

Check that the proof's conclusion is the empty clause,

raises Resolution_error

otherwise

val check : t -> unit

Check the contents of a proof. Mainly for internal use.

module Tbl : Stdlib.Hashtbl.S with type Tbl.key = t
\ No newline at end of file +Proof (sidekick.Sidekick_sat__Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit = lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html index 2a7f512b..dc5f92a9 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_sat__Solver_intf.S)

Module type Sidekick_sat__Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

module Formula : FORMULA
type formula = Formula.t

user formulas

type atom

The type of atoms given by the module argument for formulas. An atom is a user-defined atomic formula whose truth value is picked by Msat.

type clause
type theory
type lemma

A theory lemma or an input axiom

type solver
module Atom : sig ... end
module Clause : sig ... end
module Proof : PROOF with type clause = clause and type atom = atom and type formula = formula and type lemma = lemma

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(atom array -> unit) -> ?⁠on_decision:(atom -> unit) -> ?⁠on_new_atom:(atom -> unit) -> ?⁠store_proof:bool -> ?⁠size:[ `Tiny | `Small | `Big ] -> theory -> t

Create new solver

parameter theory

the theory

parameter store_proof

if true, stores proof (default true). Otherwise the functions that return proofs will fail with No_proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

Types

type res =
| Sat of formula sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (atomclauseProof.t) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> formula list list -> lemma -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> atom list -> lemma -> unit

Lower level addition of clauses

val add_clause_a : t -> atom array -> lemma -> unit

Lower level addition of clauses

val solve : ?⁠assumptions:atom list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val make_atom : t -> formula -> atom

Add a new atom (i.e propositional formula) to the solver. This formula will be decided on at some point during solving, wether it appears in clauses or not.

val true_at_level0 : t -> atom -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_atom : t -> atom -> lbool

Evaluate atom in current state

\ No newline at end of file +S (sidekick.Sidekick_sat__Solver_intf.S)

Module type Sidekick_sat__Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : LIT with type t = lit
type clause
type theory
type proof

A representation of a full proof

type dproof = proof -> unit
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

type t = solver

Main solver type, containing all state for solving.

val create : ?⁠on_conflict:(t -> Clause.t -> unit) -> ?⁠on_decision:(t -> lit -> unit) -> ?⁠on_learnt:(t -> Clause.t -> unit) -> ?⁠on_gc:(t -> lit array -> unit) -> ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

parameter theory

the theory

parameter the

proof

parameter size

the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Types

type res =
| Sat of lit sat_state

Returned when the solver reaches SAT, with a model

| Unsat of (litclause) unsat_state

Returned when the solver reaches UNSAT, with a proof

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> dproof -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_clause_a : t -> lit array -> dproof -> unit

Lower level addition of clauses

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val solve : ?⁠assumptions:lit list -> t -> res

Try and solves the current set of clauses.

parameter assumptions

additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

val add_lit : t -> ?⁠default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> lbool

Evaluate atom in current state

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html index b443862d..7293d905 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html @@ -1,2 +1,2 @@ -SAT_STATE (sidekick.Sidekick_sat__Solver_intf.SAT_STATE)

Module type Sidekick_sat__Solver_intf.SAT_STATE

type formula
val eval : formula -> bool

Returns the valuation of a formula in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : formula -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the atom to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (formula -> unit) -> unit

Iter through the formulas in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file +SAT_STATE (sidekick.Sidekick_sat__Solver_intf.SAT_STATE)

Module type Sidekick_sat__Solver_intf.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

raises UndecidedLit

if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

raises UndecidedLit

if the literal is not decided

val iter_trail : (lit -> unit) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html index 4c795e41..4d4781ab 100644 --- a/dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html @@ -1,2 +1,2 @@ -UNSAT_STATE (sidekick.Sidekick_sat__Solver_intf.UNSAT_STATE)

Module type Sidekick_sat__Solver_intf.UNSAT_STATE

type atom
type clause
type proof
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val get_proof : unit -> proof

returns a persistent proof of the empty clause from the Unsat result.

val unsat_assumptions : unit -> atom list

Subset of assumptions responsible for "unsat"

\ No newline at end of file +UNSAT_STATE (sidekick.Sidekick_sat__Solver_intf.UNSAT_STATE)

Module type Sidekick_sat__Solver_intf.UNSAT_STATE

type lit
type clause
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val unsat_assumptions : unit -> lit Iter.t

Subset of assumptions responsible for "unsat"

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/.dune-keep b/dev/sidekick/Sidekick_smt_solver/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html new file mode 100644 index 00000000..740b8f40 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_smt_solver.Make.Model)

Module Make.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..606585d3 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..b5e6eab8 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..6867d9d1 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..6e151a5c --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See Sidekick_core.CC_S.allocate_bitfield.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..270ebbcf --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html new file mode 100644 index 00000000..e71a1512 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..6569c1f4 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_smt_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html new file mode 100644 index 00000000..df96b67f --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_smt_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..0fae5b43 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_smt_solver.Make.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html new file mode 100644 index 00000000..f7727e44 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_smt_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html new file mode 100644 index 00000000..de44ad24 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_smt_solver.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html new file mode 100644 index 00000000..55eb57fb --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.Make.1-A.P)

Module 1-A.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html new file mode 100644 index 00000000..a708960a --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_smt_solver.Make.1-A.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html new file mode 100644 index 00000000..4b1a0e08 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_smt_solver.Make.1-A.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html new file mode 100644 index 00000000..3bad37eb --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_smt_solver.Make.1-A.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html new file mode 100644 index 00000000..d517333c --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_smt_solver.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html new file mode 100644 index 00000000..e286cd01 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +1-A (sidekick.Sidekick_smt_solver.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type term = T.Term.t and type t = proof and type lit = Lit.t
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/index.html b/dev/sidekick/Sidekick_smt_solver/Make/index.html new file mode 100644 index 00000000..3f7c76b0 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_smt_solver.Make)

Module Sidekick_smt_solver.Make

Main functor to get a solver.

Parameters

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
module P = A.P
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html b/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html new file mode 100644 index 00000000..e61b8f94 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_smt_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory (ideally, unique and short)

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

Called once for every solver this theory is added to.

val push_level : t -> unit

Push backtracking level. When the corresponding pop is called, the theory's state should be restored to a state equivalent to what it was just before push_level.

it does not have to be exactly the same state, it just needs to be equivalent.

val pop_levels : t -> int -> unit

pop_levels theory n pops n backtracking levels, restoring theory to its state before calling push_level n times.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/index.html b/dev/sidekick/Sidekick_smt_solver/index.html new file mode 100644 index 00000000..936b37df --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/index.html @@ -0,0 +1,2 @@ + +Sidekick_smt_solver (sidekick.Sidekick_smt_solver)

Module Sidekick_smt_solver

Core of the SMT solver using Sidekick_sat

Sidekick_sat (in src/sat/) is a modular SAT solver in pure OCaml.

This builds a Sidekick_core.SOLVER on top of it.

module type ARG = sig ... end

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module type S = Sidekick_core.SOLVER
module Make : functor (A : ARG) -> S with module T = A.T and type proof = A.proof and module Lit = A.Lit and module P = A.P

Main functor to get a solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html new file mode 100644 index 00000000..29429a12 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_smt_solver.ARG.Lit)

Module ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html new file mode 100644 index 00000000..e5aa5aa3 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.ARG.P)

Module ARG.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html new file mode 100644 index 00000000..45072d53 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_smt_solver.ARG.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html new file mode 100644 index 00000000..a27583b8 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_smt_solver.ARG.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html new file mode 100644 index 00000000..422029eb --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_smt_solver.ARG.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html similarity index 58% rename from dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html rename to dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html index 2a4faf23..13eb235b 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_msat_solver.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file +T (sidekick.Sidekick_smt_solver.ARG.T)

Module ARG.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html new file mode 100644 index 00000000..dc467e5f --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_smt_solver.ARG)

Module type Sidekick_smt_solver.ARG

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type term = T.Term.t and type t = proof and type lit = Lit.t
val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) Sidekick_core.CC_view.t
val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Lit/index.html new file mode 100644 index 00000000..264ca6dd --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_smt_solver.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Model/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Model/index.html new file mode 100644 index 00000000..f29064d3 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_smt_solver.S.Model)

Module S.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/P/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/P/index.html new file mode 100644 index 00000000..8c2cabbc --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..b61cd9b1 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..88ae8aad --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,2 @@ + +Actions (sidekick.Sidekick_smt_solver.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..7c56dd88 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_smt_solver.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..3efdac99 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_smt_solver.S.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See Sidekick_core.CC_S.allocate_bitfield.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..86e550f0 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_smt_solver.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/index.html new file mode 100644 index 00000000..bf248c31 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/CC/index.html @@ -0,0 +1,2 @@ + +CC (sidekick.Sidekick_smt_solver.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..2e4316ca --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_smt_solver.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/index.html new file mode 100644 index 00000000..0aeba74b --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/index.html @@ -0,0 +1,2 @@ + +Solver_internal (sidekick.Sidekick_smt_solver.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..d7224d4c --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_smt_solver.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Fun/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Fun/index.html new file mode 100644 index 00000000..d7a07086 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_smt_solver.S.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Term/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Term/index.html new file mode 100644 index 00000000..e07afbff --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_smt_solver.S.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+let y = f x x in
+let z = g y x in
+z = z

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Ty/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Ty/index.html new file mode 100644 index 00000000..df976787 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_smt_solver.S.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/T/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/index.html new file mode 100644 index 00000000..f2a80aeb --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_smt_solver.S.T)

Module S.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/Unknown/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/Unknown/index.html new file mode 100644 index 00000000..3bc6fa41 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_smt_solver.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/index.html new file mode 100644 index 00000000..4e0b8918 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_smt_solver.S)

Module type Sidekick_smt_solver.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-S/module-type-THEORY/index.html new file mode 100644 index 00000000..726975b9 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/module-type-S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_smt_solver.S.THEORY)

Module type S.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type Sidekick_core.SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory (ideally, unique and short)

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

Called once for every solver this theory is added to.

val push_level : t -> unit

Push backtracking level. When the corresponding pop is called, the theory's state should be restored to a state equivalent to what it was just before push_level.

it does not have to be exactly the same state, it just needs to be equivalent.

val pop_levels : t -> int -> unit

pop_levels theory n pops n backtracking levels, restoring theory to its state before calling push_level n times.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html deleted file mode 100644 index b7c05584..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_bool_static.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html index bc268257..7d2a2f20 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Quip/index.html deleted file mode 100644 index 335512c3..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_bool_static.Make.1-A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html index 10fa7377..968b8925 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_bool_static.Make.1-A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Pre_proof/index.html deleted file mode 100644 index 9cc755f7..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_bool_static.Make.1-A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..dcc2f6b0 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index f836270f..0363e54a 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html index 55e9e0dc..55836cd9 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..5ae4ae92 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html index 7c28a038..1cddd70f 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html index f1d20d62..cb2db3ba 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html index 9cace420..99354121 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..20af57e5 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html index df8505a3..ec0767be 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html index 493a870e..3e7cf4bd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_th_bool_static.Make.1-A)

Parameter Make.1-A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val proof_ite_true : S.T.Term.t -> S.P.t

proof_ite_true (ite a b c) is a=true |- ite a b c = b

val proof_ite_false : S.T.Term.t -> S.P.t

proof_ite_false (ite a b c) is a=false |- ite a b c = c

val proof_bool_eq : S.T.Term.t -> S.T.Term.t -> S.P.t

Basic boolean logic for |- a=b

val proof_bool_c : string -> term list -> S.P.t

Basic boolean logic for a clause |- c

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file +1-A (sidekick.Sidekick_th_bool_static.Make.1-A)

Parameter Make.1-A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> unit

Boolean tautology lemma (clause)

val lemma_bool_c : string -> term list -> S.P.t -> unit

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : term -> term -> S.P.t -> unit

Boolean tautology lemma (equivalence)

val lemma_ite_true : a:term -> ite:term -> S.P.t -> unit

lemma a => ite a b c = b

val lemma_ite_false : a:term -> ite:term -> S.P.t -> unit

lemma ¬a => ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html deleted file mode 100644 index 4d206933..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_bool_static.ARG.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html index 90fe2537..ac2df590 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_bool_static.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Quip/index.html deleted file mode 100644 index 29a4906c..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_bool_static.ARG.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html index 73145d19..296f0938 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_bool_static.ARG.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Pre_proof/index.html deleted file mode 100644 index 97f06e85..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_bool_static.ARG.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..7052ae06 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html index 03c3e6cf..8ace6f0a 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html index 46a82c69..b8aff349 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..4789e104 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html index c9f9fcaa..ff1f51dd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html index 23286068..6045cd0a 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html index ce34787d..28b5eafc 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..7bf8cec2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html index 463038b3..3fe49e4e 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html index 58d51075..22d60c4f 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_th_bool_static.ARG)

Module type Sidekick_th_bool_static.ARG

Argument to the theory

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val proof_ite_true : S.T.Term.t -> S.P.t

proof_ite_true (ite a b c) is a=true |- ite a b c = b

val proof_ite_false : S.T.Term.t -> S.P.t

proof_ite_false (ite a b c) is a=false |- ite a b c = c

val proof_bool_eq : S.T.Term.t -> S.T.Term.t -> S.P.t

Basic boolean logic for |- a=b

val proof_bool_c : string -> term list -> S.P.t

Basic boolean logic for a clause |- c

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file +ARG (sidekick.Sidekick_th_bool_static.ARG)

Module type Sidekick_th_bool_static.ARG

Argument to the theory

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> unit

Boolean tautology lemma (clause)

val lemma_bool_c : string -> term list -> S.P.t -> unit

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : term -> term -> S.P.t -> unit

Boolean tautology lemma (equivalence)

val lemma_ite_true : a:term -> ite:term -> S.P.t -> unit

lemma a => ite a b c = b

val lemma_ite_false : a:term -> ite:term -> S.P.t -> unit

lemma ¬a => ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html deleted file mode 100644 index 48635b54..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_bool_static.S.A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html index 45a1f906..05a03cc5 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_bool_static.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Quip/index.html deleted file mode 100644 index a581897d..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_bool_static.S.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html index 1ba164da..1798d21a 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_bool_static.S.A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Pre_proof/index.html deleted file mode 100644 index 0e2e9399..00000000 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_bool_static.S.A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..8f409689 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html index d388d786..1fbe2e00 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html index 93574be5..00f02250 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..3a3f667f --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html index da8a6755..fe30ef48 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html index 7933d733..3822308f 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html index 909432f5..b74fe7db 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..af98ff6e --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html index 41551ddd..4cc319f6 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html index cd9c3307..e39c1057 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (sidekick.Sidekick_th_bool_static.S.A)

Module S.A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val proof_ite_true : S.T.Term.t -> S.P.t

proof_ite_true (ite a b c) is a=true |- ite a b c = b

val proof_ite_false : S.T.Term.t -> S.P.t

proof_ite_false (ite a b c) is a=false |- ite a b c = c

val proof_bool_eq : S.T.Term.t -> S.T.Term.t -> S.P.t

Basic boolean logic for |- a=b

val proof_bool_c : string -> term list -> S.P.t

Basic boolean logic for a clause |- c

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file +A (sidekick.Sidekick_th_bool_static.S.A)

Module S.A

type term = S.T.Term.t
val view_as_bool : term -> (termterm Iter.t) bool_view

Project the term into the boolean view.

val mk_bool : S.T.Term.store -> (termterm Sidekick_util.IArray.t) bool_view -> term

Make a term from the given boolean view.

val check_congruence_classes : bool

Configuration: add final-check handler to verify if new boolean formulas are present in the congruence closure. Only enable if some theories are susceptible to create boolean formulas during the proof search.

val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> unit

Boolean tautology lemma (clause)

val lemma_bool_c : string -> term list -> S.P.t -> unit

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : term -> term -> S.P.t -> unit

Boolean tautology lemma (equivalence)

val lemma_ite_true : a:term -> ite:term -> S.P.t -> unit

lemma a => ite a b c = b

val lemma_ite_false : a:term -> ite:term -> S.P.t -> unit

lemma ¬a => ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html deleted file mode 100644 index 37bb77ab..00000000 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_cstor.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html index 7d5d8fa4..c33f05a4 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_cstor.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Quip/index.html deleted file mode 100644 index feed8990..00000000 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_cstor.Make.1-A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html index 7c07fbcc..ce28814e 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_cstor.Make.1-A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_cstor.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Pre_proof/index.html deleted file mode 100644 index be295eac..00000000 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_cstor.Make.1-A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..8feeafc1 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index 68caa03b..2c9eac08 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html index c3942d03..331f1112 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..1a3deb85 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html index bfe91c37..c0104a9a 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html index da5d4591..22e585c6 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html index 0e4d60ee..91c72672 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..e5426eef --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html index 60d2e23b..f1794bcf 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_cstor.Make.1-A.S)

Module 1-A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html index 791ca8f4..f0d1828b 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_th_cstor.Make.1-A)

Parameter Make.1-A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file +1-A (sidekick.Sidekick_th_cstor.Make.1-A)

Parameter Make.1-A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html deleted file mode 100644 index f1c68f48..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_cstor.ARG.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html index a2e33b6c..908be13d 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_cstor.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html deleted file mode 100644 index 139908ab..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_cstor.ARG.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html index 5daa188e..125e3006 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_cstor.ARG.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_cstor.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html deleted file mode 100644 index 590b1bd7..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_cstor.ARG.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..a100e55a --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html index 09f0e5c8..d7824155 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html index c16f9329..b12f2e7d 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..408ce170 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html index f406b434..59f5760c 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html index 4e164ab0..5f9f97af 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html index f1f6ec10..740c91e3 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..1ae9e8a6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html index 3f9f4d07..1326757a 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_cstor.ARG.S)

Module ARG.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html index 43b3ce47..f9ae22cb 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_th_cstor.ARG)

Module type Sidekick_th_cstor.ARG

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file +ARG (sidekick.Sidekick_th_cstor.ARG)

Module type Sidekick_th_cstor.ARG

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html deleted file mode 100644 index d7a1909a..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_cstor.S.A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html index 8097b9ab..238e013d 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_cstor.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html deleted file mode 100644 index 39ef15b5..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_cstor.S.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html index 0d177dd7..d8a101de 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_cstor.S.A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_cstor.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Pre_proof/index.html deleted file mode 100644 index a68445f7..00000000 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_cstor.S.A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..ae207785 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html index b0797483..367ae611 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html index 5d7c779f..bc9f99e0 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..98105aff --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html index e267d005..7b39a0c2 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html index f43266c3..e5aae776 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html index b7ed333b..8beadb95 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..ff1b1bf6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html index 60ebf82c..3cfc789e 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_cstor.S.A.S)

Module A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html index a83baa90..5b4c61d3 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (sidekick.Sidekick_th_cstor.S.A)

Module S.A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
\ No newline at end of file +A (sidekick.Sidekick_th_cstor.S.A)

Module S.A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html deleted file mode 100644 index 7b1ba748..00000000 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_data.Make.1-A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html index 45435e82..e8f07105 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_data.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Quip/index.html deleted file mode 100644 index dd1d15f1..00000000 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_data.Make.1-A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html index 945b19b9..6bfdce72 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_data.Make.1-A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_data.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Pre_proof/index.html deleted file mode 100644 index fba88837..00000000 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_data.Make.1-A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..76da8ea4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index 4d771985..27d1a52f 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html index 23725d6f..822e18b5 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..4a50793e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html index 0b0ec560..70475634 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html index fcfc6b1c..08a093cc 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html index fa9f2b12..6aad92b5 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..e64854b6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html index e5fa3c29..ef26d5e2 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_data.Make.1-A.S)

Module 1-A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html index fc5ff2f1..b03550a5 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_th_data.Make.1-A)

Parameter Make.1-A

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val proof_isa_split : S.T.Ty.t -> S.T.Term.t Iter.t -> S.P.t
val proof_isa_disj : S.T.Ty.t -> S.T.Term.t -> S.T.Term.t -> S.P.t
val proof_cstor_inj : Cstor.t -> int -> S.T.Term.t list -> S.T.Term.t list -> S.P.t
\ No newline at end of file +1-A (sidekick.Sidekick_th_data.Make.1-A)

Parameter Make.1-A

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val lemma_isa_split : S.Lit.t Iter.t -> S.proof -> unit
val lemma_isa_disj : S.Lit.t Iter.t -> S.proof -> unit
val lemma_cstor_inj : S.Lit.t Iter.t -> S.proof -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html deleted file mode 100644 index 56bdaf90..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_data.ARG.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html index e9664e5d..164a0ab4 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_data.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Quip/index.html deleted file mode 100644 index 2ab9719f..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_data.ARG.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html index 32deacd3..7e6bfa93 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_data.ARG.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_data.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html deleted file mode 100644 index 0c3bf631..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_data.ARG.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..cd4549c6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html index 73182b36..7280796c 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html index b6dcc423..61e5123e 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..40b3fff3 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html index 4db44dff..e2242a65 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html index ae2087dd..3e472dba 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_data.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html index e584059f..55e63633 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_data.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..a861c5f7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_data.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html index 6ef9a8ca..d67b3407 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_data.ARG.S)

Module ARG.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html index a2c4cf2c..031707e3 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_th_data.ARG)

Module type Sidekick_th_data.ARG

Argument to the functor

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val proof_isa_split : S.T.Ty.t -> S.T.Term.t Iter.t -> S.P.t
val proof_isa_disj : S.T.Ty.t -> S.T.Term.t -> S.T.Term.t -> S.P.t
val proof_cstor_inj : Cstor.t -> int -> S.T.Term.t list -> S.T.Term.t list -> S.P.t
\ No newline at end of file +ARG (sidekick.Sidekick_th_data.ARG)

Module type Sidekick_th_data.ARG

Argument to the functor

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val lemma_isa_split : S.Lit.t Iter.t -> S.proof -> unit
val lemma_isa_disj : S.Lit.t Iter.t -> S.proof -> unit
val lemma_cstor_inj : S.Lit.t Iter.t -> S.proof -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html deleted file mode 100644 index d4dadca0..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Atom (sidekick.Sidekick_th_data.S.A.S.Atom)

Module S.Atom

Boolean Atoms

Atoms are the SAT solver's version of our boolean literals (they may have a different representation).

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t CCFormat.printer
val neg : t -> t
val formula : t -> lit
val sign : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html index 4988d08a..73dba933 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_th_data.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : T.Term.store -> ?⁠sign:bool -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

parameter sign

if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Quip/index.html deleted file mode 100644 index 4d54ca31..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Quip/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Quip (sidekick.Sidekick_th_data.S.A.S.P.Quip)

Module P.Quip

val output : Stdlib.out_channel -> t -> unit

Printer in Quip format (experimental)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html index 4cc0cb36..5dbbccf5 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html @@ -1,2 +1,2 @@ -P (sidekick.Sidekick_th_data.S.A.S.P)

Module S.P

type t

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type ty
type hres_step

hyper-resolution steps: resolution, unit resolution; bool paramodulation, unit bool paramodulation

val r : t -> pivot:term -> hres_step

Resolution step on given pivot term

val r1 : t -> hres_step

Unit resolution; pivot is obvious

val p : t -> lhs:term -> rhs:term -> hres_step

Paramodulation using proof whose conclusion has a literal lhs=rhs

val p1 : t -> hres_step

Unit paramodulation

type lit

Proof representation of literals

val pp_lit : lit Sidekick_core.Fmt.printer
val lit_a : term -> lit
val lit_na : term -> lit
val lit_mk : bool -> term -> lit
val lit_eq : term -> term -> lit
val lit_neq : term -> term -> lit
val lit_not : lit -> lit
val lit_sign : lit -> bool
type composite_step
val stepc : name:string -> lit list -> t -> composite_step
val deft : term -> term -> composite_step

define a (new) atomic term

val is_trivial_refl : t -> bool

is this a proof of |- t=t? This can be used to remove some trivial steps that would build on the proof (e.g. rewriting using refl t is useless).

val assertion : term -> t
val assertion_c : lit Iter.t -> t
val ref_by_name : string -> t
val assertion_c_l : lit list -> t
val hres_iter : t -> hres_step Iter.t -> t
val hres_l : t -> hres_step list -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val refl : term -> t
val true_is_true : t
val true_neq_false : t
val nn : t -> t
val cc_lemma : lit list -> t
val cc_imply2 : t -> t -> term -> term -> t
val cc_imply_l : t list -> term -> term -> t
val composite_iter : ?⁠assms:(string * lit) list -> composite_step Iter.t -> t
val composite_l : ?⁠assms:(string * lit) list -> composite_step list -> t
val sorry : t
val sorry_c : lit Iter.t -> t
val sorry_c_l : lit list -> t
val default : t
val pp_debug : sharing:bool -> t Sidekick_core.Fmt.printer

Pretty print a proof.

parameter sharing

if true, try to compact the proof by introducing definitions for common terms, clauses, and steps as needed. Safe to ignore.

module Quip : sig ... end
\ No newline at end of file +P (sidekick.Sidekick_th_data.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type term = T.Term.t
type lit = Lit.t
include Sidekick_core.CC_PROOF with type t := t and type lit := lit
type t
type lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

include Sidekick_core.SAT_PROOF with type t := t and type lit := lit
type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type lit

A boolean literal for the proof trace

type dproof = t -> unit

A delayed proof, used to produce proofs on demand from theories.

val with_proof : t -> (t -> unit) -> unit

If proof is enabled, call f on it to emit steps. if proof is disabled, the callback won't even be called.

val emit_input_clause : lit Iter.t -> t -> unit

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> t -> unit

Emit a clause deduced by the SAT solver, redundant wrt axioms. The clause must be RUP wrt previous clauses.

val del_clause : lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val begin_subproof : t -> unit

Begins a subproof. The result of this will only be the clause with which end_subproof is called; all other intermediate steps will be discarded.

val end_subproof : t -> unit

end_subproof p ends the current active subproof, the last result of which is kept.

val define_term : term -> term -> t -> unit

define_term p cst u defines the new constant cst as being equal to u.

val lemma_true : term -> t -> unit

lemma_true p (true) asserts the clause (true)

val lemma_preprocess : term -> term -> t -> unit

lemma_preprocess p t u asserts that t = u is a tautology and that t has been preprocessed into u. From now on, t and u will be used interchangeably.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Pre_proof/index.html deleted file mode 100644 index 24b428ac..00000000 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Pre_proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Pre_proof (sidekick.Sidekick_th_data.S.A.S.Pre_proof)

Module S.Pre_proof

Internal representation of proofs

A type or state convertible into P.t

type t
val output : Stdlib.out_channel -> t -> unit

Output onto a channel, efficiently

val pp_debug : t Sidekick_core.Fmt.printer
val pp_dot : t Sidekick_core.Fmt.printer option

Optional printer into DOT/graphviz

val check : t -> unit

Check the proof (to an unspecified level of confidence; this can be a no-op). May fail.

val to_proof : t -> P.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..9fe38b35 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type lit = Lit.t
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html index 45d90c45..df7547a1 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -1,2 +1,2 @@ -Actions (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
module P = P
type t = actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> P.t -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * P.t) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof
type t = theory_actions

An action handle. It is used by the congruence closure to perform the actions below. How it performs the actions is not specified and is solver-specific.

val raise_conflict : t -> Lit.t list -> dproof -> 'a

raise_conflict acts c pr declares that c is a tautology of the theory of congruence. This does not return (it should raise an exception).

parameter pr

the proof of c being a tautology

val propagate : t -> Lit.t -> reason:(unit -> Lit.t list * dproof) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html index 0a9ee3f0..7c451b6e 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file +Expl (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t
val mk_lit : lit -> t
val mk_list : t list -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..ec533524 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,2 @@ + +P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type lit = lit
val lemma_cc : lit Iter.t -> t -> unit

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html index 652b586c..347f3883 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -CC (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module P = P
module Lit = Lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and module P = P and type t = actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type proof = P.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * P.t) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

module T = T
module Lit = Lit
type proof = proof
type dproof = proof -> unit
module P : Sidekick_core.CC_PROOF with type lit = Lit.t and type t = proof and type t = proof and type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val find : t -> node -> repr

Current representative

val add_term : t -> term -> node

Add the term to the congruence closure, if not present already. Will be backtracked.

val mem_term : t -> term -> bool

Returns true if the term is explicitly present in the congruence closure

Events

Events triggered by the congruence closure, to which other plugins can subscribe.

type ev_on_pre_merge = t -> actions -> N.t -> N.t -> Expl.t -> unit

ev_on_pre_merge cc acts n1 n2 expl is called right before n1 and n2 are merged with explanation expl.

type ev_on_post_merge = t -> actions -> N.t -> N.t -> unit

ev_on_post_merge cc acts n1 n2 is called right after n1 and n2 were merged. find cc n1 and find cc n2 will return the same node.

type ev_on_new_term = t -> N.t -> term -> unit

ev_on_new_term cc n t is called whenever a new term t is added to the congruence closure. Its node is n.

type ev_on_conflict = t -> th:bool -> lit list -> unit

ev_on_conflict acts ~th c is called when the congruence closure triggers a conflict by asserting the tautology c.

parameter th

true if the explanation for this conflict involves at least one "theory" explanation; i.e. some of the equations participating in the conflict are purely syntactic theories like injectivity of constructors.

type ev_on_propagate = t -> lit -> (unit -> lit list * dproof) -> unit

ev_on_propagate cc lit reason is called whenever reason() => lit is a propagated lemma. See Sidekick_core.CC_ACTIONS.propagate.

type ev_on_is_subterm = N.t -> term -> unit

ev_on_is_subterm n t is called when n is a subterm of another node for the first time. t is the term corresponding to the node n. This can be useful for theory combination.

val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠on_pre_merge:ev_on_pre_merge list -> ?⁠on_post_merge:ev_on_post_merge list -> ?⁠on_new_term:ev_on_new_term list -> ?⁠on_conflict:ev_on_conflict list -> ?⁠on_propagate:ev_on_propagate list -> ?⁠on_is_subterm:ev_on_is_subterm list -> ?⁠size:[ `Small | `Big ] -> term_store -> t

Create a new congruence closure.

parameter term_store

used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

raises Not_found

if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html index 3d28635b..1dd3f6c5 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_th_data.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

type hook = t -> term -> (term * proof) option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> (term * P.t) option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term * P.t

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val with_proof : t -> (proof -> unit) -> unit
type hook = t -> term -> term option

Given a term, try to simplify it. Return None if it didn't change.

A simple example could be a hook that takes a term t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.

val normalize : t -> term -> term option

Normalize a term using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the term.

val normalize_t : t -> term -> term

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, refl t if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html index 40f5ab61..cc42c133 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/index.html @@ -1,2 +1,2 @@ -Solver_internal (sidekick.Sidekick_th_data.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module P = P
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = P.t
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t

Actions for the theories

type actions

Handle that the theories can use to perform actions.

module Lit = Lit
type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module P = P and module Lit = Lit and type Actions.t = actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> (term * proof) option

Simplify input term, returns Some (u, |- t=u) if some simplification occurred.

val simp_t : t -> term -> term * proof

simp_t si t returns u, |- t=u even if no simplification occurred (in which case t == u syntactically). (see simplifier)

hooks for the theory

val raise_conflict : t -> actions -> lit list -> proof -> 'a

Give a conflict clause to the solver

val push_decision : t -> actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> actions -> lit -> reason:(unit -> lit list * proof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> actions -> lit -> lit list -> proof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> actions -> lit list -> proof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> actions -> lit list -> proof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> add_clause:(Lit.t list -> proof -> unit) -> term -> term * proof

Preprocess a term.

val add_lit : t -> actions -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value

val add_lit_t : t -> actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

type preprocess_hook = t -> mk_lit:(term -> lit) -> add_clause:(lit list -> proof -> unit) -> term -> (term * proof) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u,p) if t=u and p is a proof of t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter mk_lit

creates a new literal for a boolean term.

parameter add_clause

pushes a new clause into the SAT solver.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val with_proof : t -> (proof -> unit) -> unit

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Proof helpers

val define_const : t -> const:term -> rhs:term -> unit

define_const si ~const ~rhs adds the definition const := rhs to the (future) proof. const should be a fresh constant that occurs nowhere else, and rhs a term defined without const.

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplifier : t -> Simplify.t
val simplify_t : t -> term -> term option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> term option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

parameter preprocess_actions

actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> dproof -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * dproof) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> dproof -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> dproof -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> dproof -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?⁠sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term

Preprocess a term. The preprocessing proof is automatically emitted.

val add_lit : t -> theory_actions -> ?⁠default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

parameter default_pol

default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?⁠sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * dproof) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..6c2aa5dd --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_th_data.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val mk_lit : ?⁠sign:bool -> term -> lit

creates a new literal for a boolean term.

val add_clause : lit list -> dproof -> unit

pushes a new clause into the SAT solver.

val add_lit : ?⁠default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html index 4949097d..c8cc8ad3 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_data.S.A.S)

Module A.S

module P : Sidekick_core.PROOF with type term = T.Term.t
module Lit : Sidekick_core.LIT with module T = T
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module P = P and module Lit = Lit

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type proof = P.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Atom : sig ... end
module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> ?⁠store_proof:bool -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_atom_lit : t -> lit -> Atom.t * P.t

mk_atom_lit _ lit returns atom, pr where atom is an internal atom for the solver, and pr is a proof of |- lit = atom

val mk_atom_lit' : t -> lit -> Atom.t

Like mk_atom_t but skips the proof

val mk_atom_t : t -> ?⁠sign:bool -> term -> Atom.t * P.t

mk_atom_t _ ~sign t returns atom, pr where atom is an internal representation of ± t, and pr is a proof of |- atom = (± t)

val mk_atom_t' : t -> ?⁠sign:bool -> term -> Atom.t

Like mk_atom_t but skips the proof

val add_clause : t -> Atom.t Sidekick_util.IArray.t -> P.t -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> Atom.t list -> P.t -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

module Pre_proof : sig ... end
type res =
| Sat of Model.t

Satisfiable

| Unsat of {
proof : Pre_proof.t option lazy_t;

proof of unsat

unsat_core : Atom.t list lazy_t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:Atom.t list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
type dproof = proof -> unit

Delayed proof. This is used to build a proof step on demand.

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> ?⁠push_level:('th -> unit) -> ?⁠pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val create : ?⁠stat:Sidekick_util.Stat.t -> ?⁠size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

parameter store_proof

if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

parameter size

influences the size of initial allocations.

parameter theories

theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?⁠sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> dproof -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> dproof -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t

Satisfiable

| Unsat of {
unsat_core : unit -> lit Iter.t;

subset of assumptions responsible for unsat

}

Unsatisfiable

| Unknown of Unknown.t

Unknown, obtained after a timeout, memory limit, etc.

Result of solving for the current set of clauses

val solve : ?⁠on_exit:(unit -> unit) list -> ?⁠check:bool -> ?⁠on_progress:(t -> unit) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

parameter check

if true, the model is checked before returning.

parameter on_progress

called regularly during solving.

parameter assumptions

a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

parameter on_exit

functions to be run before this returns

val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html index fe04c75c..b7d4c789 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html @@ -1,2 +1,2 @@ -A (sidekick.Sidekick_th_data.S.A)

Module S.A

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val proof_isa_split : S.T.Ty.t -> S.T.Term.t Iter.t -> S.P.t
val proof_isa_disj : S.T.Ty.t -> S.T.Term.t -> S.T.Term.t -> S.P.t
val proof_cstor_inj : Cstor.t -> int -> S.T.Term.t list -> S.T.Term.t list -> S.P.t
\ No newline at end of file +A (sidekick.Sidekick_th_data.S.A)

Module S.A

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> (Cstor.t Iter.tS.T.Ty.t) data_ty_view

Try to view type as a datatype (with its constructors)

val view_as_data : S.T.Term.t -> (Cstor.tS.T.Term.t) data_view

Try to view term as a datatype term

val mk_cstor : S.T.Term.store -> Cstor.t -> S.T.Term.t Sidekick_util.IArray.t -> S.T.Term.t

Make a constructor application term

val mk_is_a : S.T.Term.store -> Cstor.t -> S.T.Term.t -> S.T.Term.t

Make a is-a term

val mk_sel : S.T.Term.store -> Cstor.t -> int -> S.T.Term.t -> S.T.Term.t

Make a selector term

val mk_eq : S.T.Term.store -> S.T.Term.t -> S.T.Term.t -> S.T.Term.t

Make a term equality

val ty_is_finite : S.T.Ty.t -> bool

Is the given type known to be finite? For example a finite datatype (an "enum" in C parlance), or Bool, or Array Bool Bool.

val ty_set_is_finite : S.T.Ty.t -> bool -> unit

Modify the "finite" field (see ty_is_finite)

val lemma_isa_split : S.Lit.t Iter.t -> S.proof -> unit
val lemma_isa_disj : S.Lit.t Iter.t -> S.proof -> unit
val lemma_cstor_inj : S.Lit.t Iter.t -> S.proof -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Bitvec/index.html b/dev/sidekick/Sidekick_util/Bitvec/index.html new file mode 100644 index 00000000..20f82c22 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Bitvec/index.html @@ -0,0 +1,2 @@ + +Bitvec (sidekick.Sidekick_util.Bitvec)

Module Sidekick_util.Bitvec

Bitvector

type t
val create : unit -> t
val ensure_size : t -> int -> unit

ensure_size bv i ensures that i is a valid index in bv

val get : t -> int -> bool
val set : t -> int -> bool -> unit
val clear_all : t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Util/index.html b/dev/sidekick/Sidekick_util/Util/index.html index aed1729b..739c2581 100644 --- a/dev/sidekick/Sidekick_util/Util/index.html +++ b/dev/sidekick/Sidekick_util/Util/index.html @@ -1,2 +1,2 @@ -Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file +Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b IArray.t) -> 'a list -> 'b list
val array_of_list_map : ('a -> 'b) -> 'a list -> 'b array

array_of_list_map f l is the same as Array.of_list @@ List.map f l

val array_to_list_map : ('a -> 'b) -> 'a array -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec/index.html b/dev/sidekick/Sidekick_util/Vec/index.html index a5630cfe..daf90e7c 100644 --- a/dev/sidekick/Sidekick_util/Vec/index.html +++ b/dev/sidekick/Sidekick_util/Vec/index.html @@ -1,2 +1,2 @@ -Vec (sidekick.Sidekick_util.Vec)

Module Sidekick_util.Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file +Vec (sidekick.Sidekick_util.Vec)

Module Sidekick_util.Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val ensure_size : 'a t -> 'a -> int -> unit

ensure size is at least n

val ensure_size_with : 'a t -> (unit -> 'a) -> int -> unit

ensure size is at least n

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop_exn : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val pop : 'a t -> 'a option
val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val prepend : 'a t -> into:'a t -> unit

prepend v ~into pushes all elements of v into into, at the beginning. consumes v.

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/VecI32/index.html b/dev/sidekick/Sidekick_util/VecI32/index.html new file mode 100644 index 00000000..1918dfd8 --- /dev/null +++ b/dev/sidekick/Sidekick_util/VecI32/index.html @@ -0,0 +1,2 @@ + +VecI32 (sidekick.Sidekick_util.VecI32)

Module Sidekick_util.VecI32

Vectors of int32 integers

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := int
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
val push_i32 : t -> int32 -> unit
val get_i32 : t -> int -> int32
val set_i32 : t -> int -> int32 -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_float/index.html b/dev/sidekick/Sidekick_util/Vec_float/index.html new file mode 100644 index 00000000..cabd9d5d --- /dev/null +++ b/dev/sidekick/Sidekick_util/Vec_float/index.html @@ -0,0 +1,2 @@ + +Vec_float (sidekick.Sidekick_util.Vec_float)

Module Sidekick_util.Vec_float

Vectors of floats

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := float
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/index.html b/dev/sidekick/Sidekick_util/Vec_sig/index.html new file mode 100644 index 00000000..c858cf87 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Vec_sig/index.html @@ -0,0 +1,2 @@ + +Vec_sig (sidekick.Sidekick_util.Vec_sig)

Module Sidekick_util.Vec_sig

module type S = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html b/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html new file mode 100644 index 00000000..505cd1a6 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util.Vec_sig.S)

Module type Vec_sig.S

type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/index.html b/dev/sidekick/Sidekick_util/index.html index db6a7ef3..c9aa1207 100644 --- a/dev/sidekick/Sidekick_util/index.html +++ b/dev/sidekick/Sidekick_util/index.html @@ -1,2 +1,2 @@ -Sidekick_util (sidekick.Sidekick_util)

Module Sidekick_util

module Fmt = CCFormat
module Util : sig ... end
module Vec : sig ... end

Vectors

module Log : sig ... end

Logging function, for debugging

module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Error : sig ... end
module IArray : sig ... end
module Bag : sig ... end
module Stat : sig ... end
module Hash : sig ... end
module Profile : sig ... end
module Intf = Sidekick_sigs
\ No newline at end of file +Sidekick_util (sidekick.Sidekick_util)

Module Sidekick_util

module Fmt = CCFormat
module Util : sig ... end
module Vec : sig ... end

Vectors

module VecI32 : sig ... end

Vectors of int32 integers

module Vec_float : sig ... end

Vectors of floats

module Vec_sig : sig ... end
module Bitvec : sig ... end

Bitvector

module IArray : sig ... end
module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Log : sig ... end

Logging function, for debugging

module Error : sig ... end
module Bag : sig ... end
module Stat : sig ... end
module Hash : sig ... end
module Profile : sig ... end
module Intf = Sidekick_sigs
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Bitvec/index.html b/dev/sidekick/Sidekick_util__/Bitvec/index.html new file mode 100644 index 00000000..9d05a4ae --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Bitvec/index.html @@ -0,0 +1,2 @@ + +Bitvec (sidekick.Sidekick_util__.Bitvec)

Module Sidekick_util__.Bitvec

type t
val create : unit -> t
val ensure_size : t -> int -> unit

ensure_size bv i ensures that i is a valid index in bv

val get : t -> int -> bool
val set : t -> int -> bool -> unit
val clear_all : t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Util/index.html b/dev/sidekick/Sidekick_util__/Util/index.html index 373ab69e..5bd8ab2e 100644 --- a/dev/sidekick/Sidekick_util__/Util/index.html +++ b/dev/sidekick/Sidekick_util__/Util/index.html @@ -1,2 +1,2 @@ -Util (sidekick.Sidekick_util__.Util)

Module Sidekick_util__.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file +Util (sidekick.Sidekick_util__.Util)

Module Sidekick_util__.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val array_of_list_map : ('a -> 'b) -> 'a list -> 'b array

array_of_list_map f l is the same as Array.of_list @@ List.map f l

val array_to_list_map : ('a -> 'b) -> 'a array -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Vec/index.html b/dev/sidekick/Sidekick_util__/Vec/index.html index 45055aa5..2fd1a995 100644 --- a/dev/sidekick/Sidekick_util__/Vec/index.html +++ b/dev/sidekick/Sidekick_util__/Vec/index.html @@ -1,2 +1,2 @@ -Vec (sidekick.Sidekick_util__.Vec)

Module Sidekick_util__.Vec

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file +Vec (sidekick.Sidekick_util__.Vec)

Module Sidekick_util__.Vec

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val ensure_size : 'a t -> 'a -> int -> unit

ensure size is at least n

val ensure_size_with : 'a t -> (unit -> 'a) -> int -> unit

ensure size is at least n

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop_exn : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val pop : 'a t -> 'a option
val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val prepend : 'a t -> into:'a t -> unit

prepend v ~into pushes all elements of v into into, at the beginning. consumes v.

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/VecI32/index.html b/dev/sidekick/Sidekick_util__/VecI32/index.html new file mode 100644 index 00000000..7eaa908d --- /dev/null +++ b/dev/sidekick/Sidekick_util__/VecI32/index.html @@ -0,0 +1,2 @@ + +VecI32 (sidekick.Sidekick_util__.VecI32)

Module Sidekick_util__.VecI32

include Sidekick_util.Vec_sig.S with type elt := int
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
val push_i32 : t -> int32 -> unit
val get_i32 : t -> int -> int32
val set_i32 : t -> int -> int32 -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Vec_float/index.html b/dev/sidekick/Sidekick_util__/Vec_float/index.html new file mode 100644 index 00000000..01ce5901 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Vec_float/index.html @@ -0,0 +1,2 @@ + +Vec_float (sidekick.Sidekick_util__.Vec_float)

Module Sidekick_util__.Vec_float

include Sidekick_util.Vec_sig.S with type elt := float
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Vec_sig/index.html b/dev/sidekick/Sidekick_util__/Vec_sig/index.html new file mode 100644 index 00000000..bba865be --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Vec_sig/index.html @@ -0,0 +1,2 @@ + +Vec_sig (sidekick.Sidekick_util__.Vec_sig)

Module Sidekick_util__.Vec_sig

module type S = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Vec_sig/module-type-S/index.html b/dev/sidekick/Sidekick_util__/Vec_sig/module-type-S/index.html new file mode 100644 index 00000000..8b6cadf2 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Vec_sig/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util__.Vec_sig.S)

Module type Vec_sig.S

type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/index.html b/dev/sidekick/Sidekick_util__/index.html index a4af7cc5..4d9e5e2a 100644 --- a/dev/sidekick/Sidekick_util__/index.html +++ b/dev/sidekick/Sidekick_util__/index.html @@ -1,2 +1,2 @@ -Sidekick_util__ (sidekick.Sidekick_util__)

Module Sidekick_util__

module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Bag : sig ... end
module Error : sig ... end
module Hash : sig ... end
module IArray : sig ... end
module Log : sig ... end
module Profile : sig ... end
module Stat : sig ... end
module Util : sig ... end
module Vec : sig ... end
\ No newline at end of file +Sidekick_util__ (sidekick.Sidekick_util__)

Module Sidekick_util__

module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Bag : sig ... end
module Bitvec : sig ... end
module Error : sig ... end
module Hash : sig ... end
module IArray : sig ... end
module Log : sig ... end
module Profile : sig ... end
module Stat : sig ... end
module Util : sig ... end
module Vec : sig ... end
module VecI32 : sig ... end
module Vec_float : sig ... end
module Vec_sig : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Bitvec/.dune-keep b/dev/sidekick/Sidekick_util__Bitvec/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Bitvec/index.html b/dev/sidekick/Sidekick_util__Bitvec/index.html new file mode 100644 index 00000000..1ab66d3c --- /dev/null +++ b/dev/sidekick/Sidekick_util__Bitvec/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Bitvec (sidekick.Sidekick_util__Bitvec)

Module Sidekick_util__Bitvec

Bitvector

type t
val create : unit -> t
val ensure_size : t -> int -> unit

ensure_size bv i ensures that i is a valid index in bv

val get : t -> int -> bool
val set : t -> int -> bool -> unit
val clear_all : t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Util/index.html b/dev/sidekick/Sidekick_util__Util/index.html index bac1345f..72026391 100644 --- a/dev/sidekick/Sidekick_util__Util/index.html +++ b/dev/sidekick/Sidekick_util__Util/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Util (sidekick.Sidekick_util__Util)

Module Sidekick_util__Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file +Sidekick_util__Util (sidekick.Sidekick_util__Util)

Module Sidekick_util__Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?⁠sep:string -> 'a printer -> 'a list printer
val pp_iter : ?⁠sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?⁠sep:string -> 'a printer -> 'a array printer
val pp_pair : ?⁠sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?⁠sep:string -> 'a CCFormat.printer -> 'a Sidekick_util.IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b Sidekick_util.IArray.t) -> 'a list -> 'b list
val array_of_list_map : ('a -> 'b) -> 'a list -> 'b array

array_of_list_map f l is the same as Array.of_list @@ List.map f l

val array_to_list_map : ('a -> 'b) -> 'a array -> 'b list
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type Int_set.elt = int
module Int_map : CCMap.S with type Int_map.key = int
module Int_tbl : CCHashtbl.S with type Int_tbl.key = int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec/index.html b/dev/sidekick/Sidekick_util__Vec/index.html index 8f79c804..b91a3f24 100644 --- a/dev/sidekick/Sidekick_util__Vec/index.html +++ b/dev/sidekick/Sidekick_util__Vec/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Vec (sidekick.Sidekick_util__Vec)

Module Sidekick_util__Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file +Sidekick_util__Vec (sidekick.Sidekick_util__Vec)

Module Sidekick_util__Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val ensure_size : 'a t -> 'a -> int -> unit

ensure size is at least n

val ensure_size_with : 'a t -> (unit -> 'a) -> int -> unit

ensure size is at least n

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop_exn : 'a t -> 'a

Pop last element and return it.

raises Invalid_argument

if the vector is empty

val pop : 'a t -> 'a option
val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

raises Invalid_argument

if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

raises Invalid_argument

if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val prepend : 'a t -> into:'a t -> unit

prepend v ~into pushes all elements of v into into, at the beginning. consumes v.

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?⁠sep:string -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__VecI32/.dune-keep b/dev/sidekick/Sidekick_util__VecI32/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__VecI32/index.html b/dev/sidekick/Sidekick_util__VecI32/index.html new file mode 100644 index 00000000..a296365b --- /dev/null +++ b/dev/sidekick/Sidekick_util__VecI32/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__VecI32 (sidekick.Sidekick_util__VecI32)

Module Sidekick_util__VecI32

Vectors of int32 integers

These vectors are more optimized than Vec.

include Sidekick_util.Vec_sig.S with type elt := int
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
val push_i32 : t -> int32 -> unit
val get_i32 : t -> int -> int32
val set_i32 : t -> int -> int32 -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_float/.dune-keep b/dev/sidekick/Sidekick_util__Vec_float/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Vec_float/index.html b/dev/sidekick/Sidekick_util__Vec_float/index.html new file mode 100644 index 00000000..e9e93f60 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Vec_float/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Vec_float (sidekick.Sidekick_util__Vec_float)

Module Sidekick_util__Vec_float

Vectors of floats

These vectors are more optimized than Vec.

include Sidekick_util.Vec_sig.S with type elt := float
type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
val ensure_size : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_sig/.dune-keep b/dev/sidekick/Sidekick_util__Vec_sig/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Vec_sig/index.html b/dev/sidekick/Sidekick_util__Vec_sig/index.html new file mode 100644 index 00000000..36b9d51e --- /dev/null +++ b/dev/sidekick/Sidekick_util__Vec_sig/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Vec_sig (sidekick.Sidekick_util__Vec_sig)

Module Sidekick_util__Vec_sig

module type S = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_sig/module-type-S/index.html b/dev/sidekick/Sidekick_util__Vec_sig/module-type-S/index.html new file mode 100644 index 00000000..17a8feea --- /dev/null +++ b/dev/sidekick/Sidekick_util__Vec_sig/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_util__Vec_sig.S)

Module type Sidekick_util__Vec_sig.S

type elt
type t
val create : ?⁠cap:int -> unit -> t
val size : t -> int
val clear : t -> unit
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val pop : t -> elt
val get : t -> int -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val to_iter : t -> elt Iter.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/index.html b/dev/sidekick/index.html index 2a86b7c0..9535a3e1 100644 --- a/dev/sidekick/index.html +++ b/dev/sidekick/index.html @@ -1,2 +1,2 @@ -index (sidekick.index)

sidekick index

Library sidekick.arith

The entry point of this library is the module: Sidekick_arith.

Library sidekick.arith-lra

The entry point of this library is the module: Sidekick_arith_lra.

Library sidekick.backend

The entry point of this library is the module: Sidekick_backend.

Library sidekick.cc

The entry point of this library is the module: Sidekick_cc.

Library sidekick.core

The entry point of this library is the module: Sidekick_core.

Library sidekick.memtrace

The entry point of this library is the module: Sidekick_memtrace.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.msat-solver

The entry point of this library is the module: Sidekick_msat_solver.

Library sidekick.sat

The entry point of this library is the module: Sidekick_sat.

Library sidekick.sigs

The entry point of this library is the module: Sidekick_sigs.

Library sidekick.tef

The entry point of this library is the module: Sidekick_tef.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.th-cstor

The entry point of this library is the module: Sidekick_th_cstor.

Library sidekick.th-data

The entry point of this library is the module: Sidekick_th_data.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

Library sidekick.zarith

The entry point of this library is the module: Sidekick_zarith.

\ No newline at end of file +index (sidekick.index)

sidekick index

Library sidekick.arith

The entry point of this library is the module: Sidekick_arith.

Library sidekick.arith-lra

The entry point of this library is the module: Sidekick_arith_lra.

Library sidekick.cc

The entry point of this library is the module: Sidekick_cc.

Library sidekick.core

The entry point of this library is the module: Sidekick_core.

Library sidekick.drup

The entry point of this library is the module: Sidekick_drup.

Library sidekick.lit

The entry point of this library is the module: Sidekick_lit.

Library sidekick.memtrace

The entry point of this library is the module: Sidekick_memtrace.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.sat

The entry point of this library is the module: Sidekick_sat.

Library sidekick.sigs

The entry point of this library is the module: Sidekick_sigs.

Library sidekick.smt-solver

The entry point of this library is the module: Sidekick_smt_solver.

Library sidekick.tef

The entry point of this library is the module: Sidekick_tef.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.th-cstor

The entry point of this library is the module: Sidekick_th_cstor.

Library sidekick.th-data

The entry point of this library is the module: Sidekick_th_data.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

Library sidekick.zarith

The entry point of this library is the module: Sidekick_zarith.

\ No newline at end of file