From 674a619ca729fe5a04a4c5fe954a1a8397f44a06 Mon Sep 17 00:00:00 2001 From: c-cube Date: Tue, 20 Jul 2021 04:52:29 +0000 Subject: [PATCH] deploy: eb236441957fdddc14037744006de1f2f3b43ee0 --- dev/odoc.css | 2 +- dev/sidekick-base/Sidekick_base/Arg/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base/Arg/Term/index.html | 2 +- dev/sidekick-base/Sidekick_base/Arg/Ty/index.html | 2 +- dev/sidekick-base/Sidekick_base/Arg/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Cstor/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Data/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Select/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Statement/index.html | 2 +- .../Sidekick_base/Base_types/Term/Iter_dag/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Term/LRA/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Term/index.html | 2 +- .../Base_types/Term_cell/Make_eq/argument-1-X/index.html | 2 +- .../Sidekick_base/Base_types/Term_cell/Make_eq/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Term_cell/index.html | 2 +- .../Base_types/Term_cell/module-type-ARG/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Ty/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Ty/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/Value/index.html | 2 +- dev/sidekick-base/Sidekick_base/Base_types/index.html | 2 +- dev/sidekick-base/Sidekick_base/Form/Funs/index.html | 2 +- dev/sidekick-base/Sidekick_base/Form/Gensym/index.html | 2 +- dev/sidekick-base/Sidekick_base/Form/index.html | 2 +- dev/sidekick-base/Sidekick_base/ID/index.html | 2 +- .../Sidekick_base/Model/Fun_interpretation/index.html | 2 +- dev/sidekick-base/Sidekick_base/Model/Val_map/index.html | 2 +- dev/sidekick-base/Sidekick_base/Model/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/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Cstor/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Data/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Select/index.html | 2 +- .../Sidekick_base__/Base_types/Statement/index.html | 2 +- .../Sidekick_base__/Base_types/Term/Iter_dag/index.html | 2 +- .../Sidekick_base__/Base_types/Term/LRA/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Term/index.html | 2 +- .../Base_types/Term_cell/Make_eq/argument-1-X/index.html | 2 +- .../Sidekick_base__/Base_types/Term_cell/Make_eq/index.html | 2 +- .../Sidekick_base__/Base_types/Term_cell/index.html | 2 +- .../Base_types/Term_cell/module-type-ARG/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Ty/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Ty/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/Value/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Base_types/index.html | 2 +- dev/sidekick-base/Sidekick_base__/CCHet/Key/index.html | 2 +- dev/sidekick-base/Sidekick_base__/CCHet/Map/index.html | 2 +- dev/sidekick-base/Sidekick_base__/CCHet/Tbl/index.html | 2 +- dev/sidekick-base/Sidekick_base__/CCHet/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Config/Key/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Config/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Form/Funs/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Form/Gensym/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Form/index.html | 2 +- .../Sidekick_base__/Hashcons/Make/argument-1-A/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Hashcons/Make/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Hashcons/index.html | 2 +- .../Sidekick_base__/Hashcons/module-type-ARG/index.html | 2 +- dev/sidekick-base/Sidekick_base__/ID/index.html | 2 +- .../Sidekick_base__/Model/Fun_interpretation/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Model/Val_map/index.html | 2 +- dev/sidekick-base/Sidekick_base__/Model/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__/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Cstor/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Data/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Select/index.html | 2 +- .../Sidekick_base__Base_types/Statement/index.html | 2 +- .../Sidekick_base__Base_types/Term/Iter_dag/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Term/LRA/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Term/index.html | 2 +- .../Term_cell/Make_eq/argument-1-X/index.html | 2 +- .../Sidekick_base__Base_types/Term_cell/Make_eq/index.html | 2 +- .../Sidekick_base__Base_types/Term_cell/index.html | 2 +- .../Term_cell/module-type-ARG/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Ty/Fun/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Ty/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/Value/index.html | 2 +- dev/sidekick-base/Sidekick_base__Base_types/index.html | 2 +- dev/sidekick-base/Sidekick_base__CCHet/Key/index.html | 2 +- dev/sidekick-base/Sidekick_base__CCHet/Map/index.html | 2 +- dev/sidekick-base/Sidekick_base__CCHet/Tbl/index.html | 2 +- dev/sidekick-base/Sidekick_base__CCHet/index.html | 2 +- dev/sidekick-base/Sidekick_base__Config/Key/index.html | 2 +- dev/sidekick-base/Sidekick_base__Config/index.html | 2 +- dev/sidekick-base/Sidekick_base__Form/Funs/index.html | 2 +- dev/sidekick-base/Sidekick_base__Form/Gensym/index.html | 2 +- dev/sidekick-base/Sidekick_base__Form/index.html | 2 +- .../Sidekick_base__Hashcons/Make/argument-1-A/index.html | 2 +- dev/sidekick-base/Sidekick_base__Hashcons/Make/index.html | 2 +- dev/sidekick-base/Sidekick_base__Hashcons/index.html | 2 +- .../Sidekick_base__Hashcons/module-type-ARG/index.html | 2 +- dev/sidekick-base/Sidekick_base__ID/index.html | 2 +- .../Sidekick_base__Model/Fun_interpretation/index.html | 2 +- dev/sidekick-base/Sidekick_base__Model/Val_map/index.html | 2 +- dev/sidekick-base/Sidekick_base__Model/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_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 +- dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/Lit/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/P/index.html | 2 +- .../Sidekick_base_solver/Solver/Pre_proof/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/Lit/T/Fun/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/Lit/T/Term/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/Lit/T/Ty/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/Lit/T/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/T/Fun/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/T/Term/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/T/Ty/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/T/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Solver/Solver_internal/CC/Debug_/index.html | 2 +- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/T/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html | 2 +- .../Solver/Solver_internal/CC/P/Quip/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/CC/P/index.html | 2 +- .../Solver/Solver_internal/CC/T/Fun/index.html | 2 +- .../Solver/Solver_internal/CC/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/CC/T/Term/index.html | 2 +- .../Solver/Solver_internal/CC/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/CC/T/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/CC/index.html | 2 +- .../Solver/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Solver/Solver_internal/Lit/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/Lit/T/Term/index.html | 2 +- .../Solver/Solver_internal/Lit/T/Ty/index.html | 2 +- .../Solver/Solver_internal/Lit/T/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/Lit/index.html | 2 +- .../Solver/Solver_internal/P/Quip/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/P/index.html | 2 +- .../Solver/Solver_internal/Simplify/index.html | 2 +- .../Solver/Solver_internal/T/Fun/index.html | 2 +- .../Solver/Solver_internal/T/Term/Tbl/index.html | 2 +- .../Solver/Solver_internal/T/Term/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/T/index.html | 2 +- .../Sidekick_base_solver/Solver/Solver_internal/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Solver/T/Term/Tbl/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/T/Term/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/T/Ty/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver/T/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/module-type-THEORY/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Solver_arg/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/Gensym/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Atom/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Lit/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Lit/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Lit/T/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 +- dev/sidekick-base/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/T/Fun/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../Th_bool/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/T/Fun/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/T/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/Lit/T/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/T/Fun/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/T/Term/Tbl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/T/Term/Tbl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/Lit/T/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/T/Fun/index.html | 2 +- .../Th_bool/A/S/Solver_internal/T/Term/Tbl/index.html | 2 +- .../Th_bool/A/S/Solver_internal/T/Term/index.html | 2 +- .../Th_bool/A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/T/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Solver_internal/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html | 2 +- .../Sidekick_base_solver/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 +- dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/S/Unknown/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/index.html | 2 +- .../Th_bool/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_bool/A/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_bool/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/Cstor/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Atom/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Lit/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Lit/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Lit/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Lit/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Lit/T/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 +- dev/sidekick-base/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/T/Fun/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/Lit/T/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../Th_data/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/T/Fun/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/T/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/Lit/T/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/T/Fun/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/T/Term/Tbl/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/T/Term/Tbl/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/Lit/T/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/T/Fun/index.html | 2 +- .../Th_data/A/S/Solver_internal/T/Term/Tbl/index.html | 2 +- .../Th_data/A/S/Solver_internal/T/Term/index.html | 2 +- .../Th_data/A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/T/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Solver_internal/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/T/Fun/index.html | 2 +- .../Sidekick_base_solver/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 +- dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/S/Unknown/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/index.html | 2 +- .../Th_data/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_data/A/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_data/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/Gensym/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Q/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Atom/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Lit/T/Fun/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/Tbl/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Lit/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Lit/T/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 +- dev/sidekick-base/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/T/Fun/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/Lit/index.html | 2 +- .../Th_lra/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/T/Fun/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/Lit/T/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/T/Fun/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/T/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/T/Fun/index.html | 2 +- .../Th_lra/A/S/Solver_internal/T/Term/Tbl/index.html | 2 +- .../Th_lra/A/S/Solver_internal/T/Term/index.html | 2 +- .../Th_lra/A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/T/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Solver_internal/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 +- dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/index.html | 2 +- .../Sidekick_base_solver/Th_lra/A/S/Unknown/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/index.html | 2 +- .../Th_lra/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_lra/A/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/Th_lra/index.html | 2 +- dev/sidekick-base/Sidekick_base_solver/index.html | 2 +- dev/sidekick-base/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/Model/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/P/Quip/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/Pre_proof/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/N/index.html | 2 +- .../Process/Solver/Solver_internal/CC/index.html | 2 +- .../Process/Solver/Solver_internal/Simplify/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/Solver_internal/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/T/Fun/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/T/Term/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/Unknown/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html | 2 +- .../Process/Solver/module-type-THEORY/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/Process/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Atom/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Model/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/P/Quip/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Pre_proof/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/N/index.html | 2 +- .../Process/Solver/Solver_internal/CC/index.html | 2 +- .../Process/Solver/Solver_internal/Simplify/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Solver_internal/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/T/Fun/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/T/Term/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/T/Ty/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html | 2 +- .../Sidekick_smtlib__/Process/Solver/Unknown/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/index.html | 2 +- .../Process/Solver/module-type-THEORY/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Process/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Atom/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Lit/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Model/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/P/Quip/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Pre_proof/index.html | 2 +- .../Solver/Solver_internal/CC/Actions/index.html | 2 +- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver/Solver_internal/CC/N/index.html | 2 +- .../Solver/Solver_internal/CC/index.html | 2 +- .../Solver/Solver_internal/Simplify/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Solver_internal/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/T/Fun/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/T/Term/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/T/Ty/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/index.html | 2 +- .../Sidekick_smtlib__Process/Solver/Unknown/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/Solver/index.html | 2 +- .../Solver/module-type-THEORY/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Process/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html | 2 +- dev/sidekick-bin/index.html | 2 +- dev/sidekick/Sidekick_arith/index.html | 2 +- dev/sidekick/Sidekick_arith/module-type-INT/index.html | 2 +- dev/sidekick/Sidekick_arith/module-type-NUM/index.html | 2 +- dev/sidekick/Sidekick_arith/module-type-RATIONAL/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/Comb/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/Constr/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/Expr/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html | 2 +- .../Linear_expr/Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html | 2 +- .../Linear_expr/module-type-S/Comb/Infix/index.html | 2 +- .../Linear_expr/module-type-S/Comb/index.html | 2 +- .../Linear_expr/module-type-S/Constr/index.html | 2 +- .../Linear_expr/module-type-S/Expr/Infix/index.html | 2 +- .../Linear_expr/module-type-S/Expr/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/module-type-S/index.html | 2 +- .../Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Q/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/Atom/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/P/Quip/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/P/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/Pre_proof/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/N/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/T/index.html | 2 +- .../Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/index.html | 2 +- .../Make/argument-1-A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Predicate/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/Make/Constraint/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/Simplex2/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-RATIONAL/index.html | 2 +- .../Simplex2/module-type-S/Constraint/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html | 2 +- .../Simplex2/module-type-S/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-S/V/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-S/index.html | 2 +- .../Sidekick_arith_lra/Simplex2/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/Gensym/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-ARG/Q/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 +- .../Sidekick_arith_lra/module-type-ARG/S/Model/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html | 2 +- .../module-type-ARG/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/N/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 +- .../Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/index.html | 2 +- .../Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/index.html | 2 +- .../module-type-ARG/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-RATIONAL/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/Gensym/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/A/Q/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 +- .../Sidekick_arith_lra/module-type-S/A/S/Model/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/Pre_proof/index.html | 2 +- .../module-type-S/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/N/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 +- .../Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/index.html | 2 +- .../Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/index.html | 2 +- .../module-type-S/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_arith_lra/module-type-S/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html | 2 +- .../Linear_expr/Make/argument-1-C/index.html | 2 +- .../Linear_expr/Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Linear_expr/index.html | 2 +- .../Linear_expr/module-type-COEFF/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html | 2 +- .../Linear_expr/module-type-S/Comb/Infix/index.html | 2 +- .../Linear_expr/module-type-S/Comb/index.html | 2 +- .../Linear_expr/module-type-S/Constr/index.html | 2 +- .../Linear_expr/module-type-S/Expr/Infix/index.html | 2 +- .../Linear_expr/module-type-S/Expr/index.html | 2 +- .../Linear_expr/module-type-S/Var/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/module-type-S/index.html | 2 +- .../Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/index.html | 2 +- .../Linear_expr_intf/module-type-COEFF/index.html | 2 +- .../Linear_expr_intf/module-type-S/C/index.html | 2 +- .../Linear_expr_intf/module-type-S/Comb/Infix/index.html | 2 +- .../Linear_expr_intf/module-type-S/Comb/index.html | 2 +- .../Linear_expr_intf/module-type-S/Constr/index.html | 2 +- .../Linear_expr_intf/module-type-S/Expr/Infix/index.html | 2 +- .../Linear_expr_intf/module-type-S/Expr/index.html | 2 +- .../Linear_expr_intf/module-type-S/Var/index.html | 2 +- .../Linear_expr_intf/module-type-S/index.html | 2 +- .../Linear_expr_intf/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Predicate/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/Make/Subst/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/Make/argument-1-Q/index.html | 2 +- .../Simplex2/Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Simplex2/Op/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Simplex2/index.html | 2 +- .../Simplex2/module-type-RATIONAL/index.html | 2 +- .../Simplex2/module-type-S/Constraint/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/module-type-S/Q/index.html | 2 +- .../Simplex2/module-type-S/Subst/index.html | 2 +- .../Simplex2/module-type-S/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/module-type-S/index.html | 2 +- .../Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/Simplex_intf/index.html | 2 +- .../Simplex_intf/module-type-RATIONAL/index.html | 2 +- .../Simplex_intf/module-type-S/Q/index.html | 2 +- .../Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/C/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Comb/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Constr/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Expr/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/Var/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/L/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/Q/index.html | 2 +- .../Simplex_intf/module-type-S_FULL/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/Make/Comb/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/Make/Constr/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/Make/Expr/index.html | 2 +- .../Make/argument-1-C/index.html | 2 +- .../Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html | 2 +- .../module-type-COEFF/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html | 2 +- .../module-type-S/Comb/Infix/index.html | 2 +- .../module-type-S/Comb/index.html | 2 +- .../module-type-S/Constr/index.html | 2 +- .../module-type-S/Expr/Infix/index.html | 2 +- .../module-type-S/Expr/index.html | 2 +- .../module-type-S/Var/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/module-type-S/index.html | 2 +- .../Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html | 2 +- .../module-type-COEFF/index.html | 2 +- .../module-type-S/C/index.html | 2 +- .../module-type-S/Comb/Infix/index.html | 2 +- .../module-type-S/Comb/index.html | 2 +- .../module-type-S/Constr/index.html | 2 +- .../module-type-S/Expr/Infix/index.html | 2 +- .../module-type-S/Expr/index.html | 2 +- .../module-type-S/Var/index.html | 2 +- .../module-type-S/index.html | 2 +- .../module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Predicate/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/Make/Constraint/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Subst/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/Make/argument-1-Q/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/Make/argument-2-Var/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Simplex2/Make/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Simplex2/Op/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Simplex2/index.html | 2 +- .../module-type-RATIONAL/index.html | 2 +- .../module-type-S/Constraint/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/module-type-S/Q/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html | 2 +- .../module-type-S/Unsat_cert/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/module-type-S/V/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/module-type-S/index.html | 2 +- .../Sidekick_arith_lra__Simplex2/module-type-VAR/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html | 2 +- .../module-type-RATIONAL/index.html | 2 +- .../Sidekick_arith_lra__Simplex_intf/module-type-S/Q/index.html | 2 +- .../Sidekick_arith_lra__Simplex_intf/module-type-S/index.html | 2 +- .../module-type-S_FULL/L/C/index.html | 2 +- .../module-type-S_FULL/L/Comb/Infix/index.html | 2 +- .../module-type-S_FULL/L/Comb/index.html | 2 +- .../module-type-S_FULL/L/Constr/index.html | 2 +- .../module-type-S_FULL/L/Expr/Infix/index.html | 2 +- .../module-type-S_FULL/L/Expr/index.html | 2 +- .../module-type-S_FULL/L/Var/index.html | 2 +- .../module-type-S_FULL/L/index.html | 2 +- .../module-type-S_FULL/Q/index.html | 2 +- .../module-type-S_FULL/index.html | 2 +- dev/sidekick/Sidekick_backend/.dune-keep | 0 dev/sidekick/Sidekick_backend/Backend_intf/index.html | 2 ++ .../Sidekick_backend/Backend_intf/module-type-S/index.html | 2 ++ .../Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html | 2 ++ .../Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html | 2 ++ .../Dot/Default/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend/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 ++ .../Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html | 2 ++ .../Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html | 2 ++ .../Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html | 2 ++ dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html | 2 ++ dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html | 2 ++ dev/sidekick/Sidekick_backend/Dot/Make/index.html | 2 ++ .../Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html | 2 ++ .../Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html | 2 ++ .../Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend/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 ++ dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html | 2 ++ dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_backend/index.html | 2 ++ dev/sidekick/Sidekick_backend__Backend_intf/.dune-keep | 0 dev/sidekick/Sidekick_backend__Backend_intf/index.html | 2 ++ .../Sidekick_backend__Backend_intf/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_backend__Dot/.dune-keep | 0 .../Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html | 2 ++ .../Default/argument-1-S/Clause/index.html | 2 ++ .../Default/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend__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 ++ .../Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html | 2 ++ .../Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html | 2 ++ .../Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html | 2 ++ dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html | 2 ++ dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html | 2 ++ dev/sidekick/Sidekick_backend__Dot/Make/index.html | 2 ++ .../Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html | 2 ++ .../Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html | 2 ++ .../Simple/argument-1-S/Formula/index.html | 2 ++ .../Sidekick_backend__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 ++ dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html | 2 ++ dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_cc/Make/Expl/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/N/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html | 2 +- dev/sidekick/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/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/argument-1-A/T/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 +- 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/N/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/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/T/index.html | 2 +- dev/sidekick/Sidekick_cc/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_core/CC_view/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/N/index.html | 2 +- .../Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html | 2 +- .../Sidekick_core/Monoid_of_repr/argument-1-M/SI/Lit/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/P/Quip/index.html | 2 +- .../Sidekick_core/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/T/Fun/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/T/Term/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/T/Ty/index.html | 2 +- .../Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html | 2 +- .../Sidekick_core/Monoid_of_repr/argument-1-M/SI/index.html | 2 +- .../Sidekick_core/Monoid_of_repr/argument-1-M/index.html | 2 +- dev/sidekick/Sidekick_core/Monoid_of_repr/index.html | 2 +- dev/sidekick/Sidekick_core/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/Lit/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html | 2 +- .../Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html | 2 +- .../Sidekick_core/module-type-CC_ARG/Actions/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/Lit/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/P/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/Actions/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/Expl/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/Lit/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html | 2 +- dev/sidekick/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/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-CC_S/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/T/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-LIT/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/Actions/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/CC/Expl/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/Lit/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/P/Quip/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/P/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/Simplify/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html | 2 +- .../Sidekick_core/module-type-MONOID_ARG/SI/T/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-PROOF/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/P/index.html | 2 +- .../Sidekick_core/module-type-SOLVER/Pre_proof/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/Actions/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/Expl/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/N/index.html | 2 +- .../module-type-SOLVER/Solver_internal/CC/index.html | 2 +- .../module-type-SOLVER/Solver_internal/Simplify/index.html | 2 +- .../Sidekick_core/module-type-SOLVER/Solver_internal/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html | 2 +- .../Sidekick_core/module-type-SOLVER/Unknown/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-SOLVER/index.html | 2 +- .../module-type-SOLVER/module-type-THEORY/index.html | 2 +- .../module-type-SOLVER_INTERNAL/CC/Actions/index.html | 2 +- .../module-type-SOLVER_INTERNAL/CC/Expl/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/Lit/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/P/Quip/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/P/index.html | 2 +- .../module-type-SOLVER_INTERNAL/Simplify/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html | 2 +- .../Sidekick_core/module-type-SOLVER_INTERNAL/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html | 2 +- dev/sidekick/Sidekick_core/module-type-TERM/index.html | 2 +- dev/sidekick/Sidekick_memtrace/.dune-keep | 0 dev/sidekick/Sidekick_memtrace/index.html | 2 ++ .../Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html | 2 +- .../Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/Make/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/module-type-S/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 +- dev/sidekick/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 +- .../Sidekick_msat_solver/Make/Solver_internal/CC/N/index.html | 2 +- .../Sidekick_msat_solver/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 +- .../Sidekick_msat_solver/Make/argument-1-A/P/Quip/index.html | 2 +- .../Sidekick_msat_solver/Make/argument-1-A/P/index.html | 2 +- .../Sidekick_msat_solver/Make/argument-1-A/T/Fun/index.html | 2 +- .../Sidekick_msat_solver/Make/argument-1-A/T/Term/index.html | 2 +- .../Sidekick_msat_solver/Make/argument-1-A/T/Ty/index.html | 2 +- .../Sidekick_msat_solver/Make/argument-1-A/T/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/Make/index.html | 2 +- .../Sidekick_msat_solver/Make/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/index.html | 2 +- .../Sidekick_msat_solver/module-type-ARG/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html | 2 +- .../Sidekick_msat_solver/module-type-ARG/T/Fun/index.html | 2 +- .../Sidekick_msat_solver/module-type-ARG/T/Term/index.html | 2 +- .../Sidekick_msat_solver/module-type-ARG/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html | 2 +- dev/sidekick/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 +- dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html | 2 +- .../Sidekick_msat_solver/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 | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html | 2 +- .../Sidekick_msat_solver/module-type-S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_msat_solver/module-type-S/index.html | 2 +- .../module-type-S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_sat/.dune-keep | 0 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/Formula/index.html | 2 ++ .../Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html | 2 ++ .../Sidekick_sat/Solver/Make_pure_sat/Clause/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html | 2 ++ .../Solver/Make_pure_sat/argument-1-Th/Formula/index.html | 2 ++ .../Sidekick_sat/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 ++ dev/sidekick/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 ++ dev/sidekick/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 ++ .../Sidekick_sat/Solver_intf/module-type-FORMULA/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_CDCL_T/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_SAT/Formula/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-PROOF/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-S/Atom/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-S/Clause/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-S/Formula/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-S/Proof/index.html | 2 ++ dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html | 2 ++ .../Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html | 2 ++ .../Sidekick_sat/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 ++ .../Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html | 2 ++ dev/sidekick/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 ++ dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html | 2 ++ dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html | 2 ++ dev/sidekick/Sidekick_sat/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html | 2 ++ dev/sidekick/Sidekick_sat__/.dune-keep | 0 dev/sidekick/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 ++ dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html | 2 ++ dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat__/Heap_intf/index.html | 2 ++ .../Sidekick_sat__/Heap_intf/module-type-RANKED/index.html | 2 ++ dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html | 2 ++ .../Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html | 2 ++ dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html | 2 ++ .../Solver/Make_cdcl_t/argument-1-Th/Formula/index.html | 2 ++ .../Sidekick_sat__/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/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/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 ++ .../Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html | 2 ++ .../Solver_intf/module-type-PLUGIN_CDCL_T/Formula/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/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-PROOF/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html | 2 ++ .../Sidekick_sat__/Solver_intf/module-type-S/index.html | 2 ++ .../Sidekick_sat__/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__Heap/.dune-keep | 0 dev/sidekick/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 ++ dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html | 2 ++ dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat__Heap_intf/.dune-keep | 0 dev/sidekick/Sidekick_sat__Heap_intf/index.html | 2 ++ .../Sidekick_sat__Heap_intf/module-type-RANKED/index.html | 2 ++ dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver/.dune-keep | 0 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html | 2 ++ .../Make_cdcl_t/argument-1-Th/Formula/index.html | 2 ++ .../Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html | 2 ++ dev/sidekick/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 ++ .../Sidekick_sat__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 ++ dev/sidekick/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/Proof/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver_intf/.dune-keep | 0 dev/sidekick/Sidekick_sat__Solver_intf/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-ACTS/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-FORMULA/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/Formula/index.html | 2 ++ .../module-type-PLUGIN_CDCL_T/index.html | 2 ++ .../module-type-PLUGIN_SAT/Formula/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-PROOF/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-S/Atom/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-S/Clause/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-S/Formula/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-S/Proof/index.html | 2 ++ dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html | 2 ++ .../Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html | 2 ++ .../module-type-UNSAT_STATE/index.html | 2 ++ dev/sidekick/Sidekick_sigs/index.html | 2 +- dev/sidekick/Sidekick_sigs/module-type-EQ/index.html | 2 +- dev/sidekick/Sidekick_sigs/module-type-HASH/index.html | 2 +- dev/sidekick/Sidekick_sigs/module-type-ORD/index.html | 2 +- dev/sidekick/Sidekick_sigs/module-type-PRINT/index.html | 2 +- dev/sidekick/Sidekick_tef/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/Atom/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/Model/index.html | 2 +- .../Make/argument-1-A/S/P/Quip/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/P/index.html | 2 +- .../Make/argument-1-A/S/Pre_proof/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/N/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Make/argument-1-A/S/T/Term/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html | 2 +- .../Make/argument-1-A/S/Unknown/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/S/index.html | 2 +- .../Make/argument-1-A/S/module-type-THEORY/index.html | 2 +- .../Sidekick_th_bool_static/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_th_bool_static/Make/index.html | 2 +- dev/sidekick/Sidekick_th_bool_static/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/Gensym/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/Atom/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/Model/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/P/Quip/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/P/index.html | 2 +- .../module-type-ARG/S/Pre_proof/index.html | 2 +- .../module-type-ARG/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/N/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 +- .../Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/T/index.html | 2 +- .../module-type-ARG/S/Unknown/index.html | 2 +- .../Sidekick_th_bool_static/module-type-ARG/S/index.html | 2 +- .../module-type-ARG/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/Gensym/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/Atom/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/Model/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/P/Quip/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/P/index.html | 2 +- .../module-type-S/A/S/Pre_proof/index.html | 2 +- .../module-type-S/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/N/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 +- .../Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/T/index.html | 2 +- .../module-type-S/A/S/Unknown/index.html | 2 +- .../Sidekick_th_bool_static/module-type-S/A/S/index.html | 2 +- .../module-type-S/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_th_bool_static/module-type-S/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 +- .../Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/Pre_proof/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/N/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html | 2 +- .../Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/index.html | 2 +- .../Make/argument-1-A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/Make/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/Atom/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/Model/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html | 2 +- .../module-type-ARG/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/N/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 +- .../Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html | 2 +- .../Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/index.html | 2 +- .../module-type-ARG/S/module-type-THEORY/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 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/Model/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/Pre_proof/index.html | 2 +- .../module-type-S/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/N/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 +- .../Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html | 2 +- .../Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/index.html | 2 +- .../module-type-S/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/module-type-S/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/Cstor/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 +- .../Sidekick_th_data/Make/argument-1-A/S/Model/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/Pre_proof/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Actions/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/Expl/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/N/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/CC/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/Simplify/index.html | 2 +- .../Make/argument-1-A/S/Solver_internal/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html | 2 +- .../Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/index.html | 2 +- .../Make/argument-1-A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_th_data/Make/index.html | 2 +- dev/sidekick/Sidekick_th_data/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/Atom/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/Lit/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/Model/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html | 2 +- .../module-type-ARG/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/N/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 +- .../Sidekick_th_data/module-type-ARG/S/T/Fun/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/T/Term/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html | 2 +- .../Sidekick_th_data/module-type-ARG/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/S/index.html | 2 +- .../module-type-ARG/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-ARG/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/Atom/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/Lit/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/Model/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/P/Quip/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/Pre_proof/index.html | 2 +- .../module-type-S/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/N/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 +- .../Sidekick_th_data/module-type-S/A/S/T/Fun/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/T/Term/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html | 2 +- .../Sidekick_th_data/module-type-S/A/S/Unknown/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/S/index.html | 2 +- .../module-type-S/A/S/module-type-THEORY/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/A/index.html | 2 +- dev/sidekick/Sidekick_th_data/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_th_data__/Types/index.html | 2 +- dev/sidekick/Sidekick_th_data__/index.html | 2 +- dev/sidekick/Sidekick_th_data__Types/index.html | 2 +- dev/sidekick/Sidekick_util/Backtrack_stack/index.html | 2 +- .../Backtrackable_tbl/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html | 2 +- dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html | 2 +- .../Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html | 2 +- .../Sidekick_util/Backtrackable_tbl/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_util/Bag/index.html | 2 +- dev/sidekick/Sidekick_util/Error/index.html | 2 +- dev/sidekick/Sidekick_util/Hash/index.html | 2 +- dev/sidekick/Sidekick_util/IArray/index.html | 2 +- dev/sidekick/Sidekick_util/Log/index.html | 2 ++ dev/sidekick/Sidekick_util/Profile/Control/index.html | 2 +- dev/sidekick/Sidekick_util/Profile/index.html | 2 +- .../Sidekick_util/Profile/module-type-BACKEND/index.html | 2 +- dev/sidekick/Sidekick_util/Stat/index.html | 2 +- dev/sidekick/Sidekick_util/Util/index.html | 2 +- dev/sidekick/Sidekick_util/Vec/index.html | 2 ++ dev/sidekick/Sidekick_util/index.html | 2 +- dev/sidekick/Sidekick_util__/Backtrack_stack/index.html | 2 +- .../Backtrackable_tbl/Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html | 2 +- dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html | 2 +- .../Backtrackable_tbl/module-type-ARG/index.html | 2 +- .../Sidekick_util__/Backtrackable_tbl/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_util__/Bag/index.html | 2 +- dev/sidekick/Sidekick_util__/Error/index.html | 2 +- dev/sidekick/Sidekick_util__/Hash/index.html | 2 +- dev/sidekick/Sidekick_util__/IArray/index.html | 2 +- dev/sidekick/Sidekick_util__/Log/index.html | 2 ++ dev/sidekick/Sidekick_util__/Profile/Control/index.html | 2 +- dev/sidekick/Sidekick_util__/Profile/index.html | 2 +- .../Sidekick_util__/Profile/module-type-BACKEND/index.html | 2 +- dev/sidekick/Sidekick_util__/Stat/index.html | 2 +- dev/sidekick/Sidekick_util__/Util/index.html | 2 +- dev/sidekick/Sidekick_util__/Vec/index.html | 2 ++ dev/sidekick/Sidekick_util__/index.html | 2 +- dev/sidekick/Sidekick_util__Backtrack_stack/index.html | 2 +- .../Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html | 2 +- dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html | 2 +- .../Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html | 2 +- .../Sidekick_util__Backtrackable_tbl/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_util__Bag/index.html | 2 +- dev/sidekick/Sidekick_util__Error/index.html | 2 +- dev/sidekick/Sidekick_util__Hash/index.html | 2 +- dev/sidekick/Sidekick_util__IArray/index.html | 2 +- dev/sidekick/Sidekick_util__Log/.dune-keep | 0 dev/sidekick/Sidekick_util__Log/index.html | 2 ++ dev/sidekick/Sidekick_util__Profile/Control/index.html | 2 +- dev/sidekick/Sidekick_util__Profile/index.html | 2 +- .../Sidekick_util__Profile/module-type-BACKEND/index.html | 2 +- dev/sidekick/Sidekick_util__Stat/index.html | 2 +- dev/sidekick/Sidekick_util__Util/index.html | 2 +- dev/sidekick/Sidekick_util__Vec/.dune-keep | 0 dev/sidekick/Sidekick_util__Vec/index.html | 2 ++ dev/sidekick/Sidekick_zarith/Int/index.html | 2 +- dev/sidekick/Sidekick_zarith/Rational/index.html | 2 +- dev/sidekick/Sidekick_zarith/index.html | 2 +- dev/sidekick/index.html | 2 +- 1317 files changed, 1491 insertions(+), 1119 deletions(-) create mode 100644 dev/sidekick/Sidekick_backend/.dune-keep create mode 100644 dev/sidekick/Sidekick_backend/Backend_intf/index.html create mode 100644 dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Default/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Make/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/Simple/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html create mode 100644 dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_backend/index.html create mode 100644 dev/sidekick/Sidekick_backend__Backend_intf/.dune-keep create mode 100644 dev/sidekick/Sidekick_backend__Backend_intf/index.html create mode 100644 dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/.dune-keep create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Default/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Make/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/Simple/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html create mode 100644 dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_memtrace/.dune-keep create mode 100644 dev/sidekick/Sidekick_memtrace/index.html create mode 100644 dev/sidekick/Sidekick_sat/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html create 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/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html create 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/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-ACTS/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-PROOF/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat__/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap/Make/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap_intf/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html create 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/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html create 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/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat__/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap/Make/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html create mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/.dune-keep create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html create 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/index.html create 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/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html create 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/Proof/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html create mode 100644 dev/sidekick/Sidekick_util/Log/index.html create mode 100644 dev/sidekick/Sidekick_util/Vec/index.html create mode 100644 dev/sidekick/Sidekick_util__/Log/index.html create mode 100644 dev/sidekick/Sidekick_util__/Vec/index.html create mode 100644 dev/sidekick/Sidekick_util__Log/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__Log/index.html create mode 100644 dev/sidekick/Sidekick_util__Vec/.dune-keep create mode 100644 dev/sidekick/Sidekick_util__Vec/index.html diff --git a/dev/odoc.css b/dev/odoc.css index 9391118f..65c6458f 100644 --- a/dev/odoc.css +++ b/dev/odoc.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 1.5.2 */ + odoc 1.5.3 */ /* Fonts */ @import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); diff --git a/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html b/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html index 722ed96d..9cc95266 100644 --- a/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base/Arg/Fun/index.html @@ -1,2 +1,2 @@ -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 +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 index ff1cc78c..8f635469 100644 --- a/dev/sidekick-base/Sidekick_base/Arg/Term/index.html +++ b/dev/sidekick-base/Sidekick_base/Arg/Term/index.html @@ -1,5 +1,5 @@ -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
+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
diff --git a/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html b/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html
index 85b442cb..230c5749 100644
--- a/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html
+++ b/dev/sidekick-base/Sidekick_base/Arg/Ty/index.html
@@ -1,2 +1,2 @@
 
-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 +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 index 4b8bb616..2e1ea3e5 100644 --- a/dev/sidekick-base/Sidekick_base/Arg/index.html +++ b/dev/sidekick-base/Sidekick_base/Arg/index.html @@ -1,2 +1,2 @@ -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 +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/Base_types/Cstor/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Cstor/index.html index 3a8f38dc..3475e6f8 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Cstor/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick-base.Sidekick_base.Base_types.Cstor)

Module Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Cstor (sidekick-base.Sidekick_base.Base_types.Cstor)

Module Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Data/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Data/index.html index 374b45f6..697049d5 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Data/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Data/index.html @@ -1,2 +1,2 @@ -Data (sidekick-base.Sidekick_base.Base_types.Data)

Module Base_types.Data

Datatypes

type t = data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Data (sidekick-base.Sidekick_base.Base_types.Data)

Module Base_types.Data

Datatypes

type t = data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Fun/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Fun/index.html index 089dd2f3..9d29bd17 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base.Base_types.Fun)

Module Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +Fun (sidekick-base.Sidekick_base.Base_types.Fun)

Module Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Select/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Select/index.html index 613f5db4..f235cdcf 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Select/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Select/index.html @@ -1,2 +1,2 @@ -Select (sidekick-base.Sidekick_base.Base_types.Select)

Module Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file +Select (sidekick-base.Sidekick_base.Base_types.Select)

Module Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Statement/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Statement/index.html index 41b1bd6e..47cc1846 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Statement/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Statement/index.html @@ -1,2 +1,2 @@ -Statement (sidekick-base.Sidekick_base.Base_types.Statement)

Module Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

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

Module Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term/Iter_dag/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term/Iter_dag/index.html index 4a77a833..73bedce1 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term/Iter_dag/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term/Iter_dag/index.html @@ -1,2 +1,2 @@ -Iter_dag (sidekick-base.Sidekick_base.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file +Iter_dag (sidekick-base.Sidekick_base.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term/LRA/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term/LRA/index.html index 5be433e5..0ff8f391 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term/LRA/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term/LRA/index.html @@ -1,2 +1,2 @@ -LRA (sidekick-base.Sidekick_base.Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file +LRA (sidekick-base.Sidekick_base.Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term/index.html index 25204471..2c0196e8 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base.Base_types.Term)

Module Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file +Term (sidekick-base.Sidekick_base.Base_types.Term)

Module Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/argument-1-X/index.html index 1b48a701..2ca08bbc 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick-base.Sidekick_base.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +1-X (sidekick-base.Sidekick_base.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/index.html index 5ee9ae29..69f016ae 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/Make_eq/index.html @@ -1,2 +1,2 @@ -Make_eq (sidekick-base.Sidekick_base.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file +Make_eq (sidekick-base.Sidekick_base.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/index.html index 8de786d5..b3846fcc 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/index.html @@ -1,2 +1,2 @@ -Term_cell (sidekick-base.Sidekick_base.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file +Term_cell (sidekick-base.Sidekick_base.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/module-type-ARG/index.html index 07b74a7c..cc61b11e 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/module-type-ARG/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term_cell/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick-base.Sidekick_base.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +ARG (sidekick-base.Sidekick_base.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Ty/Fun/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Ty/Fun/index.html index 1086e8ae..96a05093 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Ty/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Ty/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Ty/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Ty/index.html index 6262d1cb..4fbb23d9 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base.Base_types.Ty)

Module Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> ID.t
val atomic_uninterpreted : ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file +Ty (sidekick-base.Sidekick_base.Base_types.Ty)

Module Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> ID.t
val atomic_uninterpreted : ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Value/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Value/index.html index 3c1957ee..92e5f324 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/Value/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/Value/index.html @@ -1,2 +1,2 @@ -Value (sidekick-base.Sidekick_base.Base_types.Value)

Module Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +Value (sidekick-base.Sidekick_base.Base_types.Value)

Module Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/index.html b/dev/sidekick-base/Sidekick_base/Base_types/index.html index 7f2245bc..882047e3 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/index.html @@ -1,2 +1,2 @@ -Base_types (sidekick-base.Sidekick_base.Base_types)

Module Sidekick_base.Base_types

Basic type definitions for Sidekick_base

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

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

Module Sidekick_base.Base_types

Basic type definitions for Sidekick_base

module Vec = Sidekick_util.Vec
module Log = Sidekick_util.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : ID.t;
cstor_is_a : ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of ID.t * int
| Stmt_decl of ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Form/Funs/index.html b/dev/sidekick-base/Sidekick_base/Form/Funs/index.html index e85c6835..6048eb45 100644 --- a/dev/sidekick-base/Sidekick_base/Form/Funs/index.html +++ b/dev/sidekick-base/Sidekick_base/Form/Funs/index.html @@ -1,2 +1,2 @@ -Funs (sidekick-base.Sidekick_base.Form.Funs)

Module Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file +Funs (sidekick-base.Sidekick_base.Form.Funs)

Module Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Form/Gensym/index.html b/dev/sidekick-base/Sidekick_base/Form/Gensym/index.html index 32a3f7d1..ca2a333a 100644 --- a/dev/sidekick-base/Sidekick_base/Form/Gensym/index.html +++ b/dev/sidekick-base/Sidekick_base/Form/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick-base.Sidekick_base.Form.Gensym)

Module Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file +Gensym (sidekick-base.Sidekick_base.Form.Gensym)

Module Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Form/index.html b/dev/sidekick-base/Sidekick_base/Form/index.html index 2a24311d..e56b41f8 100644 --- a/dev/sidekick-base/Sidekick_base/Form/index.html +++ b/dev/sidekick-base/Sidekick_base/Form/index.html @@ -1,2 +1,2 @@ -Form (sidekick-base.Sidekick_base.Form)

Module Sidekick_base.Form

Formulas (boolean terms).

This module defines function symbols, constants, and views to manipulate boolean formulas in Sidekick_base. This is useful to have the ability to use boolean connectives instead of being limited to clauses; by using Sidekick_th_bool_static, the formulas are turned into clauses automatically for you.

module T = Base_types.Term
module Ty = Base_types.Ty
module Fun = Base_types.Fun
module Value = Base_types.Value
exception Not_a_th_term
val id_and : ID.t
val id_or : ID.t
val id_imply : ID.t
val view_id : ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file +Form (sidekick-base.Sidekick_base.Form)

Module Sidekick_base.Form

Formulas (boolean terms).

This module defines function symbols, constants, and views to manipulate boolean formulas in Sidekick_base. This is useful to have the ability to use boolean connectives instead of being limited to clauses; by using Sidekick_th_bool_static, the formulas are turned into clauses automatically for you.

module T = Base_types.Term
module Ty = Base_types.Ty
module Fun = Base_types.Fun
module Value = Base_types.Value
exception Not_a_th_term
val id_and : ID.t
val id_or : ID.t
val id_imply : ID.t
val view_id : ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/ID/index.html b/dev/sidekick-base/Sidekick_base/ID/index.html index 9cbf3095..42006f3f 100644 --- a/dev/sidekick-base/Sidekick_base/ID/index.html +++ b/dev/sidekick-base/Sidekick_base/ID/index.html @@ -1,2 +1,2 @@ -ID (sidekick-base.Sidekick_base.ID)

Module Sidekick_base.ID

Unique Identifiers

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +ID (sidekick-base.Sidekick_base.ID)

Module Sidekick_base.ID

Unique Identifiers

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html b/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html index 6ab04adf..eda84586 100644 --- a/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html +++ b/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html @@ -1,2 +1,2 @@ -Fun_interpretation (sidekick-base.Sidekick_base.Model.Fun_interpretation)

Module Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Base_types.Value.t Val_map.t;
default : Base_types.Value.t;
}
val default : t -> Base_types.Value.t
val cases_list : t -> (Base_types.Value.t list * Base_types.Value.t) list
val make : default:Base_types.Value.t -> (Base_types.Value.t list * Base_types.Value.t) list -> t
\ No newline at end of file +Fun_interpretation (sidekick-base.Sidekick_base.Model.Fun_interpretation)

Module Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Base_types.Value.t Val_map.t;
default : Base_types.Value.t;
}
val default : t -> Base_types.Value.t
val cases_list : t -> (Base_types.Value.t list * Base_types.Value.t) list
val make : default:Base_types.Value.t -> (Base_types.Value.t list * Base_types.Value.t) list -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Model/Val_map/index.html b/dev/sidekick-base/Sidekick_base/Model/Val_map/index.html index cc7c10bd..bb1eb27e 100644 --- a/dev/sidekick-base/Sidekick_base/Model/Val_map/index.html +++ b/dev/sidekick-base/Sidekick_base/Model/Val_map/index.html @@ -1,2 +1,2 @@ -Val_map (sidekick-base.Sidekick_base.Model.Val_map)

Module Model.Val_map

type key = Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file +Val_map (sidekick-base.Sidekick_base.Model.Val_map)

Module Model.Val_map

type key = Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Model/index.html b/dev/sidekick-base/Sidekick_base/Model/index.html index 1f2db5a1..4d6bfc87 100644 --- a/dev/sidekick-base/Sidekick_base/Model/index.html +++ b/dev/sidekick-base/Sidekick_base/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base.Model)

Module Sidekick_base.Model

Models

A model is a solution to the satisfiability question, created by the SMT solver when it proves the formula to be satisfiable.

A model gives a value to each term of the original formula(s), in such a way that the formula(s) is true when the term is replaced by its value.

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Base_types.Term.t -> Base_types.Value.t -> t -> t
val mem : Base_types.Term.t -> t -> bool
val find : Base_types.Term.t -> t -> Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Base_types.Term.t -> Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

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

Module Sidekick_base.Model

Models

A model is a solution to the satisfiability question, created by the SMT solver when it proves the formula to be satisfiable.

A model gives a value to each term of the original formula(s), in such a way that the formula(s) is true when the term is replaced by its value.

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Base_types.Term.t -> Base_types.Value.t -> t -> t
val mem : Base_types.Term.t -> t -> bool
val find : Base_types.Term.t -> t -> Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Base_types.Term.t -> Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

\ 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 index fec3b2d3..fae2bc88 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/Quip/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 index 35c36bd9..3c533608 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/index.html @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick-base/Sidekick_base/index.html index fc43c844..bf40f5e8 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 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 diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Cstor/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Cstor/index.html index c6067a5c..bac8d3d2 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Cstor/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick-base.Sidekick_base__.Base_types.Cstor)

Module Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> Sidekick_base.ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Cstor (sidekick-base.Sidekick_base__.Base_types.Cstor)

Module Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> Sidekick_base.ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Data/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Data/index.html index 1233e517..af7201dd 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Data/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Data/index.html @@ -1,2 +1,2 @@ -Data (sidekick-base.Sidekick_base__.Base_types.Data)

Module Base_types.Data

Datatypes

type t = data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Data (sidekick-base.Sidekick_base__.Base_types.Data)

Module Base_types.Data

Datatypes

type t = data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Fun/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Fun/index.html index 0259ac66..b2a7d965 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base__.Base_types.Fun)

Module Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> Sidekick_base.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base.ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : Sidekick_base.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base.ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +Fun (sidekick-base.Sidekick_base__.Base_types.Fun)

Module Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> Sidekick_base.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base.ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : Sidekick_base.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base.ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Select/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Select/index.html index c42b53bb..856b2087 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Select/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Select/index.html @@ -1,2 +1,2 @@ -Select (sidekick-base.Sidekick_base__.Base_types.Select)

Module Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file +Select (sidekick-base.Sidekick_base__.Base_types.Select)

Module Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Statement/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Statement/index.html index bea3c4c6..156f871a 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Statement/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Statement/index.html @@ -1,2 +1,2 @@ -Statement (sidekick-base.Sidekick_base__.Base_types.Statement)

Module Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

\ No newline at end of file +Statement (sidekick-base.Sidekick_base__.Base_types.Statement)

Module Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term/Iter_dag/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term/Iter_dag/index.html index 57425cd5..d3bf6635 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term/Iter_dag/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term/Iter_dag/index.html @@ -1,2 +1,2 @@ -Iter_dag (sidekick-base.Sidekick_base__.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file +Iter_dag (sidekick-base.Sidekick_base__.Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term/LRA/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term/LRA/index.html index b21202f9..251fc3f0 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term/LRA/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term/LRA/index.html @@ -1,2 +1,2 @@ -LRA (sidekick-base.Sidekick_base__.Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file +LRA (sidekick-base.Sidekick_base__.Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term/index.html index b1510f90..8500b71b 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base__.Base_types.Term)

Module Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> Sidekick_base.ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> Sidekick_base.ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file +Term (sidekick-base.Sidekick_base__.Base_types.Term)

Module Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> Sidekick_base.ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> Sidekick_base.ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/argument-1-X/index.html index 3d13143c..5aa14c52 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick-base.Sidekick_base__.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +1-X (sidekick-base.Sidekick_base__.Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/index.html index 4ef47bb4..30f34712 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/Make_eq/index.html @@ -1,2 +1,2 @@ -Make_eq (sidekick-base.Sidekick_base__.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file +Make_eq (sidekick-base.Sidekick_base__.Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/index.html index 039813dc..661d5f96 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/index.html @@ -1,2 +1,2 @@ -Term_cell (sidekick-base.Sidekick_base__.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file +Term_cell (sidekick-base.Sidekick_base__.Base_types.Term_cell)

Module Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/module-type-ARG/index.html index e2b0630b..46c6378e 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/module-type-ARG/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Term_cell/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick-base.Sidekick_base__.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +ARG (sidekick-base.Sidekick_base__.Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Ty/Fun/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Ty/Fun/index.html index 41e8ec65..6a55d3f8 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Ty/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Ty/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base__.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base__.Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Ty/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Ty/index.html index 2f2bbd17..3e71db9f 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base__.Base_types.Ty)

Module Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> Sidekick_base.ID.t
val atomic_uninterpreted : Sidekick_base.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file +Ty (sidekick-base.Sidekick_base__.Base_types.Ty)

Module Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> Sidekick_base.ID.t
val atomic_uninterpreted : Sidekick_base.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/Value/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/Value/index.html index 58050d61..4dda61c7 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/Value/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/Value/index.html @@ -1,2 +1,2 @@ -Value (sidekick-base.Sidekick_base__.Base_types.Value)

Module Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +Value (sidekick-base.Sidekick_base__.Base_types.Value)

Module Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Base_types/index.html b/dev/sidekick-base/Sidekick_base__/Base_types/index.html index ed1ab6d8..f16d8642 100644 --- a/dev/sidekick-base/Sidekick_base__/Base_types/index.html +++ b/dev/sidekick-base/Sidekick_base__/Base_types/index.html @@ -1,2 +1,2 @@ -Base_types (sidekick-base.Sidekick_base__.Base_types)

Module Sidekick_base__.Base_types

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

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

Module Sidekick_base__.Base_types

module Vec = Sidekick_util.Vec
module Log = Sidekick_util.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/CCHet/Key/index.html b/dev/sidekick-base/Sidekick_base__/CCHet/Key/index.html index 2236a256..7637bf03 100644 --- a/dev/sidekick-base/Sidekick_base__/CCHet/Key/index.html +++ b/dev/sidekick-base/Sidekick_base__/CCHet/Key/index.html @@ -1,2 +1,2 @@ -Key (sidekick-base.Sidekick_base__.CCHet.Key)

Module CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

\ No newline at end of file +Key (sidekick-base.Sidekick_base__.CCHet.Key)

Module CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/CCHet/Map/index.html b/dev/sidekick-base/Sidekick_base__/CCHet/Map/index.html index cf94a821..a4483d0e 100644 --- a/dev/sidekick-base/Sidekick_base__/CCHet/Map/index.html +++ b/dev/sidekick-base/Sidekick_base__/CCHet/Map/index.html @@ -1,2 +1,2 @@ -Map (sidekick-base.Sidekick_base__.CCHet.Map)

Module CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Map (sidekick-base.Sidekick_base__.CCHet.Map)

Module CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/CCHet/Tbl/index.html b/dev/sidekick-base/Sidekick_base__/CCHet/Tbl/index.html index 0d3b78da..bd6f257d 100644 --- a/dev/sidekick-base/Sidekick_base__/CCHet/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base__/CCHet/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base__.CCHet.Tbl)

Module CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base__.CCHet.Tbl)

Module CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/CCHet/index.html b/dev/sidekick-base/Sidekick_base__/CCHet/index.html index ec9bd907..530148a3 100644 --- a/dev/sidekick-base/Sidekick_base__/CCHet/index.html +++ b/dev/sidekick-base/Sidekick_base__/CCHet/index.html @@ -1,2 +1,2 @@ -CCHet (sidekick-base.Sidekick_base__.CCHet)

Module Sidekick_base__.CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file +CCHet (sidekick-base.Sidekick_base__.CCHet)

Module Sidekick_base__.CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Config/Key/index.html b/dev/sidekick-base/Sidekick_base__/Config/Key/index.html index 37d768d4..ef3744b3 100644 --- a/dev/sidekick-base/Sidekick_base__/Config/Key/index.html +++ b/dev/sidekick-base/Sidekick_base__/Config/Key/index.html @@ -1,2 +1,2 @@ -Key (sidekick-base.Sidekick_base__.Config.Key)

Module Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file +Key (sidekick-base.Sidekick_base__.Config.Key)

Module Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Config/index.html b/dev/sidekick-base/Sidekick_base__/Config/index.html index e83791b4..45b096ba 100644 --- a/dev/sidekick-base/Sidekick_base__/Config/index.html +++ b/dev/sidekick-base/Sidekick_base__/Config/index.html @@ -1,2 +1,2 @@ -Config (sidekick-base.Sidekick_base__.Config)

Module Sidekick_base__.Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Config (sidekick-base.Sidekick_base__.Config)

Module Sidekick_base__.Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Form/Funs/index.html b/dev/sidekick-base/Sidekick_base__/Form/Funs/index.html index cd1fff5e..87ce7422 100644 --- a/dev/sidekick-base/Sidekick_base__/Form/Funs/index.html +++ b/dev/sidekick-base/Sidekick_base__/Form/Funs/index.html @@ -1,2 +1,2 @@ -Funs (sidekick-base.Sidekick_base__.Form.Funs)

Module Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : Sidekick_base.ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> Sidekick_base.ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file +Funs (sidekick-base.Sidekick_base__.Form.Funs)

Module Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : Sidekick_base.ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> Sidekick_base.ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Form/Gensym/index.html b/dev/sidekick-base/Sidekick_base__/Form/Gensym/index.html index cadf12d8..d617b921 100644 --- a/dev/sidekick-base/Sidekick_base__/Form/Gensym/index.html +++ b/dev/sidekick-base/Sidekick_base__/Form/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick-base.Sidekick_base__.Form.Gensym)

Module Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file +Gensym (sidekick-base.Sidekick_base__.Form.Gensym)

Module Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Form/index.html b/dev/sidekick-base/Sidekick_base__/Form/index.html index 884c9c1a..77089819 100644 --- a/dev/sidekick-base/Sidekick_base__/Form/index.html +++ b/dev/sidekick-base/Sidekick_base__/Form/index.html @@ -1,2 +1,2 @@ -Form (sidekick-base.Sidekick_base__.Form)

Module Sidekick_base__.Form

exception Not_a_th_term
val id_and : Sidekick_base.ID.t
val id_or : Sidekick_base.ID.t
val id_imply : Sidekick_base.ID.t
val view_id : Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base.ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file +Form (sidekick-base.Sidekick_base__.Form)

Module Sidekick_base__.Form

exception Not_a_th_term
val id_and : Sidekick_base.ID.t
val id_or : Sidekick_base.ID.t
val id_imply : Sidekick_base.ID.t
val view_id : Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base.ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Hashcons/Make/argument-1-A/index.html b/dev/sidekick-base/Sidekick_base__/Hashcons/Make/argument-1-A/index.html index c79c3f1b..a7442f11 100644 --- a/dev/sidekick-base/Sidekick_base__/Hashcons/Make/argument-1-A/index.html +++ b/dev/sidekick-base/Sidekick_base__/Hashcons/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick-base.Sidekick_base__.Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file +1-A (sidekick-base.Sidekick_base__.Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Hashcons/Make/index.html b/dev/sidekick-base/Sidekick_base__/Hashcons/Make/index.html index b9572e4c..31853b28 100644 --- a/dev/sidekick-base/Sidekick_base__/Hashcons/Make/index.html +++ b/dev/sidekick-base/Sidekick_base__/Hashcons/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick-base.Sidekick_base__.Hashcons.Make)

Module Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val size : t -> int
val to_iter : t -> A.t Iter.t
\ No newline at end of file +Make (sidekick-base.Sidekick_base__.Hashcons.Make)

Module Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val size : t -> int
val to_iter : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Hashcons/index.html b/dev/sidekick-base/Sidekick_base__/Hashcons/index.html index 83feefdc..6e9734d9 100644 --- a/dev/sidekick-base/Sidekick_base__/Hashcons/index.html +++ b/dev/sidekick-base/Sidekick_base__/Hashcons/index.html @@ -1,2 +1,2 @@ -Hashcons (sidekick-base.Sidekick_base__.Hashcons)

Module Sidekick_base__.Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file +Hashcons (sidekick-base.Sidekick_base__.Hashcons)

Module Sidekick_base__.Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Hashcons/module-type-ARG/index.html b/dev/sidekick-base/Sidekick_base__/Hashcons/module-type-ARG/index.html index 33616c1c..99d9fa96 100644 --- a/dev/sidekick-base/Sidekick_base__/Hashcons/module-type-ARG/index.html +++ b/dev/sidekick-base/Sidekick_base__/Hashcons/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick-base.Sidekick_base__.Hashcons.ARG)

Module type Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file +ARG (sidekick-base.Sidekick_base__.Hashcons.ARG)

Module type Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/ID/index.html b/dev/sidekick-base/Sidekick_base__/ID/index.html index 75c114e3..0719d2ba 100644 --- a/dev/sidekick-base/Sidekick_base__/ID/index.html +++ b/dev/sidekick-base/Sidekick_base__/ID/index.html @@ -1,2 +1,2 @@ -ID (sidekick-base.Sidekick_base__.ID)

Module Sidekick_base__.ID

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +ID (sidekick-base.Sidekick_base__.ID)

Module Sidekick_base__.ID

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Model/Fun_interpretation/index.html b/dev/sidekick-base/Sidekick_base__/Model/Fun_interpretation/index.html index 8e4cd0b8..91cadb0e 100644 --- a/dev/sidekick-base/Sidekick_base__/Model/Fun_interpretation/index.html +++ b/dev/sidekick-base/Sidekick_base__/Model/Fun_interpretation/index.html @@ -1,2 +1,2 @@ -Fun_interpretation (sidekick-base.Sidekick_base__.Model.Fun_interpretation)

Module Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Sidekick_base.Base_types.Value.t Val_map.t;
default : Sidekick_base.Base_types.Value.t;
}
val default : t -> Sidekick_base.Base_types.Value.t
val cases_list : t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list
val make : default:Sidekick_base.Base_types.Value.t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list -> t
\ No newline at end of file +Fun_interpretation (sidekick-base.Sidekick_base__.Model.Fun_interpretation)

Module Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Sidekick_base.Base_types.Value.t Val_map.t;
default : Sidekick_base.Base_types.Value.t;
}
val default : t -> Sidekick_base.Base_types.Value.t
val cases_list : t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list
val make : default:Sidekick_base.Base_types.Value.t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Model/Val_map/index.html b/dev/sidekick-base/Sidekick_base__/Model/Val_map/index.html index 0621ce67..a831bbf8 100644 --- a/dev/sidekick-base/Sidekick_base__/Model/Val_map/index.html +++ b/dev/sidekick-base/Sidekick_base__/Model/Val_map/index.html @@ -1,2 +1,2 @@ -Val_map (sidekick-base.Sidekick_base__.Model.Val_map)

Module Model.Val_map

type key = Sidekick_base.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file +Val_map (sidekick-base.Sidekick_base__.Model.Val_map)

Module Model.Val_map

type key = Sidekick_base.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/Model/index.html b/dev/sidekick-base/Sidekick_base__/Model/index.html index 919ac29d..ebcbf9cc 100644 --- a/dev/sidekick-base/Sidekick_base__/Model/index.html +++ b/dev/sidekick-base/Sidekick_base__/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-base.Sidekick_base__.Model)

Module Sidekick_base__.Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Sidekick_base.Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t -> t -> t
val mem : Sidekick_base.Base_types.Term.t -> t -> bool
val find : Sidekick_base.Base_types.Term.t -> t -> Sidekick_base.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

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

Module Sidekick_base__.Model

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Sidekick_base.Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t -> t -> t
val mem : Sidekick_base.Base_types.Term.t -> t -> bool
val find : Sidekick_base.Base_types.Term.t -> t -> Sidekick_base.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

\ 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 index e7c6e809..77afced7 100644 --- a/dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html +++ b/dev/sidekick-base/Sidekick_base__/Proof/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 index 4107056c..1a1bc756 100644 --- a/dev/sidekick-base/Sidekick_base__/Proof/index.html +++ b/dev/sidekick-base/Sidekick_base__/Proof/index.html @@ -1,2 +1,2 @@ -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 +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__/index.html b/dev/sidekick-base/Sidekick_base__/index.html index 464e06af..0d615116 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 Model : sig ... end
module Proof : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Cstor/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Cstor/index.html index 6156c352..9545677a 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Cstor/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick-base.Sidekick_base__Base_types.Cstor)

Module Sidekick_base__Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> Sidekick_base.ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Cstor (sidekick-base.Sidekick_base__Base_types.Cstor)

Module Sidekick_base__Base_types.Cstor

Datatype constructors.

A datatype has one or more constructors, each of which is a special kind of function symbol. Constructors are injective and pairwise distinct.

type t = cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
val id : t -> Sidekick_base.ID.t
val ty_args : t -> ty Iter.t
val equal : cstor -> cstor -> bool
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Data/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Data/index.html index 09cda25e..2cde71e7 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Data/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Data/index.html @@ -1,2 +1,2 @@ -Data (sidekick-base.Sidekick_base__Base_types.Data)

Module Sidekick_base__Base_types.Data

Datatypes

type t = data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file +Data (sidekick-base.Sidekick_base__Base_types.Data)

Module Sidekick_base__Base_types.Data

Datatypes

type t = data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
val pp : CCFormat.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Fun/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Fun/index.html index 5c1bcb2c..795b2568 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base__Base_types.Fun)

Module Sidekick_base__Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> Sidekick_base.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base.ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : Sidekick_base.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base.ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +Fun (sidekick-base.Sidekick_base__Base_types.Fun)

Module Sidekick_base__Base_types.Fun

Function symbols

type view = fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

user defined function symbol. A good example can be found in Form for boolean connectives.

Possible definitions for a function symbol

type t = fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

A function symbol

val id : t -> Sidekick_base.ID.t
val view : t -> view
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val as_undefined : t -> (t * Ty.Fun.t) option
val as_undefined_exn : t -> t * Ty.Fun.t
val is_undefined : t -> bool
val select : select -> t
val select_idx : cstor -> int -> t
val cstor : cstor -> t
val is_a : cstor -> t
val do_cc : t -> bool
val mk_undef : Sidekick_base.ID.t -> Ty.Fun.t -> t

Make a new uninterpreted function.

val mk_undef' : Sidekick_base.ID.t -> Ty.t list -> Ty.t -> t
val mk_undef_const : Sidekick_base.ID.t -> Ty.t -> t

Make a new uninterpreted constant.

val pp : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Select/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Select/index.html index 9861d9f7..6d2a1b7d 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Select/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Select/index.html @@ -1,2 +1,2 @@ -Select (sidekick-base.Sidekick_base__Base_types.Select)

Module Sidekick_base__Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file +Select (sidekick-base.Sidekick_base__Base_types.Select)

Module Sidekick_base__Base_types.Select

Datatype selectors.

A selector is a kind of function that allows to obtain an argument of a given constructor.

type t = select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
val ty : t -> ty
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Statement/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Statement/index.html index 2432ff39..13cd9a71 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Statement/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Statement/index.html @@ -1,2 +1,2 @@ -Statement (sidekick-base.Sidekick_base__Base_types.Statement)

Module Sidekick_base__Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

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

Module Sidekick_base__Base_types.Statement

Statements.

A statement is an instruction for the SMT solver to do something, like asserting that a formula is true, declaring a new constant, or checking satisfiabilty of the current set of assertions.

type t = statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val pp : Fmt.t -> t -> unit

Pretty print a statement

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term/Iter_dag/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term/Iter_dag/index.html index 38b866a9..57f106fb 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term/Iter_dag/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term/Iter_dag/index.html @@ -1,2 +1,2 @@ -Iter_dag (sidekick-base.Sidekick_base__Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file +Iter_dag (sidekick-base.Sidekick_base__Base_types.Term.Iter_dag)

Module Term.Iter_dag

type t
type order =
| Pre
| Post
val create : unit -> t
val iter_dag : ?⁠order:order -> t -> term -> term Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term/LRA/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term/LRA/index.html index e406d1de..ee5865ec 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term/LRA/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term/LRA/index.html @@ -1,2 +1,2 @@ -LRA (sidekick-base.Sidekick_base__Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file +LRA (sidekick-base.Sidekick_base__Base_types.Term.LRA)

Module Term.LRA

Helpers for LRA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Q.t -> t -> t
val const : store -> Q.t -> t
val leq : store -> t -> t -> t
val lt : store -> t -> t -> t
val geq : store -> t -> t -> t
val gt : store -> t -> t -> t
val eq : store -> t -> t -> t
val neq : store -> t -> t -> t
val var : store -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term/index.html index 11ccf27d..343b2760 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base__Base_types.Term)

Module Sidekick_base__Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> Sidekick_base.ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> Sidekick_base.ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file +Term (sidekick-base.Sidekick_base__Base_types.Term)

Module Sidekick_base__Base_types.Term

Term creation and manipulation

type t = term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : t term_view;
}
type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
val id : t -> int
val view : t -> term view
val ty : t -> Ty.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type store
val create : ?⁠size:int -> unit -> store
val make : store -> t view -> t
val true_ : store -> t
val false_ : store -> t
val bool : store -> bool -> t
val const : store -> fun_ -> t
val app_fun : store -> fun_ -> t Sidekick_util.IArray.t -> t
val app_fun_l : store -> fun_ -> t list -> t
val eq : store -> t -> t -> t
val not_ : store -> t -> t
val ite : store -> t -> t -> t -> t
val app_undefined : store -> Sidekick_base.ID.t -> Ty.Fun.t -> t Sidekick_util.IArray.t -> t

app_undefined store f ty args is app store (Fun.mk_undef f ty) args. It builds a function symbol and applies it into a term immediately

val const_undefined : store -> Sidekick_base.ID.t -> Ty.t -> t

const_undefined store f ty is const store (Fun.mk_undef_const f ty). It builds a constant function symbol and makes it into a term immediately.

val select : store -> select -> t -> t
val app_cstor : store -> cstor -> t Sidekick_util.IArray.t -> t
val is_a : store -> cstor -> t -> t
val lra : store -> (Q.t, t) lra_view -> t
module LRA : sig ... end

Helpers for LRA

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

Obtain unsigned version of t, + the sign as a boolean

module Iter_dag : sig ... end
val iter_dag_with : order:Iter_dag.order -> t -> t Iter.t
val iter_dag : t -> t Iter.t
val map_shallow : store -> (t -> t) -> t -> t
val pp : t Fmt.printer

Views

val is_true : t -> bool
val is_false : t -> bool
val is_const : t -> bool
val cc_view : t -> (fun_tt Iter.t) CC_view.t
val as_fun_undef : t -> (fun_ * Ty.Fun.t) option
val as_bool : t -> bool option

Store

val store_size : store -> int
val store_iter : store -> term Iter.t

Containers

module Tbl : CCHashtbl.S with type Tbl.key = t
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/argument-1-X/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/argument-1-X/index.html index 9887dc1d..15d737f9 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/argument-1-X/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/argument-1-X/index.html @@ -1,2 +1,2 @@ -1-X (sidekick-base.Sidekick_base__Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +1-X (sidekick-base.Sidekick_base__Base_types.Term_cell.Make_eq.1-X)

Parameter Make_eq.1-X

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/index.html index f4ad8028..f5a8d22f 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/Make_eq/index.html @@ -1,2 +1,2 @@ -Make_eq (sidekick-base.Sidekick_base__Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file +Make_eq (sidekick-base.Sidekick_base__Base_types.Term_cell.Make_eq)

Module Term_cell.Make_eq

Parameters

Signature

val equal : X.t view -> X.t view -> bool
val hash : X.t view -> int
val pp : X.t view Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/index.html index 6170bd0c..d49fb179 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/index.html @@ -1,2 +1,2 @@ -Term_cell (sidekick-base.Sidekick_base__Base_types.Term_cell)

Module Sidekick_base__Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file +Term_cell (sidekick-base.Sidekick_base__Base_types.Term_cell)

Module Sidekick_base__Base_types.Term_cell

type 'a view = 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view
type t = term view
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val const : fun_ -> t
val app_fun : fun_ -> term Sidekick_util.IArray.t -> t
val eq : term -> term -> t
val not_ : term -> t
val ite : term -> term -> term -> t
val lra : (Q.t, term) lra_view -> t
val ty : t -> Ty.t

Compute the type of this term cell. Not totally free

val pp : t Fmt.printer
val map : ('a -> 'b) -> 'a view -> 'b view
val iter : ('a -> unit) -> 'a view -> unit
module type ARG = sig ... end
module Make_eq : functor (X : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/module-type-ARG/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/module-type-ARG/index.html index 96eb211e..f49e0bce 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/module-type-ARG/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Term_cell/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick-base.Sidekick_base__Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +ARG (sidekick-base.Sidekick_base__Base_types.Term_cell.ARG)

Module type Term_cell.ARG

type t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Ty/Fun/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Ty/Fun/index.html index 7c2a8a33..f2724da9 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Ty/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Ty/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base__Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file +Fun (sidekick-base.Sidekick_base__Base_types.Ty.Fun)

Module Ty.Fun

type t = fun_ty
val args : t -> ty list
val ret : t -> ty
val arity : t -> int
val unfold : t -> ty list * ty
val mk : ty list -> ty -> t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Ty/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Ty/index.html index 63ca9aad..0949c0e1 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base__Base_types.Ty)

Module Sidekick_base__Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> Sidekick_base.ID.t
val atomic_uninterpreted : Sidekick_base.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file +Ty (sidekick-base.Sidekick_base__Base_types.Ty)

Module Sidekick_base__Base_types.Ty

Types

type t = ty
type store = unit
type view = ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
type def = ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
val id : t -> int
val view : t -> view
val bool : store -> t
val real : store -> t
val atomic : def -> t list -> t
val id_of_def : def -> Sidekick_base.ID.t
val atomic_uninterpreted : Sidekick_base.ID.t -> t
val finite : t -> bool
val set_finite : t -> bool -> unit
val is_bool : t -> bool
val is_uninterpreted : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
module Tbl : CCHashtbl.S with type Tbl.key = t
module Fun : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/Value/index.html b/dev/sidekick-base/Sidekick_base__Base_types/Value/index.html index 67ad8d0a..a11ac347 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/Value/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/Value/index.html @@ -1,2 +1,2 @@ -Value (sidekick-base.Sidekick_base__Base_types.Value)

Module Sidekick_base__Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file +Value (sidekick-base.Sidekick_base__Base_types.Value)

Module Sidekick_base__Base_types.Value

Values (used in models)

type t = value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}
| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}
| V_real of Q.t
val true_ : t
val false_ : t
val bool : bool -> t
val real : Q.t -> t
val real_of_string : string -> t
val mk_elt : Sidekick_base.ID.t -> Ty.t -> t
val is_bool : t -> bool
val is_true : t -> bool
val is_false : t -> bool
val cstor_app : cstor -> t list -> t
val fresh : Term.t -> t
val hash : t -> int
val equal : t -> t -> bool
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/index.html b/dev/sidekick-base/Sidekick_base__Base_types/index.html index d4a9c01c..ba95e03c 100644 --- a/dev/sidekick-base/Sidekick_base__Base_types/index.html +++ b/dev/sidekick-base/Sidekick_base__Base_types/index.html @@ -1,2 +1,2 @@ -Sidekick_base__Base_types (sidekick-base.Sidekick_base__Base_types)

Module Sidekick_base__Base_types

Basic type definitions for Sidekick_base

module Vec = Msat.Vec
module Log = Msat.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

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

Module Sidekick_base__Base_types

Basic type definitions for Sidekick_base

module Vec = Sidekick_util.Vec
module Log = Sidekick_util.Log
module Fmt = CCFormat
module CC_view = Sidekick_core.CC_view
type lra_pred = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type lra_op = Sidekick_arith_lra.op =
| Plus
| Minus
type ('num, 'a) lra_view = ('num'a) Sidekick_arith_lra.lra_view =
| LRA_pred of lra_pred * 'a * 'a
| LRA_op of lra_op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * Sidekick_arith_lra.S_op.t * 'num
| LRA_other of 'a
type term = {
mutable term_id : int;
mutable term_ty : ty;
term_view : term term_view;
}

Term.

A term, with its own view, type, and a unique identifier. Do not create directly, see Term.

and 'a term_view =
| Bool of bool
| App_fun of fun_ * 'a Sidekick_util.IArray.t
| Eq of 'a * 'a
| Not of 'a
| Ite of 'a * 'a * 'a
| LRA of (Q.t, 'a) lra_view

Shallow structure of a term.

A term is a DAG (direct acyclic graph) of nodes, each of which has a term view.

and fun_ = {
fun_id : Sidekick_base.ID.t;
fun_view : fun_view;
}

type of function symbols

and fun_view =
| Fun_undef of fun_ty
| Fun_select of select
| Fun_cstor of cstor
| Fun_is_a of cstor
| Fun_def of {
pp : a. ('a Fmt.printer -> 'a Sidekick_util.IArray.t Fmt.printer) option;
abs : self:term -> term Sidekick_util.IArray.t -> term * bool;
do_cc : bool;
relevant : a. Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> int -> bool;
ty : Sidekick_base.ID.t -> term Sidekick_util.IArray.t -> ty;
eval : value Sidekick_util.IArray.t -> value;
}

Methods on the custom term view whose arguments are 'a. Terms must be printable, and provide some additional theory handles.

  • relevant must return a subset of args (possibly the same set). The terms it returns will be activated and evaluated whenever possible. Terms in args \ relevant args are considered for congruence but not for evaluation.
and fun_ty = {
fun_ty_args : ty list;
fun_ty_ret : ty;
}

Function type

and ty = {
mutable ty_id : int;
ty_view : ty_view;
}

Hashconsed type

and ty_view =
| Ty_bool
| Ty_real
| Ty_atomic of {
def : ty_def;
args : ty list;
mutable finite : bool;
}
and ty_def =
| Ty_uninterpreted of Sidekick_base.ID.t
| Ty_data of {
data : data;
}
| Ty_def of {
id : Sidekick_base.ID.t;
pp : ty Fmt.printer -> ty list Fmt.printer;
default_val : value list -> value;
}
and data = {
data_id : Sidekick_base.ID.t;
data_cstors : cstor Sidekick_base__.ID.Map.t lazy_t;
data_as_ty : ty lazy_t;
}
and cstor = {
cstor_id : Sidekick_base.ID.t;
cstor_is_a : Sidekick_base.ID.t;
mutable cstor_arity : int;
cstor_args : select list lazy_t;
cstor_ty_as_data : data;
cstor_ty : ty lazy_t;
}
and select = {
select_id : Sidekick_base.ID.t;
select_cstor : cstor;
select_ty : ty lazy_t;
select_i : int;
}
and value =
| V_bool of bool
| V_element of {
id : Sidekick_base.ID.t;
ty : ty;
}

a named constant, distinct from any other constant

| V_cstor of {
c : cstor;
args : value list;
}
| V_custom of {
view : value_custom_view;
pp : value_custom_view Fmt.printer;
eq : value_custom_view -> value_custom_view -> bool;
hash : value_custom_view -> int;
}

Custom value

| V_real of Q.t

Semantic values, used for models (and possibly model-constructing calculi)

and value_custom_view = ..
type definition = Sidekick_base.ID.t * ty * term
type statement =
| Stmt_set_logic of string
| Stmt_set_option of string list
| Stmt_set_info of string * string
| Stmt_data of data list
| Stmt_ty_decl of Sidekick_base.ID.t * int
| Stmt_decl of Sidekick_base.ID.t * ty list * ty
| Stmt_define of definition list
| Stmt_assert of term
| Stmt_assert_clause of term list
| Stmt_check_sat of (bool * term) list
| Stmt_exit
val term_equal_ : term -> term -> bool
val term_hash_ : term -> int
val term_cmp_ : term -> term -> int
val fun_compare : fun_ -> fun_ -> int
val pp_fun : CCFormat.t -> fun_ -> unit
val id_of_fun : fun_ -> Sidekick_base.ID.t
val eq_ty : ty -> ty -> bool
val eq_cstor : cstor -> cstor -> bool
val eq_value : value -> value -> bool
val hash_value : value Sidekick_util.Hash.t
val pp_value : value Sidekick_util.Util.printer
val pp_db : Stdlib.Format.formatter -> (int * 'a) -> unit
val pp_ty : ty Sidekick_util.Util.printer
val string_of_lra_pred : lra_pred -> string
val pp_pred : Fmt.t -> lra_pred -> unit
val string_of_lra_op : lra_op -> string
val pp_lra_op : Fmt.t -> lra_op -> unit
val pp_term_view_gen : pp_id:(Fmt.t -> Sidekick_base.ID.t -> unit) -> pp_t:'a Fmt.printer -> Fmt.t -> 'a term_view -> unit
val pp_term_top : ids:bool -> Fmt.t -> term -> unit
val pp_term : Fmt.t -> term -> unit
val pp_term_view : Fmt.t -> term term_view -> unit
module Ty : sig ... end

Types

module Fun : sig ... end

Function symbols

module Term_cell : sig ... end
module Term : sig ... end

Term creation and manipulation

module Value : sig ... end

Values (used in models)

module Data : sig ... end

Datatypes

module Select : sig ... end

Datatype selectors.

module Cstor : sig ... end

Datatype constructors.

module Statement : sig ... end

Statements.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__CCHet/Key/index.html b/dev/sidekick-base/Sidekick_base__CCHet/Key/index.html index c56839bf..c93ade16 100644 --- a/dev/sidekick-base/Sidekick_base__CCHet/Key/index.html +++ b/dev/sidekick-base/Sidekick_base__CCHet/Key/index.html @@ -1,2 +1,2 @@ -Key (sidekick-base.Sidekick_base__CCHet.Key)

Module Sidekick_base__CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

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

Module Sidekick_base__CCHet.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__CCHet/Map/index.html b/dev/sidekick-base/Sidekick_base__CCHet/Map/index.html index a0baef6b..6702c0d1 100644 --- a/dev/sidekick-base/Sidekick_base__CCHet/Map/index.html +++ b/dev/sidekick-base/Sidekick_base__CCHet/Map/index.html @@ -1,2 +1,2 @@ -Map (sidekick-base.Sidekick_base__CCHet.Map)

Module Sidekick_base__CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Map (sidekick-base.Sidekick_base__CCHet.Map)

Module Sidekick_base__CCHet.Map

Immutable map

type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val remove : _ Key.t -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__CCHet/Tbl/index.html b/dev/sidekick-base/Sidekick_base__CCHet/Tbl/index.html index fa480c78..29b26690 100644 --- a/dev/sidekick-base/Sidekick_base__CCHet/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base__CCHet/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base__CCHet.Tbl)

Module Sidekick_base__CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Tbl (sidekick-base.Sidekick_base__CCHet.Tbl)

Module Sidekick_base__CCHet.Tbl

Imperative table indexed by Key

type t
val create : ?⁠size:int -> unit -> t
val mem : t -> _ Key.t -> bool
val add : t -> 'a Key.t -> 'a -> unit
val remove : t -> _ Key.t -> unit
val length : t -> int
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
raises Not_found

if the key is not in the table.

val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair iter
val of_iter : pair iter -> t
val add_iter : t -> pair iter -> unit
val add_list : t -> pair list -> unit
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__CCHet/index.html b/dev/sidekick-base/Sidekick_base__CCHet/index.html index 613a2d13..db51e1ec 100644 --- a/dev/sidekick-base/Sidekick_base__CCHet/index.html +++ b/dev/sidekick-base/Sidekick_base__CCHet/index.html @@ -1,2 +1,2 @@ -Sidekick_base__CCHet (sidekick-base.Sidekick_base__CCHet)

Module Sidekick_base__CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file +Sidekick_base__CCHet (sidekick-base.Sidekick_base__CCHet)

Module Sidekick_base__CCHet

Associative containers with Heterogeneous Values

This is similar to CCMixtbl, but the injection is directly used as a key.

since
0.17
type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
module Key : sig ... end
type pair =
| Pair : 'a Key.t * 'a -> pair
module Tbl : sig ... end
module Map : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Config/Key/index.html b/dev/sidekick-base/Sidekick_base__Config/Key/index.html index 7100fd9a..8b52825a 100644 --- a/dev/sidekick-base/Sidekick_base__Config/Key/index.html +++ b/dev/sidekick-base/Sidekick_base__Config/Key/index.html @@ -1,2 +1,2 @@ -Key (sidekick-base.Sidekick_base__Config.Key)

Module Sidekick_base__Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

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

Module Sidekick_base__Config.Key

type 'a t
val create : unit -> 'a t
val equal : 'a t -> 'a t -> bool

Compare two keys that have compatible types

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Config/index.html b/dev/sidekick-base/Sidekick_base__Config/index.html index df0dfee4..09fe75a3 100644 --- a/dev/sidekick-base/Sidekick_base__Config/index.html +++ b/dev/sidekick-base/Sidekick_base__Config/index.html @@ -1,2 +1,2 @@ -Sidekick_base__Config (sidekick-base.Sidekick_base__Config)

Module Sidekick_base__Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file +Sidekick_base__Config (sidekick-base.Sidekick_base__Config)

Module Sidekick_base__Config

Configuration

type 'a sequence = ('a -> unit) -> unit
module Key : sig ... end
type t
val empty : t
val mem : _ Key.t -> t -> bool
val add : 'a Key.t -> 'a -> t -> t
val length : t -> int
val cardinal : t -> int
val find : 'a Key.t -> t -> 'a option
val find_exn : 'a Key.t -> t -> 'a
raises Not_found

if the key is not in the table

type pair =
| Pair : 'a Key.t * 'a -> pair
val iter : (pair -> unit) -> t -> unit
val to_iter : t -> pair sequence
val of_iter : pair sequence -> t
val add_iter : t -> pair sequence -> t
val add_list : t -> pair list -> t
val of_list : pair list -> t
val to_list : t -> pair list
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Form/Funs/index.html b/dev/sidekick-base/Sidekick_base__Form/Funs/index.html index aba5b8d2..cde6329a 100644 --- a/dev/sidekick-base/Sidekick_base__Form/Funs/index.html +++ b/dev/sidekick-base/Sidekick_base__Form/Funs/index.html @@ -1,2 +1,2 @@ -Funs (sidekick-base.Sidekick_base__Form.Funs)

Module Sidekick_base__Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : Sidekick_base.ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> Sidekick_base.ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file +Funs (sidekick-base.Sidekick_base__Form.Funs)

Module Sidekick_base__Form.Funs

val get_ty : 'a -> 'b -> Ty.t
val abs : self:T.t -> 'a -> T.t * bool
val relevant : 'a -> 'b -> 'c -> bool
val eval : Sidekick_base.ID.t -> Value.t Sidekick_util.IArray.t -> Value.t
val mk_fun : ?⁠do_cc:bool -> Sidekick_base.ID.t -> Fun.t
val and_ : Fun.t
val or_ : Fun.t
val imply : Fun.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Form/Gensym/index.html b/dev/sidekick-base/Sidekick_base__Form/Gensym/index.html index 5cf2a901..fff721c3 100644 --- a/dev/sidekick-base/Sidekick_base__Form/Gensym/index.html +++ b/dev/sidekick-base/Sidekick_base__Form/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick-base.Sidekick_base__Form.Gensym)

Module Sidekick_base__Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file +Gensym (sidekick-base.Sidekick_base__Form.Gensym)

Module Sidekick_base__Form.Gensym

type t = {
tst : T.store;
mutable fresh : int;
}
val create : T.store -> t
val fresh_term : t -> pre:string -> Ty.t -> T.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Form/index.html b/dev/sidekick-base/Sidekick_base__Form/index.html index c86e6ec3..9f708e4f 100644 --- a/dev/sidekick-base/Sidekick_base__Form/index.html +++ b/dev/sidekick-base/Sidekick_base__Form/index.html @@ -1,2 +1,2 @@ -Sidekick_base__Form (sidekick-base.Sidekick_base__Form)

Module Sidekick_base__Form

Formulas (boolean terms).

This module defines function symbols, constants, and views to manipulate boolean formulas in Sidekick_base. This is useful to have the ability to use boolean connectives instead of being limited to clauses; by using Sidekick_th_bool_static, the formulas are turned into clauses automatically for you.

exception Not_a_th_term
val id_and : Sidekick_base.ID.t
val id_or : Sidekick_base.ID.t
val id_imply : Sidekick_base.ID.t
val view_id : Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base.ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file +Sidekick_base__Form (sidekick-base.Sidekick_base__Form)

Module Sidekick_base__Form

Formulas (boolean terms).

This module defines function symbols, constants, and views to manipulate boolean formulas in Sidekick_base. This is useful to have the ability to use boolean connectives instead of being limited to clauses; by using Sidekick_th_bool_static, the formulas are turned into clauses automatically for you.

exception Not_a_th_term
val id_and : Sidekick_base.ID.t
val id_or : Sidekick_base.ID.t
val id_imply : Sidekick_base.ID.t
val view_id : Sidekick_base.ID.t -> 'a Sidekick_util.IArray.t -> ('a'a Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
val view_as_bool : T.t -> (T.tT.t Sidekick_util.IArray.iter) Sidekick_th_bool_static.bool_view
module Funs : sig ... end
val as_id : Sidekick_base.ID.t -> T.t -> T.t Sidekick_util.IArray.t option
val flatten_id : Sidekick_base.ID.t -> bool -> T.t list -> T.t list
val and_l : T.store -> T.t list -> T.t
val or_l : T.store -> T.t list -> T.t
val and_ : T.store -> T.t -> T.t -> T.t
val or_ : T.store -> T.t -> T.t -> T.t
val and_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val or_a : T.store -> T.t Sidekick_util.IArray.t -> T.t
val eq : T.store -> T.t -> T.t -> T.t
val not_ : T.store -> T.t -> T.t
val ite : T.store -> T.t -> T.t -> T.t -> T.t
val equiv : T.store -> T.t -> T.t -> T.t
val neq : T.store -> T.t -> T.t -> T.t
val imply_a : T.store -> T.t Sidekick_util.IArray.t -> T.t -> T.t
val imply_l : T.store -> T.t list -> T.t -> T.t
val imply : T.store -> T.t -> T.t -> T.t
val xor : T.store -> T.t -> T.t -> T.t
val distinct_l : T.store -> T.t CCList.t -> T.t
val mk_bool : T.store -> (T.tT.t Sidekick_util.IArray.t) Sidekick_th_bool_static.bool_view -> T.t
module Gensym : sig ... end
val check_congruence_classes : bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Hashcons/Make/argument-1-A/index.html b/dev/sidekick-base/Sidekick_base__Hashcons/Make/argument-1-A/index.html index 55f8ffa9..5899ab2f 100644 --- a/dev/sidekick-base/Sidekick_base__Hashcons/Make/argument-1-A/index.html +++ b/dev/sidekick-base/Sidekick_base__Hashcons/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick-base.Sidekick_base__Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file +1-A (sidekick-base.Sidekick_base__Hashcons.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Hashcons/Make/index.html b/dev/sidekick-base/Sidekick_base__Hashcons/Make/index.html index 9029bb9d..ec8a8b84 100644 --- a/dev/sidekick-base/Sidekick_base__Hashcons/Make/index.html +++ b/dev/sidekick-base/Sidekick_base__Hashcons/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick-base.Sidekick_base__Hashcons.Make)

Module Sidekick_base__Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val size : t -> int
val to_iter : t -> A.t Iter.t
\ No newline at end of file +Make (sidekick-base.Sidekick_base__Hashcons.Make)

Module Sidekick_base__Hashcons.Make

Parameters

Signature

type t
val create : ?⁠size:int -> unit -> t
val hashcons : t -> A.t -> A.t
val size : t -> int
val to_iter : t -> A.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Hashcons/index.html b/dev/sidekick-base/Sidekick_base__Hashcons/index.html index cc05421b..9ea46707 100644 --- a/dev/sidekick-base/Sidekick_base__Hashcons/index.html +++ b/dev/sidekick-base/Sidekick_base__Hashcons/index.html @@ -1,2 +1,2 @@ -Sidekick_base__Hashcons (sidekick-base.Sidekick_base__Hashcons)

Module Sidekick_base__Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file +Sidekick_base__Hashcons (sidekick-base.Sidekick_base__Hashcons)

Module Sidekick_base__Hashcons

module type ARG = sig ... end
module Make : functor (A : ARG) -> sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Hashcons/module-type-ARG/index.html b/dev/sidekick-base/Sidekick_base__Hashcons/module-type-ARG/index.html index 16ce96b7..7ec53b21 100644 --- a/dev/sidekick-base/Sidekick_base__Hashcons/module-type-ARG/index.html +++ b/dev/sidekick-base/Sidekick_base__Hashcons/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick-base.Sidekick_base__Hashcons.ARG)

Module type Sidekick_base__Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file +ARG (sidekick-base.Sidekick_base__Hashcons.ARG)

Module type Sidekick_base__Hashcons.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
val set_id : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__ID/index.html b/dev/sidekick-base/Sidekick_base__ID/index.html index b606d18b..b92e5b6f 100644 --- a/dev/sidekick-base/Sidekick_base__ID/index.html +++ b/dev/sidekick-base/Sidekick_base__ID/index.html @@ -1,2 +1,2 @@ -Sidekick_base__ID (sidekick-base.Sidekick_base__ID)

Module Sidekick_base__ID

Unique Identifiers

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file +Sidekick_base__ID (sidekick-base.Sidekick_base__ID)

Module Sidekick_base__ID

Unique Identifiers

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Model/Fun_interpretation/index.html b/dev/sidekick-base/Sidekick_base__Model/Fun_interpretation/index.html index cd912390..4aff67e2 100644 --- a/dev/sidekick-base/Sidekick_base__Model/Fun_interpretation/index.html +++ b/dev/sidekick-base/Sidekick_base__Model/Fun_interpretation/index.html @@ -1,2 +1,2 @@ -Fun_interpretation (sidekick-base.Sidekick_base__Model.Fun_interpretation)

Module Sidekick_base__Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Sidekick_base.Base_types.Value.t Val_map.t;
default : Sidekick_base.Base_types.Value.t;
}
val default : t -> Sidekick_base.Base_types.Value.t
val cases_list : t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list
val make : default:Sidekick_base.Base_types.Value.t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list -> t
\ No newline at end of file +Fun_interpretation (sidekick-base.Sidekick_base__Model.Fun_interpretation)

Module Sidekick_base__Model.Fun_interpretation

Model for function symbols.

Function models are a finite map from argument tuples to values, accompanied with a default value that every other argument tuples map to. In other words, it's of the form:

lambda x y. if (x=vx1,y=vy1) then v1 else if … then … else vdefault

type t = {
cases : Sidekick_base.Base_types.Value.t Val_map.t;
default : Sidekick_base.Base_types.Value.t;
}
val default : t -> Sidekick_base.Base_types.Value.t
val cases_list : t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list
val make : default:Sidekick_base.Base_types.Value.t -> (Sidekick_base.Base_types.Value.t list * Sidekick_base.Base_types.Value.t) list -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Model/Val_map/index.html b/dev/sidekick-base/Sidekick_base__Model/Val_map/index.html index b6778e84..06a3e98c 100644 --- a/dev/sidekick-base/Sidekick_base__Model/Val_map/index.html +++ b/dev/sidekick-base/Sidekick_base__Model/Val_map/index.html @@ -1,2 +1,2 @@ -Val_map (sidekick-base.Sidekick_base__Model.Val_map)

Module Sidekick_base__Model.Val_map

type key = Sidekick_base.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file +Val_map (sidekick-base.Sidekick_base__Model.Val_map)

Module Sidekick_base__Model.Val_map

type key = Sidekick_base.Base_types.Value.t list
type 'a t
val empty : 'a t
val is_empty : _ t -> bool
val cardinal : _ t -> int
val find : key -> 'a t -> 'a option
val add : key -> 'a -> 'a t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Model/index.html b/dev/sidekick-base/Sidekick_base__Model/index.html index 5e05e85d..68f8e475 100644 --- a/dev/sidekick-base/Sidekick_base__Model/index.html +++ b/dev/sidekick-base/Sidekick_base__Model/index.html @@ -1,2 +1,2 @@ -Sidekick_base__Model (sidekick-base.Sidekick_base__Model)

Module Sidekick_base__Model

Models

A model is a solution to the satisfiability question, created by the SMT solver when it proves the formula to be satisfiable.

A model gives a value to each term of the original formula(s), in such a way that the formula(s) is true when the term is replaced by its value.

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Sidekick_base.Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t -> t -> t
val mem : Sidekick_base.Base_types.Term.t -> t -> bool
val find : Sidekick_base.Base_types.Term.t -> t -> Sidekick_base.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

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

Module Sidekick_base__Model

Models

A model is a solution to the satisfiability question, created by the SMT solver when it proves the formula to be satisfiable.

A model gives a value to each term of the original formula(s), in such a way that the formula(s) is true when the term is replaced by its value.

module Val_map : sig ... end
module Fun_interpretation : sig ... end

Model for function symbols.

type t = {
values : Sidekick_base.Base_types.Value.t Sidekick_base__.Base_types.Term.Map.t;
funs : Fun_interpretation.t Sidekick_base__.Base_types.Fun.Map.t;
}

Model

val empty : t

Empty model

val add : Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t -> t -> t
val mem : Sidekick_base.Base_types.Term.t -> t -> bool
val find : Sidekick_base.Base_types.Term.t -> t -> Sidekick_base.Base_types.Value.t option
val merge : t -> t -> t
val pp : t CCFormat.printer
val eval : t -> Sidekick_base.Base_types.Term.t -> Sidekick_base.Base_types.Value.t option

eval m t tries to evaluate term t in the model. If it succeeds, the value is returned, otherwise None is.

\ 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 index bdd42651..0da47574 100644 --- a/dev/sidekick-base/Sidekick_base__Proof/Quip/index.html +++ b/dev/sidekick-base/Sidekick_base__Proof/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 index ba0cbff0..ed88f9f5 100644 --- a/dev/sidekick-base/Sidekick_base__Proof/index.html +++ b/dev/sidekick-base/Sidekick_base__Proof/index.html @@ -1,2 +1,2 @@ -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 +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-base/Sidekick_base_solver/Solver/Atom/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html index 61aa8899..f801fa46 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 7c76ed10..2ff78b27 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 = 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 b807ed60..f9b6d70c 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 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 b658be26..a6596c88 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 = 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 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 7c90c8d2..33f93e3f 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/index.html index eb28d15a..82557d1b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 02ea3806..f6324ba7 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 = 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 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 acbff186..3cc6f6ca 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_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 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 index d87eae0f..7455b516 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 c1759db5..ce35e2aa 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.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 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 index 2bf4afed..3505b529 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Fun/index.html index 17581444..d55c76f1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html index f4ba61f2..ff7f17d6 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/index.html index cfeaf6fe..d551ac97 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Ty/index.html index 77178b82..1136843c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/index.html index 9d7bad3a..94c056ad 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 8c323f1b..f0de8d7d 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 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 index 964f5f79..10559ca0 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 f790da77..57f9f072 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Fun/index.html index df613d63..087cacf8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/Tbl/index.html index 743b2db5..2e09009b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/index.html index cc572c8b..3c633ca2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Ty/index.html index cbb6e6ef..507070a4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.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.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/index.html index 4837f4ec..fc86e190 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Actions/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 c469c1b2..8e495668 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
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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Debug_/index.html index b121664a..a972f54c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Debug_/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Debug_/index.html @@ -1,2 +1,2 @@ -Debug_ (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Debug_)

Module CC.Debug_

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Debug_ (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Debug_)

Module CC.Debug_

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/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Expl/index.html index 8fe2e4ad..6fe28c44 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Fun/index.html index 2efc0b16..262da5d1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/Tbl/index.html index 81708e43..c3b03f2e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/index.html index 5f7f3dbd..028df1b0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Ty/index.html index 4c7d2337..c9fb2ab7 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/index.html index 6ef1a19a..1c9b5805 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 929470be..de78bb89 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 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 7a8895c8..e72c4113 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_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 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 index 87e39882..5ee02b96 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 e435cb98..1f7d607a 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Fun/index.html index 33d6a4e0..5c2a3495 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/Tbl/index.html index b4acbf16..1f43f0d9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/index.html index 950b734b..952f930c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Ty/index.html index 745309e1..00dd4c58 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.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.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/index.html index 887473e1..f6532a10 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 a67c2fee..e10bfdfe 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Fun/index.html index f400ade3..fbf62dce 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/Tbl/index.html index 4b49da31..7c101566 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/index.html index fe5e8a04..4bc18a2e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Ty/index.html index 8ff1680d..e6a36522 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/index.html index 3f060e6b..8b2bbe4f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : 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 d03c22f5..ffc47031 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 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 index b5db28f1..d0b4d295 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 a58932e5..e1e526a4 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 = 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 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 1b4d1c58..f18c6b43 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Fun/index.html index 6640c5f6..000440b2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/Tbl/index.html index 68fb3dde..30f4ca0c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/index.html index 19d49d3e..48ab3ec4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Ty/index.html index 21c73890..23a4377e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.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.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/index.html index 05a0a973..4ff79008 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 6c5c3b62..75aa7bd4 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 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 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 466fe34c..271473d7 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 e8646c8e..bf0f206d 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 0071797b..ec018320 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 9595c8f7..f6acace1 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/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/index.html index 999aada0..ac118270 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Solver.T)

Module Solver.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Solver.T)

Module Solver.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 ef72a195..cf4f7d5a 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_msat_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 efade162..74c4cf2a 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/module-type-THEORY/index.html index 3714d6d1..58a24c83 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-base.Sidekick_base_solver.Solver.THEORY)

Module type Solver.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ No newline at end of file +THEORY (sidekick-base.Sidekick_base_solver.Solver.THEORY)

Module type Solver.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ 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 c2424c1f..2660668c 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/Gensym/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/Gensym/index.html index 71b45e52..df4a3cf2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/Gensym/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick-base.Sidekick_base_solver.Th_bool.A.Gensym)

Module A.Gensym

type t = Sidekick_base__Form.Gensym.t
val create : S.T.Term.store -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term
\ No newline at end of file +Gensym (sidekick-base.Sidekick_base_solver.Th_bool.A.Gensym)

Module A.Gensym

type t = Sidekick_base__Form.Gensym.t
val create : S.T.Term.store -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term
\ 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 index 4a1b2535..04dae234 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Fun/index.html index 72cd4717..9a093c49 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.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.Th_bool.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/Tbl/index.html index 39e34ca1..d9d7db57 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.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.Th_bool.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/index.html index 24ff7466..48635d85 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.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.Th_bool.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Ty/index.html index fc2d97e3..30f2772e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.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.Th_bool.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/index.html index 31898339..8a3116d2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 bb4d93b3..72761b99 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 = 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 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 ea1045cc..6c2f3d25 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_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 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 index 1e01f0ee..46e64363 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 ab13d1f6..722549c9 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 = 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 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 index 102f6592..ac3f7986 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html index feb74dc8..b23b30e4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html index edff8087..39609a30 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html index 4948b847..f5b358ad 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html index cd5b8553..5d152169 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/index.html index 5af1773d..7a03a967 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 f4acd99a..489fc263 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 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 index b27394bf..928346e4 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 1277ae9f..ae90222e 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Fun/index.html index b9406ed5..3bb2594f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html index 1920c220..ab9a8a37 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/index.html index 34d0780f..b23fce55 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Ty/index.html index c0adeb97..1a8ddde3 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.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.Th_bool.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/index.html index 2bdf1dee..fd52f066 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 5cdd42d9..f485439a 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
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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Debug_/index.html index 8fb326b7..92ad8aac 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Debug_/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Debug_/index.html @@ -1,2 +1,2 @@ -Debug_ (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Debug_ (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

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/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Expl/index.html index 5895f543..2d10476f 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Fun/index.html index 7dc2e455..ad0e9a9a 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html index 00653bdd..dd365737 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/index.html index 1e2f92a5..de042c6c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Ty/index.html index 00099957..a8206cd8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/index.html index 84c9d5a5..8f1528ba 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 1d02a7dc..0a14bede 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 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 036fac8d..01a70123 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_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 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 index cd2f8200..87a90f04 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 238955b7..07024156 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Fun/index.html index 15a1948a..e2540a1f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/Tbl/index.html index ce56f8dd..307a5471 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/index.html index cbb58dc5..18c09914 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Ty/index.html index 7b61912c..86a21e49 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.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.Th_bool.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/index.html index df400ef9..379dc4d0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 237220a0..692d8e18 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Fun/index.html index 6743a2de..55e1e956 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/Tbl/index.html index 487e967d..d0bb333d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/index.html index b6ca2629..313aa4b7 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Ty/index.html index 75d774da..5fdb1711 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/index.html index 1eb1337f..4f07e5fc 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : 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 de0b8f0f..767eb8b9 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 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 index 4921b20b..efad14de 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 d335dd01..3b8e49a6 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 = 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 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 82f39c67..665fdb7a 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Fun/index.html index c5d8c55a..b01b53a5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/Tbl/index.html index 9f9c5ec1..3a499f71 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/index.html index 83d238c8..2957f328 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Ty/index.html index fe41a18f..ee9c4376 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.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.Th_bool.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/index.html index f1f132ac..4541a974 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 e80fa754..3a28e7f7 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 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 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 4385252e..d19a5075 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 2d2be992..d983ec88 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 f444fd3e..81faad73 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 ca65a110..00a2622b 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/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/index.html index 30727888..a9beafbf 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_bool.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 1ed880d9..7cc8d6cc 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_msat_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 3c9d1c5c..5342eb73 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/module-type-THEORY/index.html index 72f8d015..52ae7c04 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/module-type-THEORY/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-base.Sidekick_base_solver.Th_bool.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ No newline at end of file +THEORY (sidekick-base.Sidekick_base_solver.Th_bool.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ 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 dbf931b8..e01786b3 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/index.html index 07030d93..ad8a9cdd 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/index.html @@ -1,2 +1,2 @@ -Th_bool (sidekick-base.Sidekick_base_solver.Th_bool)

Module Sidekick_base_solver.Th_bool

Reducing boolean formulas to clauses

module A : sig ... end
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook
val cnf : state -> A.S.Solver_internal.preprocess_hook
val theory : A.S.theory
\ No newline at end of file +Th_bool (sidekick-base.Sidekick_base_solver.Th_bool)

Module Sidekick_base_solver.Th_bool

Reducing boolean formulas to clauses

module A : sig ... end
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook
val cnf : state -> A.S.Solver_internal.preprocess_hook
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/Cstor/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/Cstor/index.html index 25d99ff8..00107535 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/Cstor/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick-base.Sidekick_base_solver.Th_data.A.Cstor)

Module A.Cstor

type t = Sidekick_base__Base_types.cstor
val ty_args : t -> S.T.Ty.t Iter.t
val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool
\ No newline at end of file +Cstor (sidekick-base.Sidekick_base_solver.Th_data.A.Cstor)

Module A.Cstor

type t = Sidekick_base__Base_types.cstor
val ty_args : t -> S.T.Ty.t Iter.t
val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool
\ 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 index 5b26eefe..3d872b48 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Fun/index.html index 9d34334b..d789163d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.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.Th_data.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/Tbl/index.html index 8125459c..7da6f7b1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.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.Th_data.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/index.html index df65e222..fda8ba94 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.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.Th_data.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Ty/index.html index 82cbf086..2556071b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.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.Th_data.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/index.html index 21e06ada..aa89b461 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 706cd32e..c2c90c3e 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 = 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 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 7978bdab..7aceb215 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_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 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 index 5c86ff06..6237cc53 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 d97e371d..814ac2bf 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 = 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 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 index 1d8e6a63..b1e2fcf4 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html index 4ffec171..7a5b0dcf 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html index 18e2af5a..8e6aca61 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html index cbbfa130..939f17b6 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html index 8a3f0440..0e7e4a9f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/index.html index 64750e90..07b9c93b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 0164630e..95a6c56f 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 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 index 821528ad..14709844 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 cf2fd545..4515fb1c 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Fun/index.html index 20b62fa5..84b05bb7 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html index 485065e1..b5c22e67 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/index.html index 6881dd19..acd27768 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Ty/index.html index 26a43139..436a7c61 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.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.Th_data.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/index.html index 8875a11c..f77cbc4b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 ef1b5ba0..0e69f2b4 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
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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Debug_/index.html index 4ccb463d..cdfd9a5c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Debug_/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Debug_/index.html @@ -1,2 +1,2 @@ -Debug_ (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Debug_ (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

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/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Expl/index.html index 1be61f2f..6061adb7 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Fun/index.html index 783a7d52..264ee8f1 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html index a1a6b256..6365ae00 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/index.html index f6328922..020b601c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Ty/index.html index 47f442db..d0eb31a9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/index.html index a6c32c2a..1c8912a4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 4d7c9496..185d69ed 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 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 0c141536..0b699b89 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_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 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 index aedafd7a..cc440c06 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 6fa906f5..db321196 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Fun/index.html index e94dd34d..0837d853 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/Tbl/index.html index f1a2beae..19de4d7c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/index.html index ba2f48af..5f4b91b5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Ty/index.html index f2f9a310..46fccc73 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.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.Th_data.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/index.html index ac761062..b8c4ce06 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 8be5f543..8cbec95f 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Fun/index.html index 11d96636..ad4a3529 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/Tbl/index.html index 71ad6d8c..1626f614 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/index.html index cb5f208a..a4655a0f 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Ty/index.html index e782091c..355ae43e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/index.html index bdd45e48..d98c3851 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : 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 52a78b39..0dc0b10a 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 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 index c4628be6..7ac1435d 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 1bd71403..0ad6796c 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 = 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 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 4f5c8966..9b873bc8 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Fun/index.html index 1ba6df44..3824545a 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/Tbl/index.html index cb85005c..cfcb087d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/index.html index 88dd9222..a440f906 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Ty/index.html index 20703881..c7bc74a8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.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.Th_data.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/index.html index fd084de8..1be4f3ca 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 5749c996..c750e5c0 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 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 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 4be55387..8f2c6aef 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 764e76b7..5c5c7d08 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 8ae9ecc6..d6b5e28c 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 ad01d490..d54f1dfd 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/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/index.html index 9f727211..cd03cb26 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_data.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_data.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 d1fd4ca6..829b2d13 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_msat_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 f7a1cd2f..3b05bcba 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/module-type-THEORY/index.html index 9acbfe05..64c37927 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/module-type-THEORY/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-base.Sidekick_base_solver.Th_data.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ No newline at end of file +THEORY (sidekick-base.Sidekick_base_solver.Th_data.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ 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 dd1dd07e..6eba0488 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/index.html index 9193bab0..9b2098dc 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/index.html @@ -1,2 +1,2 @@ -Th_data (sidekick-base.Sidekick_base_solver.Th_data)

Module Sidekick_base_solver.Th_data

Theory of datatypes

module A : sig ... end
val theory : A.S.theory
\ No newline at end of file +Th_data (sidekick-base.Sidekick_base_solver.Th_data)

Module Sidekick_base_solver.Th_data

Theory of datatypes

module A : sig ... end
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Gensym/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Gensym/index.html index 15035939..4969f554 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Gensym/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick-base.Sidekick_base_solver.Th_lra.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term
\ No newline at end of file +Gensym (sidekick-base.Sidekick_base_solver.Th_lra.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Q/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Q/index.html index b8b4366a..ad19d0cd 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Q/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick-base.Sidekick_base_solver.Th_lra.A.Q)

Module A.Q

type t = Q.t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint = Z.t
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Q (sidekick-base.Sidekick_base_solver.Th_lra.A.Q)

Module A.Q

type t = Q.t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint = Z.t
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> 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 index ebb3c8a4..3dbe464f 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Fun/index.html index 89f69281..9636dd37 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.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.Th_lra.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/Tbl/index.html index bb0a455d..f0a288af 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.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.Th_lra.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/index.html index 79716cb3..eeff4737 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.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.Th_lra.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Ty/index.html index a6f89af5..99c74dfd 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.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.Th_lra.A.S.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/index.html index 0c207057..7ab577cf 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 c02920cc..0cfbdfac 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 = 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 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 011e28e1..c003243f 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_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 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 index 3a7a25b1..039859de 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 96e28f90..f1fe5f5d 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 = 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 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 index 1cd7066b..d65381d7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html index d8f8446a..ae44a320 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html index a8af3f9f..8b5662c5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html index 005ad18e..3c770dc8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html index 9c8f58d6..78d364ce 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/index.html index 659b938a..0782fdb4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 2e1ef15f..9b15c22b 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 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 index 1a3c678c..b89b1e49 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 f7c1a640..09e5a0e8 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Fun/index.html index 75e622ea..77f7fffd 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html index abf2458e..03e2beb9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/index.html index 9714b047..757b26e5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Ty/index.html index efdf79f8..bdf2d726 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.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.Th_lra.A.S.Solver_internal.CC.Actions.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/index.html index 07a77b4d..eb4e0ed2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.T)

Module Actions.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 cd59d193..4643d245 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
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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Debug_/index.html index ffd4e015..71cb8fb9 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Debug_/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Debug_/index.html @@ -1,2 +1,2 @@ -Debug_ (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Debug_ (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Debug_)

Module CC.Debug_

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/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Expl/index.html index 88812899..daf1db5e 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Fun/index.html index 51569582..e0ceebd7 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html index 4d51f836..b7da6323 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/index.html index d0f3d135..a5cba530 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Ty/index.html index 60e18dbd..2c65756b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/index.html index b0d822d3..d05cbcdc 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 9d8408bb..4f6f810a 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 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 f8e323ac..5e9a4807 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_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 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 index c7a63641..6b47c1d7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 180d82a7..f33f2393 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 = 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Fun/index.html index 1ebc5559..58dbfcda 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/Tbl/index.html index e59f1f87..4b573353 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/index.html index 81f1a1e9..e0d3e010 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Ty/index.html index 2ec964e0..8fd7600b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.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.Th_lra.A.S.Solver_internal.CC.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/index.html index 295f57b4..09ebb428 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.T)

Module CC.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 e56e3640..0bac1763 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Fun/index.html index cd650161..72d4b0e0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/Tbl/index.html index 893b57b5..f1524db0 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/index.html index f198a344..c9db746d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Ty/index.html index 48bc1f4b..2f632b2e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/index.html index 284cd44f..c11668ff 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Lit/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Lit.T)

Module Lit.T

module Fun : sig ... end
module Ty : sig ... end
module Term : 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 e4fe70bc..b7650ed9 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 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 index 847e3f72..c9154137 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 c7549cf7..320e7774 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 = 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 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 22d04c2e..14ab14f0 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_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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Fun/index.html index 2bc50d56..2c2eb9c4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/Tbl/index.html index 683fd717..f71af014 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/Tbl/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/index.html index 9094d6f0..14a156ca 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Term/index.html @@ -1,2 +1,2 @@ -Term (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Ty/index.html index 4f1a82e3..f19d42c2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Ty/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.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.Th_lra.A.S.Solver_internal.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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/index.html index a4fcdb81..5eb6896b 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.T)

Module Solver_internal.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 d89bf064..ea4e9733 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 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 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 70f5c4ac..010059a0 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 47718959..d6df5ee2 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 5a8da800..3e005757 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 e43af852..f57c9a47 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/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/index.html index 4f8fca6c..978a9113 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ No newline at end of file +T (sidekick-base.Sidekick_base_solver.Th_lra.A.S.T)

Module S.T

module Fun : sig ... end
module Ty : sig ... end
module Term : sig ... end
\ 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 122949ff..5c41b60a 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_msat_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 29de62ab..a4088668 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/module-type-THEORY/index.html index bb0c4361..3dfc0653 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/module-type-THEORY/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-base.Sidekick_base_solver.Th_lra.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ No newline at end of file +THEORY (sidekick-base.Sidekick_base_solver.Th_lra.A.S.THEORY)

Module type S.THEORY

type t
val name : string
val create_and_setup : Solver_internal.t -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
\ 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 303d814b..e40508fc 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 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 diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/index.html index 8da5aabb..ef9727d5 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/index.html @@ -1,2 +1,2 @@ -Th_lra (sidekick-base.Sidekick_base_solver.Th_lra)

Module Sidekick_base_solver.Th_lra

Theory of Linear Rational Arithmetic

module A : sig ... end
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ No newline at end of file +Th_lra (sidekick-base.Sidekick_base_solver.Th_lra)

Module Sidekick_base_solver.Th_lra

Theory of Linear Rational Arithmetic

module A : sig ... end
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ 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 0e8602bd..387700bc 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_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 diff --git a/dev/sidekick-base/index.html b/dev/sidekick-base/index.html index f2081070..5b41f361 100644 --- a/dev/sidekick-base/index.html +++ b/dev/sidekick-base/index.html @@ -1,2 +1,2 @@ -index (sidekick-base.index)

sidekick-base index

Library sidekick-base

The entry point of this library is the module: Sidekick_base.

Library sidekick-base.solver

The entry point of this library is the module: Sidekick_base_solver.

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

sidekick-base index

Library sidekick-base

The entry point of this library is the module: Sidekick_base.

Library sidekick-base.solver

The entry point of this library is the module: Sidekick_base_solver.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html index 2673f026..46dd8eac 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

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

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ 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 index 1afeabe6..ffdcfc64 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 56adf381..b8328392 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
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/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html index 36058b5f..e9765354 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib.Process.Solver.Model)

Module Solver.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 +Model (sidekick-bin.Sidekick_smtlib.Process.Solver.Model)

Module Solver.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-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html index e76e7ff6..a1fb0b5b 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 4cc0efcf..8911686f 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

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-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html index 620671d4..27e55722 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/index.html index 5771742d..d4fabf8a 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
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-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 27068ace..b72d2447 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_proof : P.t -> 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/N/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html index c8172811..f5cbfbcf 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib.Process.Solver.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 +N (sidekick-bin.Sidekick_smtlib.Process.Solver.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-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/index.html index b218eda2..09232e2a 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 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-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Simplify/index.html index 7ecc3271..908c349b 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.

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-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/index.html index 8197c68f..a380c08d 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 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-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html index db21fbcb..079b15ea 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-bin.Sidekick_smtlib.Process.Solver.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 +Fun (sidekick-bin.Sidekick_smtlib.Process.Solver.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-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html index ae0e1199..3875ed68 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick-bin.Sidekick_smtlib.Process.Solver.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 = Sidekick_base.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.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
+Term (sidekick-bin.Sidekick_smtlib.Process.Solver.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 = Sidekick_base.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.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
diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html
index 366337e4..6736b39d 100644
--- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html
+++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick-bin.Sidekick_smtlib.Process.Solver.T.Ty)

Module T.Ty

Types

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

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

Module T.Ty

Types

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

type t = Sidekick_base.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html index d5994cd5..dbeb6153 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-bin.Sidekick_smtlib.Process.Solver.T)

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

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

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html index 4554fcb0..7eb9c8d5 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ 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 d206c9a5..983c1a58 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 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-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html index 2ca0e074..857fadb3 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib.Process.Solver.THEORY)

Module type Solver.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 +THEORY (sidekick-bin.Sidekick_smtlib.Process.Solver.THEORY)

Module type Solver.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-bin/Sidekick_smtlib/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html index 991d799a..cc3385b6 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 : ?⁠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 diff --git a/dev/sidekick-bin/Sidekick_smtlib/index.html b/dev/sidekick-bin/Sidekick_smtlib/index.html index 41a1914a..30e3c256 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/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html index 73fd8f5f..2b93a325 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib__.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file +Check_cc (sidekick-bin.Sidekick_smtlib__.Process.Check_cc)

Module Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ 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 index daf7ed64..44537031 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 51c4e721..74176c71 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
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/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html index e6fd09e7..760e2ed9 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib__.Process.Solver.Model)

Module Solver.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 +Model (sidekick-bin.Sidekick_smtlib__.Process.Solver.Model)

Module Solver.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-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html index 7e12ffb2..590ce9dc 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 9475f75e..0f54f136 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

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-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html index 7c816ce5..8ac7b761 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/Actions/index.html index 154814a0..e35a943b 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
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-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 06a24a3f..714a0cdc 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_proof : P.t -> 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/N/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html index 1c388747..631bba0c 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib__.Process.Solver.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 +N (sidekick-bin.Sidekick_smtlib__.Process.Solver.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-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/CC/index.html index 360e4a86..be2df834 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 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-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/Simplify/index.html index 781958e9..7d96b658 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.

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-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Solver_internal/index.html index bed51bae..d93d9349 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 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-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html index dfe1332d..4ccabfd6 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-bin.Sidekick_smtlib__.Process.Solver.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 +Fun (sidekick-bin.Sidekick_smtlib__.Process.Solver.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-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html index 2194d721..bfd1b41d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick-bin.Sidekick_smtlib__.Process.Solver.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 = Sidekick_base.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.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
+Term (sidekick-bin.Sidekick_smtlib__.Process.Solver.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 = Sidekick_base.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.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
diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html
index a30f4b2e..dfeb3dd6 100644
--- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html
+++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick-bin.Sidekick_smtlib__.Process.Solver.T.Ty)

Module T.Ty

Types

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

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

Module T.Ty

Types

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

type t = Sidekick_base.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Sidekick_base.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html index f4bc5b38..78469668 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/T/index.html @@ -1,2 +1,2 @@ -T (sidekick-bin.Sidekick_smtlib__.Process.Solver.T)

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

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

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html index 0bec7ba9..a88fb880 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib__.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib__.Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ 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 3fd9a4bc..09debeb2 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 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-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html index dab2b4e1..8cee3979 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib__.Process.Solver.THEORY)

Module type Solver.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 +THEORY (sidekick-bin.Sidekick_smtlib__.Process.Solver.THEORY)

Module type Solver.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-bin/Sidekick_smtlib__/Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Process/index.html index 9d4d0256..14e02d83 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 : ?⁠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 diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html index ade1c3d1..af94215d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/Ctx/index.html @@ -1,2 +1,2 @@ -Ctx (sidekick-bin.Sidekick_smtlib__.Typecheck.Ctx)

Module Typecheck.Ctx

type t
val create : T.store -> t
\ No newline at end of file +Ctx (sidekick-bin.Sidekick_smtlib__.Typecheck.Ctx)

Module Typecheck.Ctx

type t
val create : T.store -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html index 85b7c521..9e7fecbe 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__/Typecheck/index.html @@ -1,2 +1,2 @@ -Typecheck (sidekick-bin.Sidekick_smtlib__.Typecheck)

Module Sidekick_smtlib__.Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ No newline at end of file +Typecheck (sidekick-bin.Sidekick_smtlib__.Typecheck)

Module Sidekick_smtlib__.Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ 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 f03a1fc1..de282aca 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__

module Process : sig ... end
module Typecheck : sig ... end
\ No newline at end of file +Sidekick_smtlib__ (sidekick-bin.Sidekick_smtlib__)

Module Sidekick_smtlib__

module Process : sig ... end
module Typecheck : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html index d79c8d00..4fac24a8 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Check_cc/index.html @@ -1,2 +1,2 @@ -Check_cc (sidekick-bin.Sidekick_smtlib__Process.Check_cc)

Module Sidekick_smtlib__Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ No newline at end of file +Check_cc (sidekick-bin.Sidekick_smtlib__Process.Check_cc)

Module Sidekick_smtlib__Process.Check_cc

val theory : Solver.theory

theory that check validity of conflicts

\ 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 index 6e447e1a..72397345 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 ef2da80c..2bdfe440 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
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/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html index 2beb2353..8c81c92f 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick-bin.Sidekick_smtlib__Process.Solver.Model)

Module Solver.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 +Model (sidekick-bin.Sidekick_smtlib__Process.Solver.Model)

Module Solver.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-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html index 191a43a2..01542a85 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 69381f76..31ef32ff 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

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-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html index 3d122bd8..f629290a 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/Actions/index.html index 31ee6581..1a153411 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
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-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 ca21ba88..d0fb18d7 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_proof : P.t -> 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/N/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html index 870d969a..f6a25a18 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick-bin.Sidekick_smtlib__Process.Solver.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 +N (sidekick-bin.Sidekick_smtlib__Process.Solver.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-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/CC/index.html index e70dc542..66822440 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 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-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/Simplify/index.html index ff8fdb64..06cb4122 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.

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-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Solver_internal/index.html index 285f7945..79a1ec36 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 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-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html index 9af8fa31..9b0f68df 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-bin.Sidekick_smtlib__Process.Solver.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 +Fun (sidekick-bin.Sidekick_smtlib__Process.Solver.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-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html index 2ef6386b..626590e6 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick-bin.Sidekick_smtlib__Process.Solver.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 = Sidekick_base.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.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
+Term (sidekick-bin.Sidekick_smtlib__Process.Solver.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 = Sidekick_base.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.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
diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html
index c5d89725..34f9c1b7 100644
--- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html
+++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick-bin.Sidekick_smtlib__Process.Solver.T.Ty)

Module T.Ty

Types

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

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

Module T.Ty

Types

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

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

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

\ No newline at end of file +T (sidekick-bin.Sidekick_smtlib__Process.Solver.T)

Module Solver.T

module Fun : sig ... end

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

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

Types

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

Term structure.

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html index 131d191e..8afd3d16 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick-bin.Sidekick_smtlib__Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick-bin.Sidekick_smtlib__Process.Solver.Unknown)

Module Solver.Unknown

type t
val pp : t CCFormat.printer
\ 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 5b3c78a2..4f25501e 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 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-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html index 9847a3be..6d66f991 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Process/Solver/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick-bin.Sidekick_smtlib__Process.Solver.THEORY)

Module type Solver.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 +THEORY (sidekick-bin.Sidekick_smtlib__Process.Solver.THEORY)

Module type Solver.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-bin/Sidekick_smtlib__Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html index cdf24f4d..75d9acf0 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 : ?⁠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 diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html index 042b2d91..b28143ef 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/Ctx/index.html @@ -1,2 +1,2 @@ -Ctx (sidekick-bin.Sidekick_smtlib__Typecheck.Ctx)

Module Sidekick_smtlib__Typecheck.Ctx

type t
val create : T.store -> t
\ No newline at end of file +Ctx (sidekick-bin.Sidekick_smtlib__Typecheck.Ctx)

Module Sidekick_smtlib__Typecheck.Ctx

type t
val create : T.store -> t
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html index a2f142dd..d788615e 100644 --- a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html @@ -1,2 +1,2 @@ -Sidekick_smtlib__Typecheck (sidekick-bin.Sidekick_smtlib__Typecheck)

Module Sidekick_smtlib__Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ No newline at end of file +Sidekick_smtlib__Typecheck (sidekick-bin.Sidekick_smtlib__Typecheck)

Module Sidekick_smtlib__Typecheck

Preprocessing AST

module Loc = Smtlib_utils.V_2_6.Loc
module PA = Smtlib_utils.V_2_6.Ast
type 'a or_error = ('a, string) CCResult.t

Parsing and Typing

module Ctx : sig ... end
val conv_term : Ctx.t -> PA.term -> T.t
val conv_statement : Ctx.t -> PA.statement -> Stmt.t list
\ No newline at end of file diff --git a/dev/sidekick-bin/index.html b/dev/sidekick-bin/index.html index e55fc287..10e46c6a 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.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/index.html b/dev/sidekick/Sidekick_arith/index.html index 73460aa5..72a0db3b 100644 --- a/dev/sidekick/Sidekick_arith/index.html +++ b/dev/sidekick/Sidekick_arith/index.html @@ -1,2 +1,2 @@ -Sidekick_arith (sidekick.Sidekick_arith)

Module Sidekick_arith

module type NUM = sig ... end
module type INT = sig ... end
module type RATIONAL = sig ... end
\ No newline at end of file +Sidekick_arith (sidekick.Sidekick_arith)

Module Sidekick_arith

module type NUM = sig ... end
module type INT = sig ... end
module type RATIONAL = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith/module-type-INT/index.html b/dev/sidekick/Sidekick_arith/module-type-INT/index.html index 55c909ee..c22450bd 100644 --- a/dev/sidekick/Sidekick_arith/module-type-INT/index.html +++ b/dev/sidekick/Sidekick_arith/module-type-INT/index.html @@ -1,2 +1,2 @@ -INT (sidekick.Sidekick_arith.INT)

Module type Sidekick_arith.INT

include NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val succ : t -> t
\ No newline at end of file +INT (sidekick.Sidekick_arith.INT)

Module type Sidekick_arith.INT

include NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val succ : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith/module-type-NUM/index.html b/dev/sidekick/Sidekick_arith/module-type-NUM/index.html index 61380d24..936ec607 100644 --- a/dev/sidekick/Sidekick_arith/module-type-NUM/index.html +++ b/dev/sidekick/Sidekick_arith/module-type-NUM/index.html @@ -1,2 +1,2 @@ -NUM (sidekick.Sidekick_arith.NUM)

Module type Sidekick_arith.NUM

type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
\ No newline at end of file +NUM (sidekick.Sidekick_arith.NUM)

Module type Sidekick_arith.NUM

type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith/module-type-RATIONAL/index.html index 10b14215..729a66a2 100644 --- a/dev/sidekick/Sidekick_arith/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith.RATIONAL)

Module type Sidekick_arith.RATIONAL

include NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith.RATIONAL)

Module type Sidekick_arith.RATIONAL

include NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html index 4d266be4..949b22c4 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html index 35704084..762e4777 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html index ee05d4ed..f39825ff 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html index 26eb1a0f..774187a3 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html index ee9dc91d..4d111405 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html index 1db2e8c2..822e8469 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html @@ -1,2 +1,2 @@ -1-C (sidekick.Sidekick_arith_lra.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +1-C (sidekick.Sidekick_arith_lra.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html index 1f02a29f..7e52c236 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html index bea3c147..4ebbf905 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +Make (sidekick.Sidekick_arith_lra.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html index 69747d0e..e08118da 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html @@ -1,2 +1,2 @@ -Linear_expr (sidekick.Sidekick_arith_lra.Linear_expr)

Module Sidekick_arith_lra.Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file +Linear_expr (sidekick.Sidekick_arith_lra.Linear_expr)

Module Sidekick_arith_lra.Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html index 2cf0cf05..4bd64255 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html @@ -1,2 +1,2 @@ -COEFF (sidekick.Sidekick_arith_lra.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +COEFF (sidekick.Sidekick_arith_lra.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html index 6b2e3b63..f528d388 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html index d9739e07..36319a6a 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html index ae24dd1d..a54dc4eb 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html index b8b78fb8..8ea5c2b6 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html index 1ee29a10..ae021aab 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html index d9c12c97..832c5615 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html index 3fdbd878..862e2fff 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html index 1a4d6718..2d498f06 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_arith_lra.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html index 072860bb..d1cb8454 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html index 811d70d7..ce632fce 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_arith_lra.Make.1-A.Gensym)

Module 1-A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_arith_lra.Make.1-A.Gensym)

Module 1-A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Q/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Q/index.html index 2f89649d..f7d2b267 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra.Make.1-A.Q)

Module 1-A.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra.Make.1-A.Q)

Module 1-A.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ 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 index b979a66d..dcdd4786 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 e11ccff9..e2344e1a 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
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/Model/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html index c11b9221..4b34f5df 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_arith_lra.Make.1-A.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 +Model (sidekick.Sidekick_arith_lra.Make.1-A.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_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 index c5d2fe8a..7948f5ce 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 bbafae09..60ce1a64 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

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_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 index 618b5c61..18c063f2 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index adce6008..521451d1 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
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_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 604fccbb..97318cb5 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html index f9ab13b5..0604b1f2 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_arith_lra.Make.1-A.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 +N (sidekick.Sidekick_arith_lra.Make.1-A.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_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 b263613a..a1850d79 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 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_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 83488d66..8e8afa32 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.

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_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 3b4c9abf..730b9019 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 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_arith_lra/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html index 714f7c43..aa72de12 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_arith_lra.Make.1-A.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 +Fun (sidekick.Sidekick_arith_lra.Make.1-A.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_arith_lra/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html index c4203cbb..c12347d6 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_arith_lra.Make.1-A.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
+Term (sidekick.Sidekick_arith_lra.Make.1-A.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
diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html
index 159c79e8..2798fa68 100644
--- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_arith_lra.Make.1-A.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 +Ty (sidekick.Sidekick_arith_lra.Make.1-A.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_arith_lra/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html index 96c3e263..182fdfd9 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_arith_lra.Make.1-A.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 +T (sidekick.Sidekick_arith_lra.Make.1-A.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_arith_lra/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html index b991a116..b48dc66e 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_arith_lra.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_arith_lra.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 81087a02..61db333e 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 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_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html index f94aab9c..4ed70060 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_arith_lra.Make.1-A.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 +THEORY (sidekick.Sidekick_arith_lra.Make.1-A.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_arith_lra/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/index.html index a567ad89..6e9c9f08 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 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 diff --git a/dev/sidekick/Sidekick_arith_lra/Make/index.html b/dev/sidekick/Sidekick_arith_lra/Make/index.html index 1f297137..13421374 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra.Make)

Module Sidekick_arith_lra.Make

Parameters

Signature

module A = A
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ No newline at end of file +Make (sidekick.Sidekick_arith_lra.Make)

Module Sidekick_arith_lra.Make

Parameters

Signature

module A = A
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Predicate/index.html b/dev/sidekick/Sidekick_arith_lra/Predicate/index.html index da62cb8c..4de22c50 100644 --- a/dev/sidekick/Sidekick_arith_lra/Predicate/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Predicate/index.html @@ -1,2 +1,2 @@ -Predicate (sidekick.Sidekick_arith_lra.Predicate)

Module Sidekick_arith_lra.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Predicate (sidekick.Sidekick_arith_lra.Predicate)

Module Sidekick_arith_lra.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html index cbfff130..12627f23 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html index 13a15416..67f2d2d6 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html index b9a81a45..49c3c758 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html index e75920a6..7e0cf8e4 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html @@ -1,2 +1,2 @@ -1-Q (sidekick.Sidekick_arith_lra.Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +1-Q (sidekick.Sidekick_arith_lra.Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html index 2b21e458..f47a843d 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra.Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra.Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html index 136f628d..a66fe114 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +Make (sidekick.Sidekick_arith_lra.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html index 3c0c8337..4a5d02ca 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html @@ -1,2 +1,2 @@ -Op (sidekick.Sidekick_arith_lra.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Op (sidekick.Sidekick_arith_lra.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/index.html index 7ce39c95..59489105 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/index.html @@ -1,2 +1,2 @@ -Simplex2 (sidekick.Sidekick_arith_lra.Simplex2)

Module Sidekick_arith_lra.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file +Simplex2 (sidekick.Sidekick_arith_lra.Simplex2)

Module Sidekick_arith_lra.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-RATIONAL/index.html index 6bce0a95..c08ba36e 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra.Simplex2.RATIONAL)

Module type Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra.Simplex2.RATIONAL)

Module type Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html index 0e11a7b9..c58af893 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html index 045c98bc..b7f556c7 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra.Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra.Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html index 7cbd58c5..83833cd3 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html index 8340825b..d915fcfa 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html index d37909bc..c868df3b 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html @@ -1,2 +1,2 @@ -V (sidekick.Sidekick_arith_lra.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +V (sidekick.Sidekick_arith_lra.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html index 127b9b7f..77a28df6 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html index 1fedd961..f03c7e0f 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/index.html b/dev/sidekick/Sidekick_arith_lra/index.html index cf3cf33f..2c88c77b 100644 --- a/dev/sidekick/Sidekick_arith_lra/index.html +++ b/dev/sidekick/Sidekick_arith_lra/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra (sidekick.Sidekick_arith_lra)

Module Sidekick_arith_lra

Linear Rational Arithmetic

module Simplex2 : sig ... end
module Predicate : sig ... end
module Linear_expr : sig ... end

Arithmetic expressions

module S_op = Simplex2.Op
type pred = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op =
| Plus
| Minus
type ('num, 'a) lra_view =
| LRA_pred of pred * 'a * 'a
| LRA_op of op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * S_op.t * 'num
| LRA_other of 'a
val map_view : ('a -> 'b) -> ('c'a) lra_view -> ('c'b) lra_view
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_arith_lra (sidekick.Sidekick_arith_lra)

Module Sidekick_arith_lra

Linear Rational Arithmetic

module Simplex2 : sig ... end
module Predicate : sig ... end
module Linear_expr : sig ... end

Arithmetic expressions

module S_op = Simplex2.Op
type pred = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op =
| Plus
| Minus
type ('num, 'a) lra_view =
| LRA_pred of pred * 'a * 'a
| LRA_op of op * 'a * 'a
| LRA_mult of 'num * 'a
| LRA_const of 'num
| LRA_simplex_var of 'a
| LRA_simplex_pred of 'a * S_op.t * 'num
| LRA_other of 'a
val map_view : ('a -> 'b) -> ('c'a) lra_view -> ('c'b) lra_view
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Gensym/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Gensym/index.html index dc1a8ab1..83a1633d 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Gensym/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_arith_lra.ARG.Gensym)

Module ARG.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_arith_lra.ARG.Gensym)

Module ARG.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Q/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Q/index.html index 7f08ede9..f1c2de9d 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra.ARG.Q)

Module ARG.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra.ARG.Q)

Module ARG.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ 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 index a03284a8..f37adb4e 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 3e538853..7d0c1234 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
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/Model/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Model/index.html index faed967b..47303d3c 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Model/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_arith_lra.ARG.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 +Model (sidekick.Sidekick_arith_lra.ARG.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_arith_lra/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Quip/index.html index b97383fa..5d626471 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 77364ccc..dfd98efe 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

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_arith_lra/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Pre_proof/index.html index 7fcba505..986117b2 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/index.html index ff7af603..c7238f76 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
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_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 2151db03..9a794a21 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html index eed1c1c1..f49a34c2 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_arith_lra.ARG.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 +N (sidekick.Sidekick_arith_lra.ARG.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_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 918d48fb..fdc2f726 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 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_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 ad01ff44..6614d73f 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.

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_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 bc7cd98e..2e7ed2e7 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 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_arith_lra/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html index 9ae70fdc..596f94e5 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_arith_lra.ARG.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 +Fun (sidekick.Sidekick_arith_lra.ARG.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_arith_lra/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html index 4a1d2506..3229ac76 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_arith_lra.ARG.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
+Term (sidekick.Sidekick_arith_lra.ARG.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
diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html
index 3a25c18c..03f3ce86 100644
--- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_arith_lra.ARG.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 +Ty (sidekick.Sidekick_arith_lra.ARG.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_arith_lra/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/index.html index a0625a3f..dffc8c2a 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_arith_lra.ARG.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 +T (sidekick.Sidekick_arith_lra.ARG.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_arith_lra/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html index 39e44f43..7c976a22 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_arith_lra.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_arith_lra.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 b301a947..7b0c7fc8 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 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_arith_lra/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html index e305f9c5..8962a4e6 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_arith_lra.ARG.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 +THEORY (sidekick.Sidekick_arith_lra.ARG.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_arith_lra/module-type-ARG/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/index.html index 5eb58bab..332140eb 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 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 diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-RATIONAL/index.html index 699a7308..bb6944b6 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra.RATIONAL)

Module type Sidekick_arith_lra.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra.RATIONAL)

Module type Sidekick_arith_lra.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Gensym/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Gensym/index.html index 580e8521..b26e25e8 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Gensym/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_arith_lra.S.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_arith_lra.S.A.Gensym)

Module A.Gensym

type t
val create : S.T.Term.store -> t
val tst : t -> S.T.Term.store
val copy : t -> t
val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Q/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Q/index.html index b200360f..b0c8eb96 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra.S.A.Q)

Module A.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra.S.A.Q)

Module A.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ 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 index be97fcd7..892f38d2 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 44591830..20efe108 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
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/Model/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Model/index.html index f2c2f27c..4502e77c 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Model/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_arith_lra.S.A.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 +Model (sidekick.Sidekick_arith_lra.S.A.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_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 index 581d6ea1..9aec658a 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 c90a4962..78c2efc9 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

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_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 index 3fc7c327..77181dea 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/index.html index cb26de66..77922774 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
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_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 58e76d75..4a037efa 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html index 5ce5c666..58607b49 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_arith_lra.S.A.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 +N (sidekick.Sidekick_arith_lra.S.A.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_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 335d3e6c..99e6c0ab 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 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_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 fed06f78..aecf2a3a 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.

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_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 0eecd434..282d6467 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 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_arith_lra/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html index f9a3a03a..67ccc636 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_arith_lra.S.A.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 +Fun (sidekick.Sidekick_arith_lra.S.A.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_arith_lra/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html index 1a61e8b1..38d2fabc 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_arith_lra.S.A.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
+Term (sidekick.Sidekick_arith_lra.S.A.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
diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html
index 7ad6670b..e90b9541 100644
--- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_arith_lra.S.A.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 +Ty (sidekick.Sidekick_arith_lra.S.A.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_arith_lra/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/index.html index 8c053da9..0faa52e9 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_arith_lra.S.A.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 +T (sidekick.Sidekick_arith_lra.S.A.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_arith_lra/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html index 5a7bc5cc..8a19b4cf 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_arith_lra.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_arith_lra.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 c0da59cf..5f764076 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 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_arith_lra/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html index 7a0698d6..1eecd5bc 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_arith_lra.S.A.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 +THEORY (sidekick.Sidekick_arith_lra.S.A.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_arith_lra/module-type-S/A/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/index.html index b9159566..c83c4e4a 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 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 diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/index.html index 62b897c9..1aef1564 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra.S)

Module type Sidekick_arith_lra.S

module A : ARG
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ No newline at end of file +S (sidekick.Sidekick_arith_lra.S)

Module type Sidekick_arith_lra.S

module A : ARG
type state
val create : ?⁠stat:Sidekick_util.Stat.t -> A.S.T.Term.store -> A.S.T.Ty.store -> state
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html index 11460af4..0c932e02 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html index bd0b4f52..86d60996 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html index 20b39280..04fd1d27 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html index c1b9ba26..2561d472 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html index d370ddee..04144184 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__.Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html index 2b325293..2acad4d3 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-1-C/index.html @@ -1,2 +1,2 @@ -1-C (sidekick.Sidekick_arith_lra__.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +1-C (sidekick.Sidekick_arith_lra__.Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html index b88f9483..0237a8ab 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra__.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra__.Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/index.html index 8002a63e..f2c0fe34 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra__.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +Make (sidekick.Sidekick_arith_lra__.Linear_expr.Make)

Module Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/index.html index e7ffea1b..f2c6e43e 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/index.html @@ -1,2 +1,2 @@ -Linear_expr (sidekick.Sidekick_arith_lra__.Linear_expr)

Module Sidekick_arith_lra__.Linear_expr

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file +Linear_expr (sidekick.Sidekick_arith_lra__.Linear_expr)

Module Sidekick_arith_lra__.Linear_expr

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html index 38e12607..b9864c67 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-COEFF/index.html @@ -1,2 +1,2 @@ -COEFF (sidekick.Sidekick_arith_lra__.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +COEFF (sidekick.Sidekick_arith_lra__.Linear_expr.COEFF)

Module type Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html index 0e75e447..1dac3b3c 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__.Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html index 21301a69..459faff7 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html index 6209ce2a..bf71df9a 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__.Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html index ddb90f16..e858fc09 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html index 1313cf72..4ef359eb 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html index 072cba46..c6ca9ca0 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__.Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html index 835c3622..aec99c3f 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__.Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html index fbef19e4..5fbfaa73 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__.Linear_expr.S)

Module type Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html index bb876032..3717c0f1 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__.Linear_expr.VAR)

Module type Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/index.html index e2115566..165f204d 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/index.html @@ -1,2 +1,2 @@ -Linear_expr_intf (sidekick.Sidekick_arith_lra__.Linear_expr_intf)

Module Sidekick_arith_lra__.Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file +Linear_expr_intf (sidekick.Sidekick_arith_lra__.Linear_expr_intf)

Module Sidekick_arith_lra__.Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html index 645eb006..695eccc1 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-COEFF/index.html @@ -1,2 +1,2 @@ -COEFF (sidekick.Sidekick_arith_lra__.Linear_expr_intf.COEFF)

Module type Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +COEFF (sidekick.Sidekick_arith_lra__.Linear_expr_intf.COEFF)

Module type Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html index 1805a07f..24664b47 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html index 03f829cb..5eb756ea 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html index bc9f55ca..0c4e5b22 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html index 1c7f3d01..a26c9131 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html index 3b8bb63b..bd1642b3 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html index df4c15e5..3410854d 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html index 06103677..6d82b2df 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html index 1f97e9da..6da18959 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S)

Module type Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__.Linear_expr_intf.S)

Module type Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html index 71d8eed3..e52e30ec 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Linear_expr_intf/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__.Linear_expr_intf.VAR)

Module type Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__.Linear_expr_intf.VAR)

Module type Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Predicate/index.html b/dev/sidekick/Sidekick_arith_lra__/Predicate/index.html index 44d25bd8..6cb64cc1 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Predicate/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Predicate/index.html @@ -1,2 +1,2 @@ -Predicate (sidekick.Sidekick_arith_lra__.Predicate)

Module Sidekick_arith_lra__.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Predicate (sidekick.Sidekick_arith_lra__.Predicate)

Module Sidekick_arith_lra__.Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html index 13cafce1..14624d19 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra__.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra__.Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html index 77bc1543..b04a7160 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra__.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra__.Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html index ce0a25d4..b600d7e3 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra__.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra__.Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-1-Q/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-1-Q/index.html index 50ec397f..6e5bfafe 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-1-Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-1-Q/index.html @@ -1,2 +1,2 @@ -1-Q (sidekick.Sidekick_arith_lra__.Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +1-Q (sidekick.Sidekick_arith_lra__.Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-2-Var/index.html index 200ad723..cf3d8fb0 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra__.Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra__.Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/index.html index 53a7d11e..97bab618 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra__.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +Make (sidekick.Sidekick_arith_lra__.Simplex2.Make)

Module Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Op/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Op/index.html index 08a1feb2..809f457e 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/Op/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/Op/index.html @@ -1,2 +1,2 @@ -Op (sidekick.Sidekick_arith_lra__.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Op (sidekick.Sidekick_arith_lra__.Simplex2.Op)

Module Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/index.html index 83d46a67..295e8356 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/index.html @@ -1,2 +1,2 @@ -Simplex2 (sidekick.Sidekick_arith_lra__.Simplex2)

Module Sidekick_arith_lra__.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file +Simplex2 (sidekick.Sidekick_arith_lra__.Simplex2)

Module Sidekick_arith_lra__.Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-RATIONAL/index.html index da7442ef..a9c288db 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra__.Simplex2.RATIONAL)

Module type Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra__.Simplex2.RATIONAL)

Module type Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html index e1c738e3..4b2a0091 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra__.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra__.Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Q/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Q/index.html index 7985acd9..51d8b637 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__.Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__.Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html index 23e68b76..e0faa05a 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra__.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra__.Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html index f9ac8653..71a06d7a 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra__.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra__.Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html index 8773da76..6c80f25f 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/V/index.html @@ -1,2 +1,2 @@ -V (sidekick.Sidekick_arith_lra__.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +V (sidekick.Sidekick_arith_lra__.Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/index.html index bd45622a..444e34a1 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra__.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html index f2744af8..f214e4c1 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex2/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__.Simplex2.VAR)

Module type Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/index.html index 9012b9e0..5d235b03 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/index.html @@ -1,2 +1,2 @@ -Simplex_intf (sidekick.Sidekick_arith_lra__.Simplex_intf)

Module Sidekick_arith_lra__.Simplex_intf

Modular and incremental implementation of the general simplex

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file +Simplex_intf (sidekick.Sidekick_arith_lra__.Simplex_intf)

Module Sidekick_arith_lra__.Simplex_intf

Modular and incremental implementation of the general simplex

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-RATIONAL/index.html index 405a78f4..e16ad500 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra__.Simplex_intf.RATIONAL)

Module type Simplex_intf.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra__.Simplex_intf.RATIONAL)

Module type Simplex_intf.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/Q/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/Q/index.html index 5db67026..2c4c74f9 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__.Simplex_intf.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__.Simplex_intf.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html index e8226a75..db800c72 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__.Simplex_intf.S)

Module type Simplex_intf.S

module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__.Simplex_intf.S)

Module type Simplex_intf.S

module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html index 6f43d402..2374f7ec 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html index f035f7a7..31cf9c26 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html index 306848a8..44ac5be8 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html index cd64caaf..7709d367 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html index e00353fd..585f008c 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html index 2dac3338..a081b002 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html index af496e99..980904d9 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html index 585395c7..6b22b1ed 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/L/index.html @@ -1,2 +1,2 @@ -L (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +L (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/Q/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/Q/index.html index 0d992909..2ccecbba 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.Q)

Module S_FULL.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL.Q)

Module S_FULL.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html index 15dcecfe..f3bd2a38 100644 --- a/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/Simplex_intf/module-type-S_FULL/index.html @@ -1,2 +1,2 @@ -S_FULL (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL)

Module type Simplex_intf.S_FULL

include S
module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file +S_FULL (sidekick.Sidekick_arith_lra__.Simplex_intf.S_FULL)

Module type Simplex_intf.S_FULL

include S
module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/index.html b/dev/sidekick/Sidekick_arith_lra__/index.html index e6f4f426..a5424577 100644 --- a/dev/sidekick/Sidekick_arith_lra__/index.html +++ b/dev/sidekick/Sidekick_arith_lra__/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__ (sidekick.Sidekick_arith_lra__)

Module Sidekick_arith_lra__

module Linear_expr : sig ... end
module Linear_expr_intf : sig ... end
module Predicate : sig ... end
module Simplex2 : sig ... end
module Simplex_intf : sig ... end
\ No newline at end of file +Sidekick_arith_lra__ (sidekick.Sidekick_arith_lra__)

Module Sidekick_arith_lra__

module Linear_expr : sig ... end
module Linear_expr_intf : sig ... end
module Predicate : sig ... end
module Simplex2 : sig ... end
module Simplex_intf : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html index 5e077f86..a126c7e1 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr.Make.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html index a449c5ef..4fb041c6 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__Linear_expr.Make.Comb)

Module Make.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html index c4eb94c4..bd8d87bf 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html index d32ac444..cdd7879d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr.Make.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html index e5988be3..e94691e9 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__Linear_expr.Make.Expr)

Module Make.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html index 974d8476..dfa914b9 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-1-C/index.html @@ -1,2 +1,2 @@ -1-C (sidekick.Sidekick_arith_lra__Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +1-C (sidekick.Sidekick_arith_lra__Linear_expr.Make.1-C)

Parameter Make.1-C

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html index 425b5b03..e3595da8 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra__Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra__Linear_expr.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/index.html index b537d858..97cc110d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra__Linear_expr.Make)

Module Sidekick_arith_lra__Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +Make (sidekick.Sidekick_arith_lra__Linear_expr.Make)

Module Sidekick_arith_lra__Linear_expr.Make

Parameters

Signature

module C = C

Coeficients used. Can be integers as well as rationals.

module Var = Var

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map = CCMap.Make(Var)

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html index 485671c0..a9e082a3 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__Linear_expr (sidekick.Sidekick_arith_lra__Linear_expr)

Module Sidekick_arith_lra__Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file +Sidekick_arith_lra__Linear_expr (sidekick.Sidekick_arith_lra__Linear_expr)

Module Sidekick_arith_lra__Linear_expr

Arithmetic expressions

type nonrec bool_op = Sidekick_arith_lra__.Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make : functor (C : COEFF) -> functor (Var : VAR) -> S with module C = C and module Var = Var and module Var_map = CCMap.Make(Var)
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html index 805f0273..57425151 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-COEFF/index.html @@ -1,2 +1,2 @@ -COEFF (sidekick.Sidekick_arith_lra__Linear_expr.COEFF)

Module type Sidekick_arith_lra__Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +COEFF (sidekick.Sidekick_arith_lra__Linear_expr.COEFF)

Module type Sidekick_arith_lra__Linear_expr.COEFF

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html index 6dae991d..03e31adc 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__Linear_expr.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html index ccdb55f5..3996c03e 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html index a2042aaf..6492aa13 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__Linear_expr.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html index 97bf7ff7..5566863a 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html index 3f9a40c6..45becde5 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html index 9633625d..f42ea0d3 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__Linear_expr.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html index 051e022b..89b34589 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__Linear_expr.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/index.html index 42441278..fbeabd9e 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__Linear_expr.S)

Module type Sidekick_arith_lra__Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__Linear_expr.S)

Module type Sidekick_arith_lra__Linear_expr.S

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html index d0c01fa0..d7c5d955 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__Linear_expr.VAR)

Module type Sidekick_arith_lra__Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__Linear_expr.VAR)

Module type Sidekick_arith_lra__Linear_expr.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html index 50222eaa..d8901c0e 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__Linear_expr_intf (sidekick.Sidekick_arith_lra__Linear_expr_intf)

Module Sidekick_arith_lra__Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file +Sidekick_arith_lra__Linear_expr_intf (sidekick.Sidekick_arith_lra__Linear_expr_intf)

Module Sidekick_arith_lra__Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html index c5872751..98f26058 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-COEFF/index.html @@ -1,2 +1,2 @@ -COEFF (sidekick.Sidekick_arith_lra__Linear_expr_intf.COEFF)

Module type Sidekick_arith_lra__Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +COEFF (sidekick.Sidekick_arith_lra__Linear_expr_intf.COEFF)

Module type Sidekick_arith_lra__Linear_expr_intf.COEFF

Coefficients

Coefficients are used in expressions. They usually are either rationals, or integers.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html index bde043c3..0fb76f86 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.C)

Module S.C

Coeficients used. Can be integers as well as rationals.

type t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html index 097de165..66b3777d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html index 7ac3c107..2ab6b532 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Comb)

Module S.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html index 535e2ae7..38040942 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> bool_op -> t
val make : Comb.t -> bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html index a8619efa..6521fdd7 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html index eac5e67e..0815540a 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Expr)

Module S.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html index 01f57bcc..e1055a78 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__Linear_expr_intf.S.Var)

Module S.Var

Variables used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html index 76e0efd7..8f11d2d3 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__Linear_expr_intf.S)

Module type Sidekick_arith_lra__Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__Linear_expr_intf.S)

Module type Sidekick_arith_lra__Linear_expr_intf.S

Linear expressions & formulas.

This modules defines linear expressions (which are linear combinations of variables), and linear constraints, where the value of a linear expressions is constrained.

module C : COEFF

Coeficients used. Can be integers as well as rationals.

module Var : VAR

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html index 6cd4264b..c59a4f61 100644 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__Linear_expr_intf.VAR)

Module type Sidekick_arith_lra__Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__Linear_expr_intf.VAR)

Module type Sidekick_arith_lra__Linear_expr_intf.VAR

Variable interface

Standard interface for variables that are meant to be used in expressions.

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Predicate/index.html b/dev/sidekick/Sidekick_arith_lra__Predicate/index.html index b0dedd98..474fb0fd 100644 --- a/dev/sidekick/Sidekick_arith_lra__Predicate/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Predicate/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__Predicate (sidekick.Sidekick_arith_lra__Predicate)

Module Sidekick_arith_lra__Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Sidekick_arith_lra__Predicate (sidekick.Sidekick_arith_lra__Predicate)

Module Sidekick_arith_lra__Predicate

type t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val neg : t -> t
val neg_sign : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html index c6c1071d..39e192e3 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra__Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra__Simplex2.Make.Constraint)

Module Make.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Subst/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Subst/index.html index 5bdca39b..a16b81fc 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra__Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra__Simplex2.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html index 9601fe86..66bf1add 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra__Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra__Simplex2.Make.Unsat_cert)

Module Make.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-1-Q/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-1-Q/index.html index 9934eb8e..50ed779f 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-1-Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-1-Q/index.html @@ -1,2 +1,2 @@ -1-Q (sidekick.Sidekick_arith_lra__Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +1-Q (sidekick.Sidekick_arith_lra__Simplex2.Make.1-Q)

Parameter Make.1-Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-2-Var/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-2-Var/index.html index 3a9094b2..da1d7956 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-2-Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/argument-2-Var/index.html @@ -1,2 +1,2 @@ -2-Var (sidekick.Sidekick_arith_lra__Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +2-Var (sidekick.Sidekick_arith_lra__Simplex2.Make.2-Var)

Parameter Make.2-Var

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/index.html index c47bdaba..e03ca5ed 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_arith_lra__Simplex2.Make)

Module Sidekick_arith_lra__Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +Make (sidekick.Sidekick_arith_lra__Simplex2.Make)

Module Sidekick_arith_lra__Simplex2.Make

Parameters

Signature

module V = Var
module V_map : CCMap.S with type V_map.key = V.t
module Q = Q
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/Op/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/Op/index.html index 51c0b503..7c53da5e 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/Op/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/Op/index.html @@ -1,2 +1,2 @@ -Op (sidekick.Sidekick_arith_lra__Simplex2.Op)

Module Sidekick_arith_lra__Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file +Op (sidekick.Sidekick_arith_lra__Simplex2.Op)

Module Sidekick_arith_lra__Simplex2.Op

Basic operator

type t =
| Leq
| Lt
| Geq
| Gt
val neg_sign : t -> t
val not_ : t -> t
val to_string : t -> string
val pp : Sidekick_util.Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html index 6bfe9e5b..8ee5fb36 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__Simplex2 (sidekick.Sidekick_arith_lra__Simplex2)

Module Sidekick_arith_lra__Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file +Sidekick_arith_lra__Simplex2 (sidekick.Sidekick_arith_lra__Simplex2)

Module Sidekick_arith_lra__Simplex2

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Op : sig ... end
module type S = sig ... end
module Make : functor (Q : RATIONAL) -> functor (Var : VAR) -> S with module V = Var and module Q = Q
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-RATIONAL/index.html index b335accc..6d8d12eb 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra__Simplex2.RATIONAL)

Module type Sidekick_arith_lra__Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra__Simplex2.RATIONAL)

Module type Sidekick_arith_lra__Simplex2.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html index 4297af4a..f13fd5ef 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Constraint/index.html @@ -1,2 +1,2 @@ -Constraint (sidekick.Sidekick_arith_lra__Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Constraint (sidekick.Sidekick_arith_lra__Simplex2.S.Constraint)

Module S.Constraint

type op = Op.t
type t = {
op : op;
lhs : V.t;
rhs : num;
}

A constraint is the comparison of a variable to a constant.

val mk : V.t -> op -> num -> t
val leq : V.t -> num -> t
val lt : V.t -> num -> t
val geq : V.t -> num -> t
val gt : V.t -> num -> t
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Q/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Q/index.html index 4886b75a..4b6d6b21 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__Simplex2.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html index 79a4c631..97d808b5 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Subst/index.html @@ -1,2 +1,2 @@ -Subst (sidekick.Sidekick_arith_lra__Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file +Subst (sidekick.Sidekick_arith_lra__Simplex2.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html index 8d68da2e..88a69f67 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/Unsat_cert/index.html @@ -1,2 +1,2 @@ -Unsat_cert (sidekick.Sidekick_arith_lra__Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file +Unsat_cert (sidekick.Sidekick_arith_lra__Simplex2.S.Unsat_cert)

Module S.Unsat_cert

type t = unsat_cert
val lits : t -> V.lit list
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html index 634350eb..09be69ea 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/V/index.html @@ -1,2 +1,2 @@ -V (sidekick.Sidekick_arith_lra__Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +V (sidekick.Sidekick_arith_lra__Simplex2.S.V)

Module S.V

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/index.html index 1289698c..8d3502a7 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__Simplex2.S)

Module type Sidekick_arith_lra__Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra__Simplex2.S)

Module type Sidekick_arith_lra__Simplex2.S

module V : VAR
module V_map : CCMap.S with type V_map.key = V.t
module Q : RATIONAL
type num = Q.t

Numbers

module Constraint : sig ... end
module Subst : sig ... end
type t
val create : ?⁠stat:Sidekick_util.Stat.t -> unit -> t

Create a new simplex.

val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : t -> V.t -> (num * V.t) list -> unit

Define a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a Constraint.t

type unsat_cert
module Unsat_cert : sig ... end
exception E_unsat of Unsat_cert.t
type ev_on_propagate = V.lit -> reason:V.lit list -> unit
val add_var : t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unit

Add a constraint to the simplex.

raises Unsat

if it's immediately obvious that this is not satisfiable.

val declare_bound : t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists, so we can possibly propagate it. Unlike add_constraint this does NOT assert that the constraint is true

val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unit

Check the whole simplex for satisfiability.

parameter on_propagate

is called with arguments lit, reason whenever reason => lit is found to be true by the simplex.

raises Unsat

if the constraints are not satisfiable.

type result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> result

Call check_exn and return a model or a proof of unsat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html index 3270e002..e10a9d0d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex2/module-type-VAR/index.html @@ -1,2 +1,2 @@ -VAR (sidekick.Sidekick_arith_lra__Simplex2.VAR)

Module type Sidekick_arith_lra__Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +VAR (sidekick.Sidekick_arith_lra__Simplex2.VAR)

Module type Sidekick_arith_lra__Simplex2.VAR

type t

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html index b979eacd..781feb10 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html @@ -1,2 +1,2 @@ -Sidekick_arith_lra__Simplex_intf (sidekick.Sidekick_arith_lra__Simplex_intf)

Module Sidekick_arith_lra__Simplex_intf

Modular and incremental implementation of the general simplex

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file +Sidekick_arith_lra__Simplex_intf (sidekick.Sidekick_arith_lra__Simplex_intf)

Module Sidekick_arith_lra__Simplex_intf

Modular and incremental implementation of the general simplex

module type S = sig ... end
module type S_FULL = sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-RATIONAL/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-RATIONAL/index.html index a6cfd01c..7d305ecc 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-RATIONAL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-RATIONAL/index.html @@ -1,2 +1,2 @@ -RATIONAL (sidekick.Sidekick_arith_lra__Simplex_intf.RATIONAL)

Module type Sidekick_arith_lra__Simplex_intf.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +RATIONAL (sidekick.Sidekick_arith_lra__Simplex_intf.RATIONAL)

Module type Sidekick_arith_lra__Simplex_intf.RATIONAL

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/Q/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/Q/index.html index 5e45a941..c5883ee6 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__Simplex_intf.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__Simplex_intf.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html index 3f912192..dcde5fbb 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_arith_lra__Simplex_intf.S)

Module type Sidekick_arith_lra__Simplex_intf.S

module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_arith_lra__Simplex_intf.S)

Module type Sidekick_arith_lra__Simplex_intf.S

module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html index b105601c..c701cb33 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/C/index.html @@ -1,2 +1,2 @@ -C (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file +C (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.C)

Module L.C

Coeficients used. Can be integers as well as rationals.

type t = Q.t
val equal : t -> t -> bool

Equality on coefficients.

val compare : t -> t -> int

Comparison on coefficients.

val pp : t Sidekick_util.Fmt.printer

Printer for coefficients.

val zero : t

The zero coefficient.

val one : t

The one coefficient (to rule them all, :p).

val neg : t -> t

Unary negation

val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t

Standard operations on coefficients.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html index 620b0fa9..61789f8d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb.Infix)

Module Comb.Infix

Infix operations on combinations

This module defines usual operations on linear combinations, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html index 7c209d38..80711b5f 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Comb/index.html @@ -1,2 +1,2 @@ -Comb (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Comb (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Comb)

Module L.Comb

Combinations.

This module defines linear combnations as mapping from variables to coefficients. This allows for very fast computations.

type t

The type of linear combinations.

val compare : t -> t -> int

Comparisons on linear combinations.

val pp : t Sidekick_util.Fmt.printer

Printer for linear combinations.

val is_empty : t -> bool

Is the given expression empty ?

Creation
val empty : t

The empty linear combination.

val monomial : C.t -> var -> t

monome n v creates the linear combination n * v

val monomial1 : var -> t

monome1 v creates the linear combination 1 * v

val as_singleton : t -> (C.t * var) option

as_singleton l returns Some (c,x) if l = c * x, None otherwise

val add : C.t -> var -> t -> t

add n v t adds the monome n * v to the combination t.

module Infix : sig ... end

Infix operations on combinations

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between combinations.

val (-) : t -> t -> t

Substraction between combinations.

val (*) : C.t -> t -> t

Multiplication by a constant.

val iter : (var -> C.t -> unit) -> t -> unit
val of_list : (C.t * var) list -> t
val to_list : t -> (C.t * var) list

Converters to and from lists of monomes.

val of_map : C.t Var_map.t -> t
val to_map : t -> C.t Var_map.t
Semantics
val eval : subst -> t -> C.t

Evaluate a linear combination given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html index 404d0f73..da29b1d4 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Constr/index.html @@ -1,2 +1,2 @@ -Constr (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file +Constr (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Constr)

Module L.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Sidekick_arith_lra__.Linear_expr_intf.bool_op

Arithmetic comparison operators.

type t = {
expr : Expr.t;
op : op;
}

Linear constraints. Expressions are implicitly compared to zero.

val compare : t -> t -> int

Standard comparison function.

val pp : t Sidekick_util.Fmt.printer

Standard printing function.

val of_expr : Expr.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> t
val make : Comb.t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op -> C.t -> t

Create a constraint from a linear expression/combination and a constant.

val geq : Comb.t -> C.t -> t
val leq : Comb.t -> C.t -> t
val gt : Comb.t -> C.t -> t
val lt : Comb.t -> C.t -> t
val eq : Comb.t -> C.t -> t
val neq : Comb.t -> C.t -> t
val geq0 : Expr.t -> t
val leq0 : Expr.t -> t
val gt0 : Expr.t -> t
val lt0 : Expr.t -> t
val eq0 : Expr.t -> t
val neq0 : Expr.t -> t
val op : t -> Sidekick_arith_lra__.Linear_expr_intf.bool_op
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Sidekick_arith_lra__.Linear_expr_intf.bool_op * C.t

Split the linear combinations from the constant

val eval : subst -> t -> bool

Evaluate the given constraint under a substitution.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html index a372193c..ebeda6d5 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/Infix/index.html @@ -1,2 +1,2 @@ -Infix (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file +Infix (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr.Infix)

Module Expr.Infix

Infix operations on expressions

This module defines usual operations on linear expressions, as infix operators to ease reading of complex computations.

val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html index 260c092c..6a56641a 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Expr/index.html @@ -1,2 +1,2 @@ -Expr (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file +Expr (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Expr)

Module L.Expr

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

type t

The type of linear expressions.

val comb : t -> Comb.t
val const : t -> C.t
val is_zero : t -> bool
val is_const : t -> bool
val compare : t -> t -> int

Standard comparison function on expressions.

val pp : t Sidekick_util.Fmt.printer

Standard printing function on expressions.

val zero : t

The expression 2.

val of_const : C.t -> t

The constant expression.

val of_comb : Comb.t -> t

Combination without constant

val of_list : C.t -> (C.t * Var.t) list -> t
val make : Comb.t -> C.t -> t

make c n makes the linear expression c + n.

val monomial : C.t -> var -> t
val monomial1 : var -> t
module Infix : sig ... end

Infix operations on expressions

Include the previous module.

include module type of Infix
val (+) : t -> t -> t

Addition between expressions.

val (-) : t -> t -> t

Substraction between expressions.

val (*) : C.t -> t -> t

Multiplication by a constant.

Semantics
val eval : subst -> t -> C.t

Evaluate a linear expression given a substitution for its variables. TODO: document potential exceptions raised ?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html index 51b0e8ea..48f62ed9 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/Var/index.html @@ -1,2 +1,2 @@ -Var (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file +Var (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L.Var)

Module L.Var

Variables used in expressions.

type t = var

Variable type.

val compare : t -> t -> int

Standard comparison function on variables.

val pp : t Sidekick_util.Fmt.printer

Printer for variables.

type lit = lit
val pp_lit : lit Sidekick_util.Fmt.printer
val not_lit : lit -> lit option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html index c97a6d08..a00b0cc0 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/L/index.html @@ -1,2 +1,2 @@ -L (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file +L (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.L)

Module S_FULL.L

module C : Sidekick_arith_lra__.Linear_expr_intf.COEFF with type t = Q.t

Coeficients used. Can be integers as well as rationals.

module Var : Sidekick_arith_lra__.Linear_expr_intf.VAR with type t = var and type lit = lit

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type Var_map.key = var

Maps from variables, used for expressions as well as substitutions.

type subst = C.t Var_map.t

Type for substitutions.

module Comb : sig ... end

Combinations.

Linear expressions.

module Expr : sig ... end

Linear expressions represent linear arithmetic expressions as a linear combination and a constant.

module Constr : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/Q/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/Q/index.html index 0bf4fcde..3ade5c4d 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/Q/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/Q/index.html @@ -1,2 +1,2 @@ -Q (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.Q)

Module S_FULL.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Q (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL.Q)

Module S_FULL.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html index c5ef85bf..3c73e5f9 100644 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html +++ b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/module-type-S_FULL/index.html @@ -1,2 +1,2 @@ -S_FULL (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL)

Module type Sidekick_arith_lra__Simplex_intf.S_FULL

include S
module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file +S_FULL (sidekick.Sidekick_arith_lra__Simplex_intf.S_FULL)

Module type Sidekick_arith_lra__Simplex_intf.S_FULL

include S
module Q : RATIONAL
type var

The given type of the variables

module Var_map : CCMap.S with type Var_map.key = var

A map on variables

type param

Parameter required at the creation of the simplex

type lit
type t

The type of a (possibly not solved) linear system

type cert = {
cert_var : var;
cert_expr : (Q.t * var) list;
}

An unsatisfiability explanation is a couple (x, expr). If expr is the empty list, then there is a contradiction between two given bounds of x. Else, the explanation is an equality x = expr that is valid (it can be derived from the original equations of the system) from which a bound can be deduced which contradicts an already given bound of the system.

type res =
| Solution of Q.t Var_map.t
| Unsatisfiable of cert

Generic type returned when solving the simplex. A solution is a list of bindings that satisfies all the constraints inside the system. If the system is unsatisfiable, an explanation of type 'cert is returned.

Simplex construction

val create : param -> t

The empty system.

parameter fresh

the state for generating fresh variables on demand.

val add_eq : t -> (var * (Q.t * var) list) -> unit

add_eq s (x, eq) adds the equation x=eq to s

val add_bounds : t -> ?⁠strict_lower:bool -> ?⁠strict_upper:bool -> ?⁠lower_reason:lit -> ?⁠upper_reason:lit -> (var * Q.t * Q.t) -> unit

add_bounds (x, lower, upper) adds to s the bounds lower and upper for the given variable x. If the bound is loose on one side (no upper bounds for instance), the values Q.inf and Q.minus_inf can be used. By default, in a system, all variables have no bounds, i.e have lower bound Q.minus_inf and upper bound Q.inf. Optional parameters allow to make the the bounds strict. Defaults to false, so that bounds are large by default.

val add_lower_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit
val add_upper_bound : t -> ?⁠strict:bool -> reason:lit -> var -> Q.t -> unit

Simplex solving

val solve : t -> res

solve s solves the system s and returns a solution, if one exists. This function may change the internal representation of the system to that of an equivalent one (permutation of basic and non basic variables and pivot operation on the tableaux).

val check_cert : t -> cert -> [ `Ok of lit list | `Bad_bounds of string * string | `Diff_not_0 of Q.t Var_map.t ]

checks that the certificat indeed yields to a contradiction in the current state of the simplex.

returns

`Ok unsat_core if the certificate is valid.

val pp_cert : cert CCFormat.printer
val pp_full_state : t CCFormat.printer
module L : Sidekick_arith_lra__.Linear_expr_intf.S with type C.t = Q.t and type Var.t = var and type Var.lit = lit
type op = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type constr = L.Constr.t
val add_constr : t -> constr -> lit -> unit

Add a constraint to a simplex state.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_backend/.dune-keep b/dev/sidekick/Sidekick_backend/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_backend/Backend_intf/index.html b/dev/sidekick/Sidekick_backend/Backend_intf/index.html new file mode 100644 index 00000000..f970ce97 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Backend_intf/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..068140af --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Backend_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..f54f15ac --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..3cffb1b5 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..336713ea --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..479412b5 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..41830747 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..bb8dc559 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Default/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..ceabaa6f --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..8367ee58 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..3033da0a --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..480a1734 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..b94fb68e --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..492df1cf --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/argument-2-A/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..2f81ba8b --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Make/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..e953367d --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..b7ce6dbf --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..a76f4aed --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..9535e7e6 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..289291ff --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..fe961b37 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/argument-2-A/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..0429859f --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/Simple/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..38108d2c --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..43769912 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/module-type-Arg/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..c1134f5a --- /dev/null +++ b/dev/sidekick/Sidekick_backend/Dot/module-type-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..010cda23 --- /dev/null +++ b/dev/sidekick/Sidekick_backend/index.html @@ -0,0 +1,2 @@ + +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/.dune-keep b/dev/sidekick/Sidekick_backend__Backend_intf/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_backend__Backend_intf/index.html b/dev/sidekick/Sidekick_backend__Backend_intf/index.html new file mode 100644 index 00000000..c41dd999 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Backend_intf/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..d585511f --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Backend_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +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/.dune-keep b/dev/sidekick/Sidekick_backend__Dot/.dune-keep new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..1591cdae --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..800b52ad --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..7d981e3d --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..91deb1b5 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..70fc05f5 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..41d9761c --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Default/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..832c6167 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..8b7693e7 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..1127a0b7 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..55e38772 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..d810c542 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..20cfbc49 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/argument-2-A/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..8dea8fce --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Make/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..780ad67a --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..42eadba5 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Clause/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..491dc91e --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Formula/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..a0b9ef67 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..f22bce76 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-1-S/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..1be9d138 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/argument-2-A/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..4338bcfc --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/Simple/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..e11286c3 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..587a2afd --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/module-type-Arg/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..b4fd8ac9 --- /dev/null +++ b/dev/sidekick/Sidekick_backend__Dot/module-type-S/index.html @@ -0,0 +1,2 @@ + +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 32066290..179c3b83 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_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/N/index.html b/dev/sidekick/Sidekick_cc/Make/N/index.html index d56ba6b7..3874757a 100644 --- a/dev/sidekick/Sidekick_cc/Make/N/index.html +++ b/dev/sidekick/Sidekick_cc/Make/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_cc.Make.N)

Module Make.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 +N (sidekick.Sidekick_cc.Make.N)

Module Make.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_cc/Make/argument-1-A/Actions/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/index.html index 39879b66..4f6253b6 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
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 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 63b4725c..9e1215c9 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
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 index 7ecf0a00..47e3a511 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 61864a0c..88b0b9db 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

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_cc/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html index 1047e65f..8a5832b0 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_cc.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 +Fun (sidekick.Sidekick_cc.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_cc/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html index 92ba685f..1258abc7 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_cc.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
+Term (sidekick.Sidekick_cc.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
diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html
index 144f3660..153dd470 100644
--- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_cc.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 +Ty (sidekick.Sidekick_cc.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_cc/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html index ddf8ade7..2acacdb7 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_cc.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_cc.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_cc/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/index.html index 0fbc65ec..304dcc66 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 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 diff --git a/dev/sidekick/Sidekick_cc/Make/index.html b/dev/sidekick/Sidekick_cc/Make/index.html index 4b3b9e21..99574f0c 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 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 diff --git a/dev/sidekick/Sidekick_cc/index.html b/dev/sidekick/Sidekick_cc/index.html index 9016c97e..075c4b0b 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 module P = A.P and module Actions = A.Actions
\ 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 18356cc9..1a76916a 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
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 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 6362e8bd..3132cc76 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_proof : P.t -> 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 91778e4f..db2d40b9 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
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/N/index.html b/dev/sidekick/Sidekick_cc/module-type-S/N/index.html index ac0c8ccc..cad57123 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/N/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_cc.S.N)

Module S.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 +N (sidekick.Sidekick_cc.S.N)

Module S.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_cc/module-type-S/P/Quip/index.html b/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html index be8c01e4..366e4db4 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 7f236537..f9863dd5 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

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_cc/module-type-S/T/Fun/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html index d54ff8ae..0bc30008 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_cc.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 +Fun (sidekick.Sidekick_cc.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_cc/module-type-S/T/Term/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html index 24cc2667..95000747 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_cc.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
+Term (sidekick.Sidekick_cc.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
diff --git a/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html
index d2fb0a7c..7d806878 100644
--- a/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_cc/module-type-S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_cc.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 +Ty (sidekick.Sidekick_cc.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_cc/module-type-S/T/index.html b/dev/sidekick/Sidekick_cc/module-type-S/T/index.html index dceb784a..f768d9a4 100644 --- a/dev/sidekick/Sidekick_cc/module-type-S/T/index.html +++ b/dev/sidekick/Sidekick_cc/module-type-S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_cc.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 +T (sidekick.Sidekick_cc.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_cc/module-type-S/index.html b/dev/sidekick/Sidekick_cc/module-type-S/index.html index 1274256a..55bbe2b6 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 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 diff --git a/dev/sidekick/Sidekick_core/CC_view/index.html b/dev/sidekick/Sidekick_core/CC_view/index.html index f3cc74aa..4137681e 100644 --- a/dev/sidekick/Sidekick_core/CC_view/index.html +++ b/dev/sidekick/Sidekick_core/CC_view/index.html @@ -1,2 +1,2 @@ -CC_view (sidekick.Sidekick_core.CC_view)

Module Sidekick_core.CC_view

View terms through the lens of the Congruence Closure

type ('f, 't, 'ts) t =
| Bool of bool
| App_fun of 'f * 'ts
| App_ho of 't * 't
| If of 't * 't * 't
| Eq of 't * 't
| Not of 't
| Opaque of 't

A view of a term fron the point of view of the congruence closure.

  • 'f is the type of function symbols
  • 't is the type of terms
  • 'ts is the type of sequences of terms (arguments of function application)
val map_view : f_f:('a -> 'b) -> f_t:('c -> 'd) -> f_ts:('e -> 'f) -> ('a'c'e) t -> ('b'd'f) t

Map function over a view, one level deep. Each function maps over a different type, e.g. f_t maps over terms

val iter_view : f_f:('a -> unit) -> f_t:('b -> unit) -> f_ts:('c -> unit) -> ('a'b'c) t -> unit

Iterate over a view, one level deep.

\ No newline at end of file +CC_view (sidekick.Sidekick_core.CC_view)

Module Sidekick_core.CC_view

View terms through the lens of the Congruence Closure

type ('f, 't, 'ts) t =
| Bool of bool
| App_fun of 'f * 'ts
| App_ho of 't * 't
| If of 't * 't * 't
| Eq of 't * 't
| Not of 't
| Opaque of 't

A view of a term fron the point of view of the congruence closure.

  • 'f is the type of function symbols
  • 't is the type of terms
  • 'ts is the type of sequences of terms (arguments of function application)
val map_view : f_f:('a -> 'b) -> f_t:('c -> 'd) -> f_ts:('e -> 'f) -> ('a'c'e) t -> ('b'd'f) t

Map function over a view, one level deep. Each function maps over a different type, e.g. f_t maps over terms

val iter_view : f_f:('a -> unit) -> f_t:('b -> unit) -> f_ts:('c -> unit) -> ('a'b'c) t -> unit

Iterate over a view, one level deep.

\ 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 87b03f53..e6fcef93 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
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 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 a9255834..f9e91649 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html index c1e2e38a..8b0671d0 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 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 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 +N (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 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 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_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 d73da31a..3d41585a 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 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 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 6f5b9c8f..df31d748 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

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 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 index 0f1ca5ba..965ceb8f 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 7d5fde75..9be3ebea 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

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 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 2df89828..00a662de 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.

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_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html index 8886b880..7109df9f 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html index 950647c2..ab5817f4 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 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
+Term (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 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
diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html
index c8a28ed2..df36d845 100644
--- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.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 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_core/Monoid_of_repr/argument-1-M/SI/T/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html index f898a41d..c5ba24b3 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.T)

Module SI.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_core.Monoid_of_repr.1-M.SI.T)

Module SI.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_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 a32a66d1..13e43d4f 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 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 diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html index 06851994..7be16e1b 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html @@ -1,2 +1,2 @@ -1-M (sidekick.Sidekick_core.Monoid_of_repr.1-M)

Parameter Monoid_of_repr.1-M

type t

Some type with a monoid structure

val pp : t Fmt.printer
val name : string

name of the monoid structure (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, must return maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result

Monoidal combination of two values.

merge cc n1 mon1 n2 mon2 expl returns the result of merging monoid values mon1 (for class n1) and mon2 (for class n2) when n1 and n2 are merged with explanation expl.

returns

Ok mon if the merge is acceptable, annotating the class of n1 ∪ n2; or Error expl' if the merge is unsatisfiable. expl' can then be used to trigger a conflict and undo the merge.

\ No newline at end of file +1-M (sidekick.Sidekick_core.Monoid_of_repr.1-M)

Parameter Monoid_of_repr.1-M

type t

Some type with a monoid structure

val pp : t Fmt.printer
val name : string

name of the monoid structure (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, must return maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result

Monoidal combination of two values.

merge cc n1 mon1 n2 mon2 expl returns the result of merging monoid values mon1 (for class n1) and mon2 (for class n2) when n1 and n2 are merged with explanation expl.

returns

Ok mon if the merge is acceptable, annotating the class of n1 ∪ n2; or Error expl' if the merge is unsatisfiable. expl' can then be used to trigger a conflict and undo the merge.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html index a059cbd3..cf184099 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/index.html @@ -1,2 +1,2 @@ -Monoid_of_repr (sidekick.Sidekick_core.Monoid_of_repr)

Module Sidekick_core.Monoid_of_repr

State for a per-equivalence-class monoid.

Helps keep track of monoid state per equivalence class. A theory might use one or more instance(s) of this to aggregate some theory-specific state over all terms, with the information of what terms are already known to be equal potentially saving work for the theory.

Parameters

Signature

type t
val create_and_setup : ?⁠size:int -> M.SI.t -> t

Create a new monoid state

val push_level : t -> unit

Push backtracking point

val pop_levels : t -> int -> unit

Pop n backtracking points

val mem : t -> M.SI.CC.N.t -> bool

Does the CC node have a monoid value?

val get : t -> M.SI.CC.N.t -> M.t option

Get monoid value for this CC node, if any

val iter_all : t -> (M.SI.CC.repr * M.t) Iter.t
val pp : t Fmt.printer
\ No newline at end of file +Monoid_of_repr (sidekick.Sidekick_core.Monoid_of_repr)

Module Sidekick_core.Monoid_of_repr

State for a per-equivalence-class monoid.

Helps keep track of monoid state per equivalence class. A theory might use one or more instance(s) of this to aggregate some theory-specific state over all terms, with the information of what terms are already known to be equal potentially saving work for the theory.

Parameters

Signature

type t
val create_and_setup : ?⁠size:int -> M.SI.t -> t

Create a new monoid state

val push_level : t -> unit

Push backtracking point

val pop_levels : t -> int -> unit

Pop n backtracking points

val mem : t -> M.SI.CC.N.t -> bool

Does the CC node have a monoid value?

val get : t -> M.SI.CC.N.t -> M.t option

Get monoid value for this CC node, if any

val iter_all : t -> (M.SI.CC.repr * M.t) Iter.t
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/index.html b/dev/sidekick/Sidekick_core/index.html index 437d6a16..3a829a96 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 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 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 588f9eb3..76108f17 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
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 index 3c09283a..bd0955c3 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 0d9cf1d7..4f0cce39 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

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 diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html index f3847fc9..a68ccf9c 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.CC_ACTIONS.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.CC_ACTIONS.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html index b28098b1..57d0b037 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.CC_ACTIONS.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 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
+Term (sidekick.Sidekick_core.CC_ACTIONS.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html
index a41594ae..e620d174 100644
--- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.CC_ACTIONS.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.CC_ACTIONS.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 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_core/module-type-CC_ACTIONS/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html index e5f8c1c0..fbb2e5e1 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.CC_ACTIONS.T)

Module CC_ACTIONS.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_core.CC_ACTIONS.T)

Module CC_ACTIONS.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_core/module-type-CC_ACTIONS/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/index.html index ebafe2a8..fd338b96 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
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 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 7ed0e716..6feafd16 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
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 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 018e6f17..2bd33028 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
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 index 01274370..87af0f2d 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 58d8a8bb..ed63693c 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

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 diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html index 6baddb98..0612c22d 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.CC_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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.CC_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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html index 3dfd7ee2..6d5f0e66 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.CC_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 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
+Term (sidekick.Sidekick_core.CC_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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html
index 119de0f0..5e629d44 100644
--- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.CC_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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.CC_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 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_core/module-type-CC_ARG/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html index 16347797..389da98a 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.CC_ARG.T)

Module CC_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 +T (sidekick.Sidekick_core.CC_ARG.T)

Module CC_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_core/module-type-CC_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/index.html index ee17cdbf..05dfd544 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 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 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 3813a376..5c611fe5 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
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 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 a296eeae..bfdc9fdb 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_proof : P.t -> 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 7528b77f..d30c0c0e 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
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/N/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html index b83281f4..bc4e7e8f 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.CC_S.N)

Module CC_S.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 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 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 +N (sidekick.Sidekick_core.CC_S.N)

Module CC_S.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 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 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_core/module-type-CC_S/P/Quip/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/P/Quip/index.html index 6c3102bc..07e4bdad 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 f18bc77c..2e892053 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

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 diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html index 6d5dec6a..6e33a1e8 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.CC_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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.CC_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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html index 64cbc6b3..fc18e9b4 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.CC_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 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
+Term (sidekick.Sidekick_core.CC_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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html
index 66fc353e..6294cbd6 100644
--- a/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.CC_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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.CC_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 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_core/module-type-CC_S/T/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html index 2f6dd867..9ba293aa 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.CC_S.T)

Module CC_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 +T (sidekick.Sidekick_core.CC_S.T)

Module CC_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_core/module-type-CC_S/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html index dc6e1850..c9bea19f 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.

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 diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html index 4606ebd6..3b4a8daa 100644 --- a/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.LIT.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.LIT.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html index 07af6c08..c90cabec 100644 --- a/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.LIT.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 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
+Term (sidekick.Sidekick_core.LIT.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html
index db221ea5..33cc9f0c 100644
--- a/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.LIT.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.LIT.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 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_core/module-type-LIT/T/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html index 348e30d8..28769b35 100644 --- a/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-LIT/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.LIT.T)

Module LIT.T

Literals depend on terms

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_core.LIT.T)

Module LIT.T

Literals depend on terms

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_core/module-type-LIT/index.html b/dev/sidekick/Sidekick_core/module-type-LIT/index.html index 8866cdb0..69044cbd 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
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/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/index.html index 16f3f520..69fcb60b 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
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 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 15b0aa61..c82a0555 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html index 653b931b..e8dab274 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.MONOID_ARG.SI.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 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 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 +N (sidekick.Sidekick_core.MONOID_ARG.SI.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 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 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_core/module-type-MONOID_ARG/SI/CC/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/index.html index 1ed4bbae..b3526834 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 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 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 511c7218..d63db1c3 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

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 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 index 9ec76687..b5b2bc4a 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 36874c95..e9a8d009 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

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 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 2ef787af..213f8e23 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.

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_core/module-type-MONOID_ARG/SI/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html index 1ddf0cde..15857271 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.MONOID_ARG.SI.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.MONOID_ARG.SI.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html index 2696bc09..7eb07a4d 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.MONOID_ARG.SI.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 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
+Term (sidekick.Sidekick_core.MONOID_ARG.SI.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html
index 3f9f54c9..cc7c49be 100644
--- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.MONOID_ARG.SI.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.MONOID_ARG.SI.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 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_core/module-type-MONOID_ARG/SI/T/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html index 594bd6a7..9bab9b31 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.MONOID_ARG.SI.T)

Module SI.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_core.MONOID_ARG.SI.T)

Module SI.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_core/module-type-MONOID_ARG/SI/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/index.html index 4e98b8d7..e8baf522 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 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 diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html index 83e158a3..0fc2fdf9 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html @@ -1,2 +1,2 @@ -MONOID_ARG (sidekick.Sidekick_core.MONOID_ARG)

Module type Sidekick_core.MONOID_ARG

Helper for the congruence closure

This helps theories keeping track of some state for each class. The state of a class is the monoidal combination of the state for each term in the class (for example, the set of terms in the class whose head symbol is a datatype constructor).

type t

Some type with a monoid structure

val pp : t Fmt.printer
val name : string

name of the monoid structure (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, must return maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result

Monoidal combination of two values.

merge cc n1 mon1 n2 mon2 expl returns the result of merging monoid values mon1 (for class n1) and mon2 (for class n2) when n1 and n2 are merged with explanation expl.

returns

Ok mon if the merge is acceptable, annotating the class of n1 ∪ n2; or Error expl' if the merge is unsatisfiable. expl' can then be used to trigger a conflict and undo the merge.

\ No newline at end of file +MONOID_ARG (sidekick.Sidekick_core.MONOID_ARG)

Module type Sidekick_core.MONOID_ARG

Helper for the congruence closure

This helps theories keeping track of some state for each class. The state of a class is the monoidal combination of the state for each term in the class (for example, the set of terms in the class whose head symbol is a datatype constructor).

type t

Some type with a monoid structure

val pp : t Fmt.printer
val name : string

name of the monoid structure (short)

val of_term : SI.CC.t -> SI.CC.N.t -> SI.T.Term.t -> t option * (SI.CC.N.t * t) list

of_term n t, where t is the term annotating node n, must return maybe_m, l, where:

  • maybe_m = Some m if t has monoid value m; otherwise maybe_m=None
  • l is a list of (u, m_u) where each u's term is a direct subterm of t and m_u is the monoid value attached to u.
val merge : SI.CC.t -> SI.CC.N.t -> t -> SI.CC.N.t -> t -> SI.CC.Expl.t -> (tSI.CC.Expl.t) Stdlib.result

Monoidal combination of two values.

merge cc n1 mon1 n2 mon2 expl returns the result of merging monoid values mon1 (for class n1) and mon2 (for class n2) when n1 and n2 are merged with explanation expl.

returns

Ok mon if the merge is acceptable, annotating the class of n1 ∪ n2; or Error expl' if the merge is unsatisfiable. expl' can then be used to trigger a conflict and undo the merge.

\ 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 index 14610b2b..3da53865 100644 --- a/dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html +++ b/dev/sidekick/Sidekick_core/module-type-PROOF/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 ea545aa7..10162799 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

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 diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html index f7e8acd3..1b0e4708 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 a746f73b..41ea399c 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
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/Model/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html index b1049383..ddcfa85a 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_core.SOLVER.Model)

Module SOLVER.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 Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_core.SOLVER.Model)

Module SOLVER.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 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 index 530c4ad6..1075c0d1 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Quip/index.html @@ -1,2 +1,2 @@ -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 +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 316f0f0b..8cfb9f50 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

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 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 index 70ba1c6d..f0b9325c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/index.html index 11cab0c9..ec5412ac 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
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 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 604f50a4..f4968050 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html index 195534d8..d05c11e6 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.SOLVER.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 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 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 +N (sidekick.Sidekick_core.SOLVER.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 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 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_core/module-type-SOLVER/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/index.html index 5f5ff8fb..dc1a3ab4 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 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 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 4c4148f1..37ee63d8 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.

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_core/module-type-SOLVER/Solver_internal/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/index.html index a59495a4..079fc859 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 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 diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html index 96099b7b..043088fb 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.SOLVER.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.SOLVER.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html index 06b5e05d..a7682e19 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.SOLVER.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 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
+Term (sidekick.Sidekick_core.SOLVER.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html
index 2d157174..1532b31a 100644
--- a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.SOLVER.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.SOLVER.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 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_core/module-type-SOLVER/T/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html index 23837ddc..081728fc 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.SOLVER.T)

Module SOLVER.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_core.SOLVER.T)

Module SOLVER.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_core/module-type-SOLVER/Unknown/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html index 74f2d2f0..97cd0939 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_core.SOLVER.Unknown)

Module SOLVER.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_core.SOLVER.Unknown)

Module SOLVER.Unknown

type t
val pp : t CCFormat.printer
\ 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 15453af3..1c326c1f 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 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 diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html index 068d9fc2..ed067847 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_core.SOLVER.THEORY)

Module type SOLVER.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 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 +THEORY (sidekick.Sidekick_core.SOLVER.THEORY)

Module type SOLVER.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 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_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/index.html index c9b68e35..6ced4189 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
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 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 d86d0e11..b32eec68 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_proof : P.t -> t
val mk_theory : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html index 105a3fa2..bd9e3564 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_core.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 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 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 +N (sidekick.Sidekick_core.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 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 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_core/module-type-SOLVER_INTERNAL/CC/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/index.html index de57f3b3..9e502d35 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 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 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 b15477e6..1d43b3cb 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

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 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 index 45371226..9765eb6f 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 6d23b507..addc4e54 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

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 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 182db6ed..c3cd04c6 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.

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_core/module-type-SOLVER_INTERNAL/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html index c44b2129..dbc8cc41 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.SOLVER_INTERNAL.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.SOLVER_INTERNAL.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html index be3b5ef5..86cda0ba 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.SOLVER_INTERNAL.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 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
+Term (sidekick.Sidekick_core.SOLVER_INTERNAL.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html
index 64f22ecb..ad97bdad 100644
--- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.SOLVER_INTERNAL.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.SOLVER_INTERNAL.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 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_core/module-type-SOLVER_INTERNAL/T/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html index 05a763be..4f5678d1 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_core.SOLVER_INTERNAL.T)

Module SOLVER_INTERNAL.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_core.SOLVER_INTERNAL.T)

Module SOLVER_INTERNAL.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_core/module-type-SOLVER_INTERNAL/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html index 3cfb735c..9297e19f 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 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 diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html index 490824a1..adee7182 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_core.TERM.Fun)

Module TERM.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 Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_core.TERM.Fun)

Module TERM.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 Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html index 03ae57d8..35ae94af 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_core.TERM.Term)

Module TERM.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 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
+Term (sidekick.Sidekick_core.TERM.Term)

Module TERM.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 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
diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html
index d3b15404..39be8427 100644
--- a/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html
+++ b/dev/sidekick/Sidekick_core/module-type-TERM/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_core.TERM.Ty)

Module TERM.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 Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_core.TERM.Ty)

Module TERM.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 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_core/module-type-TERM/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/index.html index 5678d465..4cc7195d 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/index.html @@ -1,2 +1,2 @@ -TERM (sidekick.Sidekick_core.TERM)

Module type Sidekick_core.TERM

Main representation of Terms and Types

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 +TERM (sidekick.Sidekick_core.TERM)

Module type Sidekick_core.TERM

Main representation of Terms and Types

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_memtrace/.dune-keep b/dev/sidekick/Sidekick_memtrace/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_memtrace/index.html b/dev/sidekick/Sidekick_memtrace/index.html new file mode 100644 index 00000000..3ca91306 --- /dev/null +++ b/dev/sidekick/Sidekick_memtrace/index.html @@ -0,0 +1,2 @@ + +Sidekick_memtrace (sidekick.Sidekick_memtrace)

Module Sidekick_memtrace

val trace_if_requested : ?⁠context:string -> ?⁠sampling_rate:float -> unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html index 08987768..d347d64e 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_mini_cc.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 +Fun (sidekick.Sidekick_mini_cc.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_mini_cc/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html index c5906963..acbeed69 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_mini_cc.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
+Term (sidekick.Sidekick_mini_cc.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
diff --git a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html
index 680854fa..66c852ba 100644
--- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_mini_cc.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 +Ty (sidekick.Sidekick_mini_cc.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_mini_cc/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html index 4961b908..a9fff618 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_mini_cc.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_mini_cc.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_mini_cc/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html index abe95a1b..835dafe9 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_mini_cc.Make.1-A)

Parameter Make.1-A

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file +1-A (sidekick.Sidekick_mini_cc.Make.1-A)

Parameter Make.1-A

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/Make/index.html b/dev/sidekick/Sidekick_mini_cc/Make/index.html index 45b79516..26aadae7 100644 --- a/dev/sidekick/Sidekick_mini_cc/Make/index.html +++ b/dev/sidekick/Sidekick_mini_cc/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_mini_cc.Make)

Module Sidekick_mini_cc.Make

Instantiate the congruence closure for the given term structure.

Parameters

Signature

type term = A.T.Term.t
type fun_ = A.T.Fun.t
type term_store = A.T.Term.store
type t

An instance of the congruence closure. Mutable

val create : term_store -> t

New instance

val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p is true if sign, or p is false if not sign. If p is an equation and sign is true, this adds a new equation to the congruence relation.

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable.

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file +Make (sidekick.Sidekick_mini_cc.Make)

Module Sidekick_mini_cc.Make

Instantiate the congruence closure for the given term structure.

Parameters

Signature

type term = A.T.Term.t
type fun_ = A.T.Fun.t
type term_store = A.T.Term.store
type t

An instance of the congruence closure. Mutable

val create : term_store -> t

New instance

val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p is true if sign, or p is false if not sign. If p is an equation and sign is true, this adds a new equation to the congruence relation.

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable.

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/index.html b/dev/sidekick/Sidekick_mini_cc/index.html index e8a3d31f..584b98e8 100644 --- a/dev/sidekick/Sidekick_mini_cc/index.html +++ b/dev/sidekick/Sidekick_mini_cc/index.html @@ -1,2 +1,2 @@ -Sidekick_mini_cc (sidekick.Sidekick_mini_cc)

Module Sidekick_mini_cc

Mini congruence closure

This implementation is as simple as possible, and doesn't provide backtracking, theories, or explanations. It just decides the satisfiability of a set of (dis)equations.

module CC_view = Sidekick_core.CC_view
module type ARG = sig ... end

Argument for the functor Make

module type S = sig ... end

Main signature for an instance of the mini congruence closure

module Make : functor (A : ARG) -> S with type term = A.T.Term.t and type fun_ = A.T.Fun.t and type term_store = A.T.Term.store

Instantiate the congruence closure for the given term structure.

\ No newline at end of file +Sidekick_mini_cc (sidekick.Sidekick_mini_cc)

Module Sidekick_mini_cc

Mini congruence closure

This implementation is as simple as possible, and doesn't provide backtracking, theories, or explanations. It just decides the satisfiability of a set of (dis)equations.

module CC_view = Sidekick_core.CC_view
module type ARG = sig ... end

Argument for the functor Make

module type S = sig ... end

Main signature for an instance of the mini congruence closure

module Make : functor (A : ARG) -> S with type term = A.T.Term.t and type fun_ = A.T.Fun.t and type term_store = A.T.Term.store

Instantiate the congruence closure for the given term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html index e4797893..5636e8b3 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_mini_cc.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 +Fun (sidekick.Sidekick_mini_cc.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_mini_cc/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html index b0768032..2611428e 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_mini_cc.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
+Term (sidekick.Sidekick_mini_cc.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
diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html
index f3629ce3..1af54902 100644
--- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_mini_cc.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 +Ty (sidekick.Sidekick_mini_cc.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_mini_cc/module-type-ARG/T/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html index 3feffe87..afd028b7 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_mini_cc.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 +T (sidekick.Sidekick_mini_cc.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_mini_cc/module-type-ARG/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html index 272d9476..24f520c3 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_mini_cc.ARG)

Module type Sidekick_mini_cc.ARG

Argument for the functor Make

It only requires a term structure, and a congruence-oriented view.

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file +ARG (sidekick.Sidekick_mini_cc.ARG)

Module type Sidekick_mini_cc.ARG

Argument for the functor Make

It only requires a term structure, and a congruence-oriented view.

val cc_view : T.Term.t -> (T.Fun.tT.Term.tT.Term.t Iter.t) CC_view.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html b/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html index b9c97cf4..fc0f4b3b 100644 --- a/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html +++ b/dev/sidekick/Sidekick_mini_cc/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_mini_cc.S)

Module type Sidekick_mini_cc.S

Main signature for an instance of the mini congruence closure

type term
type fun_
type term_store
type t

An instance of the congruence closure. Mutable

val create : term_store -> t

New instance

val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p is true if sign, or p is false if not sign. If p is an equation and sign is true, this adds a new equation to the congruence relation.

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable.

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ No newline at end of file +S (sidekick.Sidekick_mini_cc.S)

Module type Sidekick_mini_cc.S

Main signature for an instance of the mini congruence closure

type term
type fun_
type term_store
type t

An instance of the congruence closure. Mutable

val create : term_store -> t

New instance

val clear : t -> unit

Fully reset the congruence closure's state

val add_lit : t -> term -> bool -> unit

add_lit cc p sign asserts that p is true if sign, or p is false if not sign. If p is an equation and sign is true, this adds a new equation to the congruence relation.

val check_sat : t -> bool

check_sat cc returns true if the current state is satisfiable, false if it's unsatisfiable.

val classes : t -> term Iter.t Iter.t

Traverse the set of classes in the congruence closure. This should be called only if check returned Sat.

\ 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 index 7978695e..07d3af10 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 index b50aa61a..1ebf9d51 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Lit/index.html @@ -1,2 +1,2 @@ -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 +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 index ce95fb73..eb7aa3d1 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Model/index.html @@ -1,2 +1,2 @@ -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 +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 index 62dbd16c..1da2fe98 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Pre_proof/index.html @@ -1,2 +1,2 @@ -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 +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 index 7c07901e..bc63bd2b 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index ddb7f546..4e2aeffa 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 6c3fd7d9..cb38e7b6 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index d25407df..46ce22c0 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/CC/index.html @@ -1,2 +1,2 @@ -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 +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 index 8de64ea4..0a14b6cc 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -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 +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 index 4718c956..7a0214e5 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Solver_internal/index.html @@ -1,2 +1,2 @@ -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 +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 index a61ae966..a75aaded 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_msat_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +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 index 9503892d..5e35c2ff 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index c478583f..db0fb900 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index a114c4b0..fc908147 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 3e2bb61b..a260a083 100644 --- 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 @@ -1,5 +1,5 @@ -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
+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
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
index a991dfb5..e38f5700 100644
--- 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
@@ -1,2 +1,2 @@
 
-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 +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/T/index.html b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html index c7ea0525..2a4faf23 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/T/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/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_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 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 index 3eb939c6..3b53f131 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -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 +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 index c34c0d1e..398560a9 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/index.html @@ -1,2 +1,2 @@ -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 +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 index c5663e8e..ae1d5d9c 100644 --- a/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_msat_solver/Make/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -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 +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 index 791da306..fa213543 100644 --- a/dev/sidekick/Sidekick_msat_solver/index.html +++ b/dev/sidekick/Sidekick_msat_solver/index.html @@ -1,2 +1,2 @@ -Sidekick_msat_solver (sidekick.Sidekick_msat_solver)

Module Sidekick_msat_solver

Implementation of a Solver using Msat

module Log = Msat.Log

A logging module

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 +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 index 66b8ebf9..832ffbed 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 127de243..f795f81a 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/P/index.html @@ -1,2 +1,2 @@ -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 +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 index 59fbe45b..e5fab2e0 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 037b36be..4fd54db4 100644 --- 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 @@ -1,5 +1,5 @@ -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
+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
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
index 5520b194..df3f6f01 100644
--- 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
@@ -1,2 +1,2 @@
 
-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 +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 index f361e588..e7d471a9 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/T/index.html @@ -1,2 +1,2 @@ -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 +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 index 3a824daf..37b60ca5 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-ARG/index.html @@ -1,2 +1,2 @@ -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 +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 index 5c64afb9..835b5f0b 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Atom/index.html @@ -1,2 +1,2 @@ -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 +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 index bdfc90e9..2ec441be 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Lit/index.html @@ -1,2 +1,2 @@ -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 +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 index dee3dbfa..f95b4951 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Model/index.html @@ -1,2 +1,2 @@ -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 +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 index d7f9df09..98d5da7d 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 110a3949..c87e354a 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/P/index.html @@ -1,2 +1,2 @@ -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 +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 index 3a871868..1ec8f3b7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 83e0a321..12ad623b 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 49675d21..f2f77b1c 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index dd3cd1c6..4f90a10e 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 0658872a..0e81ea2b 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index 283c5bdc..78f90f3d 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index a1ae7c7c..6f194689 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index edc490f5..b6f39f34 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 index b33a9a4a..cac7572f 100644 --- 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 @@ -1,5 +1,5 @@ -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
+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
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
index e3998928..b2dcfe45 100644
--- 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
@@ -1,2 +1,2 @@
 
-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 +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 index 044ebd30..aa156bb5 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/T/index.html @@ -1,2 +1,2 @@ -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 +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 index e6b557b5..5e4d2609 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_msat_solver.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +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 index 9726f568..35a8d0cc 100644 --- a/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html +++ b/dev/sidekick/Sidekick_msat_solver/module-type-S/index.html @@ -1,2 +1,2 @@ -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 +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 index f0278bfe..2afc62df 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/.dune-keep b/dev/sidekick/Sidekick_sat/.dune-keep new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..6fcf7917 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..5dc22a46 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..85eef5e8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..9105b121 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html new file mode 100644 index 00000000..60642e26 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html new file mode 100644 index 00000000..f3c95901 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..52ab929a --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..a046c63b --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..fe87e1d4 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..dfc345cd --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html new file mode 100644 index 00000000..d0dbcd7c --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html new file mode 100644 index 00000000..90b933a7 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/Solver/index.html b/dev/sidekick/Sidekick_sat/Solver/index.html new file mode 100644 index 00000000..afc8fa5f --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..278a7435 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..a794bf65 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..ff2e3c6d --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html new file mode 100644 index 00000000..a69e6ddb --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/Proof/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html new file mode 100644 index 00000000..3d015727 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/index.html new file mode 100644 index 00000000..d6dba15c --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..489cae8c --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..8b83b1f4 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-FORMULA/index.html @@ -0,0 +1,2 @@ + +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-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html new file mode 100644 index 00000000..73307317 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html new file mode 100644 index 00000000..51829e6f --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..2cb60f0b --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html new file mode 100644 index 00000000..53911852 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..f127632d --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PROOF/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..0ee76f29 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..f7103c35 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..202eccc0 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html new file mode 100644 index 00000000..412dccdd --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..2f2dbd61 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..9f145de2 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..6e216d66 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/index.html b/dev/sidekick/Sidekick_sat/index.html new file mode 100644 index 00000000..19f95456 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html new file mode 100644 index 00000000..0224533c --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-ACTS/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html b/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html new file mode 100644 index 00000000..94570dd6 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-FORMULA/index.html @@ -0,0 +1,2 @@ + +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-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html new file mode 100644 index 00000000..91a7b3e9 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html new file mode 100644 index 00000000..8d7b3fe1 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-PLUGIN_CDCL_T/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html b/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html new file mode 100644 index 00000000..82366715 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-PROOF/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html new file mode 100644 index 00000000..454c2b2d --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..3f26fd83 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/Clause/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html new file mode 100644 index 00000000..070dcdec --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html new file mode 100644 index 00000000..0046c1f0 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/Proof/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-S/index.html b/dev/sidekick/Sidekick_sat/module-type-S/index.html new file mode 100644 index 00000000..76ab1e2b --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html new file mode 100644 index 00000000..7de3aae8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat/module-type-SAT_STATE/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/.dune-keep b/dev/sidekick/Sidekick_sat__/.dune-keep new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..f7e19fcb --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap/Make/argument-1-X/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Heap/Make/index.html b/dev/sidekick/Sidekick_sat__/Heap/Make/index.html new file mode 100644 index 00000000..0bd1fff1 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap/Make/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Heap/index.html b/dev/sidekick/Sidekick_sat__/Heap/index.html new file mode 100644 index 00000000..42b0c1a4 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html new file mode 100644 index 00000000..1fbcc741 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap/module-type-RANKED/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html new file mode 100644 index 00000000..8e523db2 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Heap_intf/index.html b/dev/sidekick/Sidekick_sat__/Heap_intf/index.html new file mode 100644 index 00000000..2aba3366 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap_intf/index.html @@ -0,0 +1,2 @@ + +Heap_intf (sidekick.Sidekick_sat__.Heap_intf)

Module Sidekick_sat__.Heap_intf

module type RANKED = sig ... end
module type S = sig ... end
\ 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 new file mode 100644 index 00000000..9751f4a8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-RANKED/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..98f6d0b3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Heap_intf/module-type-S/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..6d647dd7 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..5d69a761 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..1d7bddaa --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..f0ab4f8a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html new file mode 100644 index 00000000..92e5701d --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html new file mode 100644 index 00000000..99a0f089 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_cdcl_t/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..35a688ed --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..d7153d3c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..9b27cc62 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..7afff8be --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html new file mode 100644 index 00000000..86f9e4c2 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html new file mode 100644 index 00000000..fd058a4f --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/Make_pure_sat/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Solver/index.html b/dev/sidekick/Sidekick_sat__/Solver/index.html new file mode 100644 index 00000000..97ff6359 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..b2424963 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..ea030353 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..148118a7 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html new file mode 100644 index 00000000..c32c3f6b --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/Proof/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html new file mode 100644 index 00000000..aa5641da --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/Solver_intf/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/index.html new file mode 100644 index 00000000..dbb68a9a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..939dcd10 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-ACTS/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..d7dce317 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-FORMULA/index.html @@ -0,0 +1,2 @@ + +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-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html new file mode 100644 index 00000000..26c59969 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html new file mode 100644 index 00000000..e9ddc319 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..1f84fbb8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html new file mode 100644 index 00000000..827e9b75 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PLUGIN_SAT/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..64d43958 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-PROOF/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..b82bd2d3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..2d48bd19 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..97f86186 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html new file mode 100644 index 00000000..2a565a3c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/Proof/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..e1e7d64e --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-S/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..d1c4083e --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-SAT_STATE/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..8d338ef8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/Solver_intf/module-type-UNSAT_STATE/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__/index.html b/dev/sidekick/Sidekick_sat__/index.html new file mode 100644 index 00000000..11825a7a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__/index.html @@ -0,0 +1,2 @@ + +Sidekick_sat__ (sidekick.Sidekick_sat__)

Module Sidekick_sat__

module Heap : sig ... end
module Heap_intf : sig ... end
module Solver : sig ... end
module Solver_intf : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/.dune-keep b/dev/sidekick/Sidekick_sat__Heap/.dune-keep new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..33651388 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap/Make/argument-1-X/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Heap/Make/index.html b/dev/sidekick/Sidekick_sat__Heap/Make/index.html new file mode 100644 index 00000000..975d546a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap/Make/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Heap/index.html b/dev/sidekick/Sidekick_sat__Heap/index.html new file mode 100644 index 00000000..7e440f3e --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html b/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html new file mode 100644 index 00000000..3cf99565 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap/module-type-RANKED/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html new file mode 100644 index 00000000..5b55015c --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Heap_intf/.dune-keep b/dev/sidekick/Sidekick_sat__Heap_intf/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_sat__Heap_intf/index.html b/dev/sidekick/Sidekick_sat__Heap_intf/index.html new file mode 100644 index 00000000..0b9abf52 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap_intf/index.html @@ -0,0 +1,2 @@ + +Sidekick_sat__Heap_intf (sidekick.Sidekick_sat__Heap_intf)

Module Sidekick_sat__Heap_intf

module type RANKED = sig ... end
module type S = sig ... end
\ 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 new file mode 100644 index 00000000..91886360 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-RANKED/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..4fa32704 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Heap_intf/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver/.dune-keep b/dev/sidekick/Sidekick_sat__Solver/.dune-keep new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..06856e0a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..679b1a3d --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..103b5329 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..8877acaa --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html new file mode 100644 index 00000000..40b257e1 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html new file mode 100644 index 00000000..fac3d6b5 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_cdcl_t/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..94bf3155 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..2c2bf122 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..7b03a223 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/Proof/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..b5f9712a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html new file mode 100644 index 00000000..935ffa27 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/argument-1-Th/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html new file mode 100644 index 00000000..d4c7e0a3 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/Make_pure_sat/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver/index.html b/dev/sidekick/Sidekick_sat__Solver/index.html new file mode 100644 index 00000000..b2944dd5 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..d8bf3209 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..4b65339a --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..4b139269 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html new file mode 100644 index 00000000..d555fef1 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/Proof/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html b/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html new file mode 100644 index 00000000..973c6e13 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver/module-type-S/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/.dune-keep b/dev/sidekick/Sidekick_sat__Solver_intf/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/index.html new file mode 100644 index 00000000..650b37ee --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..16004180 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-ACTS/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..8e45ee27 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-FORMULA/index.html @@ -0,0 +1,2 @@ + +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-PLUGIN_CDCL_T/Formula/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html new file mode 100644 index 00000000..ff0dbf25 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html new file mode 100644 index 00000000..1c3f8b17 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..39b99a00 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/Formula/index.html @@ -0,0 +1,2 @@ + +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/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html new file mode 100644 index 00000000..2ac363fd --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PLUGIN_SAT/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..4270ec55 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-PROOF/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..9954b4bb --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Atom/index.html @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000..4ca408ce --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Clause/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..1010acb8 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Formula/index.html @@ -0,0 +1,2 @@ + +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/Proof/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html new file mode 100644 index 00000000..e8ae105f --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/Proof/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..2a7f512b --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-S/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..b443862d --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-SAT_STATE/index.html @@ -0,0 +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 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 new file mode 100644 index 00000000..4c795e41 --- /dev/null +++ b/dev/sidekick/Sidekick_sat__Solver_intf/module-type-UNSAT_STATE/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_sigs/index.html b/dev/sidekick/Sidekick_sigs/index.html index ec86b598..4b2db938 100644 --- a/dev/sidekick/Sidekick_sigs/index.html +++ b/dev/sidekick/Sidekick_sigs/index.html @@ -1,2 +1,2 @@ -Sidekick_sigs (sidekick.Sidekick_sigs)

Module Sidekick_sigs

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
\ No newline at end of file +Sidekick_sigs (sidekick.Sidekick_sigs)

Module Sidekick_sigs

module type EQ = sig ... end
module type ORD = sig ... end
module type HASH = sig ... end
module type PRINT = sig ... end
type 'a printer = Stdlib.Format.formatter -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sigs/module-type-EQ/index.html b/dev/sidekick/Sidekick_sigs/module-type-EQ/index.html index 072070f5..b92bb1d0 100644 --- a/dev/sidekick/Sidekick_sigs/module-type-EQ/index.html +++ b/dev/sidekick/Sidekick_sigs/module-type-EQ/index.html @@ -1,2 +1,2 @@ -EQ (sidekick.Sidekick_sigs.EQ)

Module type Sidekick_sigs.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file +EQ (sidekick.Sidekick_sigs.EQ)

Module type Sidekick_sigs.EQ

type t
val equal : t -> t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sigs/module-type-HASH/index.html b/dev/sidekick/Sidekick_sigs/module-type-HASH/index.html index 2a85ad98..faf36691 100644 --- a/dev/sidekick/Sidekick_sigs/module-type-HASH/index.html +++ b/dev/sidekick/Sidekick_sigs/module-type-HASH/index.html @@ -1,2 +1,2 @@ -HASH (sidekick.Sidekick_sigs.HASH)

Module type Sidekick_sigs.HASH

type t
val hash : t -> int
\ No newline at end of file +HASH (sidekick.Sidekick_sigs.HASH)

Module type Sidekick_sigs.HASH

type t
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sigs/module-type-ORD/index.html b/dev/sidekick/Sidekick_sigs/module-type-ORD/index.html index 62a48f27..4174ef3d 100644 --- a/dev/sidekick/Sidekick_sigs/module-type-ORD/index.html +++ b/dev/sidekick/Sidekick_sigs/module-type-ORD/index.html @@ -1,2 +1,2 @@ -ORD (sidekick.Sidekick_sigs.ORD)

Module type Sidekick_sigs.ORD

type t
val compare : t -> t -> int
\ No newline at end of file +ORD (sidekick.Sidekick_sigs.ORD)

Module type Sidekick_sigs.ORD

type t
val compare : t -> t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sigs/module-type-PRINT/index.html b/dev/sidekick/Sidekick_sigs/module-type-PRINT/index.html index d7f2031b..843fefbf 100644 --- a/dev/sidekick/Sidekick_sigs/module-type-PRINT/index.html +++ b/dev/sidekick/Sidekick_sigs/module-type-PRINT/index.html @@ -1,2 +1,2 @@ -PRINT (sidekick.Sidekick_sigs.PRINT)

Module type Sidekick_sigs.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file +PRINT (sidekick.Sidekick_sigs.PRINT)

Module type Sidekick_sigs.PRINT

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_tef/index.html b/dev/sidekick/Sidekick_tef/index.html index 4d356c01..a830c4b5 100644 --- a/dev/sidekick/Sidekick_tef/index.html +++ b/dev/sidekick/Sidekick_tef/index.html @@ -1,2 +1,2 @@ -Sidekick_tef (sidekick.Sidekick_tef)

Module Sidekick_tef

Tracing Event Format

A nice profiling format based on json, useful for visualizing what goes on. It provides a backend for Sidekick_util.Profile so that profiling probes will emit TEF events.

Profiling is enabled if setup is called, and if the environment variable "TEF" is set to "1" or "true". The trace is emitted in the file "trace.json.gz" in the directory where the solver is launched; you can open it in chrome/chromium at "chrome://tracing".

Tracy can import (uncompressed) trace files with a nice native trace explorer.

See the documentation of TEF

val setup : unit -> unit

Install the TEF logger as a profiling backend.

val teardown : unit -> unit
\ No newline at end of file +Sidekick_tef (sidekick.Sidekick_tef)

Module Sidekick_tef

Tracing Event Format

A nice profiling format based on json, useful for visualizing what goes on. It provides a backend for Sidekick_util.Profile so that profiling probes will emit TEF events.

Profiling is enabled if setup is called, and if the environment variable "TEF" is set to "1" or "true". The trace is emitted in the file "trace.json.gz" in the directory where the solver is launched; you can open it in chrome/chromium at "chrome://tracing".

Tracy can import (uncompressed) trace files with a nice native trace explorer.

See the documentation of TEF

val setup : unit -> unit

Install the TEF logger as a profiling backend.

val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html index 9e886b8e..4fe6c932 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.Make.1-A.Gensym)

Module 1-A.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.Make.1-A.Gensym)

Module 1-A.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ 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 index f32252aa..b7c05584 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 7fcca7c8..bc268257 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
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/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html index 3927d740..dd31222c 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.Make.1-A.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 +Model (sidekick.Sidekick_th_bool_static.Make.1-A.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_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 index 990ff194..335512c3 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 9a349065..10fa7377 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

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_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 index 4354d0cf..9cc755f7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index bd364e48..f836270f 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
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_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 05bd6920..55e9e0dc 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html index fa3d4e00..983600b2 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.Make.1-A.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 +N (sidekick.Sidekick_th_bool_static.Make.1-A.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_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 9bb98651..7c28a038 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 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_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 822992a7..f1d20d62 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.

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_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 883e141a..9cace420 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 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_th_bool_static/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html index 3bb4aac5..c324015e 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_bool_static.Make.1-A.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 +Fun (sidekick.Sidekick_th_bool_static.Make.1-A.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_th_bool_static/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html index a138d861..1d6d9d99 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_bool_static.Make.1-A.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
+Term (sidekick.Sidekick_th_bool_static.Make.1-A.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
diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html
index e0f2e9f2..15e91544 100644
--- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_bool_static.Make.1-A.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 +Ty (sidekick.Sidekick_th_bool_static.Make.1-A.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_th_bool_static/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html index eff79659..b4daf4c1 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_bool_static.Make.1-A.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 +T (sidekick.Sidekick_th_bool_static.Make.1-A.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_th_bool_static/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html index c0006c2c..8a60c8c4 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 b5a65dc7..df8505a3 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 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_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html index 95238598..4db25d94 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.Make.1-A.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 +THEORY (sidekick.Sidekick_th_bool_static.Make.1-A.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/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/index.html index 9c4ef1c8..493a870e 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 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 diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/index.html index 5194a8db..a41a7174 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_th_bool_static.Make)

Module Sidekick_th_bool_static.Make

Parameters

Signature

module A = A
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

preprocesses formulas by giving them names and adding clauses to equate the name with the boolean formula.

val theory : A.S.theory

A theory that can be added to the solver A.S.

This theory does most of its work during preprocessing, turning boolean formulas into SAT clauses via the Tseitin encoding .

\ No newline at end of file +Make (sidekick.Sidekick_th_bool_static.Make)

Module Sidekick_th_bool_static.Make

Parameters

Signature

module A = A
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

preprocesses formulas by giving them names and adding clauses to equate the name with the boolean formula.

val theory : A.S.theory

A theory that can be added to the solver A.S.

This theory does most of its work during preprocessing, turning boolean formulas into SAT clauses via the Tseitin encoding .

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/index.html b/dev/sidekick/Sidekick_th_bool_static/index.html index f22b15be..1dd8a18d 100644 --- a/dev/sidekick/Sidekick_th_bool_static/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/index.html @@ -1,2 +1,2 @@ -Sidekick_th_bool_static (sidekick.Sidekick_th_bool_static)

Module Sidekick_th_bool_static

Theory of boolean formulas.

This handles formulas containing "and", "or", "=>", "if-then-else", etc.

type ('a, 'args) bool_view =
| B_bool of bool
| B_not of 'a
| B_and of 'args
| B_or of 'args
| B_imply of 'args * 'a
| B_equiv of 'a * 'a
| B_xor of 'a * 'a
| B_eq of 'a * 'a
| B_neq of 'a * 'a
| B_ite of 'a * 'a * 'a
| B_opaque_bool of 'a
| B_atom of 'a

Boolean-oriented view of terms

module type ARG = sig ... end

Argument to the theory

module type S = sig ... end

Signature

module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_th_bool_static (sidekick.Sidekick_th_bool_static)

Module Sidekick_th_bool_static

Theory of boolean formulas.

This handles formulas containing "and", "or", "=>", "if-then-else", etc.

type ('a, 'args) bool_view =
| B_bool of bool
| B_not of 'a
| B_and of 'args
| B_or of 'args
| B_imply of 'args * 'a
| B_equiv of 'a * 'a
| B_xor of 'a * 'a
| B_eq of 'a * 'a
| B_neq of 'a * 'a
| B_ite of 'a * 'a * 'a
| B_opaque_bool of 'a
| B_atom of 'a

Boolean-oriented view of terms

module type ARG = sig ... end

Argument to the theory

module type S = sig ... end

Signature

module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html index cfe560e2..3223b9a2 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.ARG.Gensym)

Module ARG.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.ARG.Gensym)

Module ARG.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ 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 index ce40043b..4d206933 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 5f8b3ad1..90fe2537 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
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/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html index 87f4babd..3d037e2e 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.ARG.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 +Model (sidekick.Sidekick_th_bool_static.ARG.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_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 index 801367b3..29a4906c 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 20a41f01..73145d19 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

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_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 index 4c94c595..97f06e85 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/index.html index d5e4d844..03c3e6cf 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
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_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 b79df1c4..46a82c69 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html index 9ddd4aaf..891a089b 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.ARG.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 +N (sidekick.Sidekick_th_bool_static.ARG.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_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 5b15d3ac..c9f9fcaa 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 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_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 d6c3b4f3..23286068 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.

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_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 e37758f9..ce34787d 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 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_th_bool_static/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html index af4131a7..6e2ee23f 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_bool_static.ARG.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 +Fun (sidekick.Sidekick_th_bool_static.ARG.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_th_bool_static/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html index 96d0c7a0..4502c871 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_bool_static.ARG.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
+Term (sidekick.Sidekick_th_bool_static.ARG.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
diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html
index 88c23f2a..1dcb4394 100644
--- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_bool_static.ARG.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 +Ty (sidekick.Sidekick_th_bool_static.ARG.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_th_bool_static/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html index 0bc77b90..9bf26ed3 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_bool_static.ARG.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 +T (sidekick.Sidekick_th_bool_static.ARG.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_th_bool_static/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html index 4f929614..15c54d30 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 5e866d17..463038b3 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 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_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html index eb7dc26d..abb716df 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.ARG.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 +THEORY (sidekick.Sidekick_th_bool_static.ARG.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/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/index.html index 441d2cab..58d51075 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 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 diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html index c12e890d..95731da4 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/Gensym/index.html @@ -1,2 +1,2 @@ -Gensym (sidekick.Sidekick_th_bool_static.S.A.Gensym)

Module A.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ No newline at end of file +Gensym (sidekick.Sidekick_th_bool_static.S.A.Gensym)

Module A.Gensym

Fresh symbol generator.

The theory needs to be able to create new terms with fresh names, to be used as placeholders for complex formulas during Tseitin encoding.

type t
val create : S.T.Term.store -> t

New (stateful) generator instance.

val fresh_term : t -> pre:string -> S.T.Ty.t -> term

Make a fresh term of the given type

\ 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 index 2fdf4c44..48635b54 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 8143ac61..45a1f906 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
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/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html index e074a6b2..e5a49419 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_bool_static.S.A.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 +Model (sidekick.Sidekick_th_bool_static.S.A.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_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 index e907578f..a581897d 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 73a6c8f0..1ba164da 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

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_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 index 2d841d29..0e2e9399 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/index.html index 7713d839..d388d786 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
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_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 f3a31133..93574be5 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html index 4d37b439..8eb05bba 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_bool_static.S.A.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 +N (sidekick.Sidekick_th_bool_static.S.A.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_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 6ea0eb16..da8a6755 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 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_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 dd222249..7933d733 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.

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_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 4fd5c077..909432f5 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 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_th_bool_static/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html index ad05fd68..5f8134bd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_bool_static.S.A.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 +Fun (sidekick.Sidekick_th_bool_static.S.A.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_th_bool_static/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html index a1df9c29..82a639a1 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_bool_static.S.A.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
+Term (sidekick.Sidekick_th_bool_static.S.A.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
diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html
index ae16f7af..88fee183 100644
--- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_bool_static.S.A.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 +Ty (sidekick.Sidekick_th_bool_static.S.A.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_th_bool_static/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html index 8f10e6ee..90520b66 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_bool_static.S.A.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 +T (sidekick.Sidekick_th_bool_static.S.A.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_th_bool_static/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html index e38092c9..508ca539 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_bool_static.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_bool_static.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 6da0fe5a..41551ddd 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 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_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html index fcd2937a..9b698582 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_bool_static.S.A.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 +THEORY (sidekick.Sidekick_th_bool_static.S.A.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/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/index.html index 5c0d1e99..cd9c3307 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 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 diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html index cc84922e..7af00cb8 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_bool_static.S)

Module type Sidekick_th_bool_static.S

Signature

module A : ARG
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

preprocesses formulas by giving them names and adding clauses to equate the name with the boolean formula.

val theory : A.S.theory

A theory that can be added to the solver A.S.

This theory does most of its work during preprocessing, turning boolean formulas into SAT clauses via the Tseitin encoding .

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.S)

Module type Sidekick_th_bool_static.S

Signature

module A : ARG
type state
val create : A.S.T.Term.store -> A.S.T.Ty.store -> state
val simplify : state -> A.S.Solver_internal.simplify_hook

Simplify given term

val cnf : state -> A.S.Solver_internal.preprocess_hook

preprocesses formulas by giving them names and adding clauses to equate the name with the boolean formula.

val theory : A.S.theory

A theory that can be added to the solver A.S.

This theory does most of its work during preprocessing, turning boolean formulas into SAT clauses via the Tseitin encoding .

\ 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 index a31a20b6..37bb77ab 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 52eb680e..7d5d8fa4 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
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/Model/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html index 81302128..fcd2060e 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_cstor.Make.1-A.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 +Model (sidekick.Sidekick_th_cstor.Make.1-A.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_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 index a1b51e56..feed8990 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 308d7a9a..7c07fbcc 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

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_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 index 81188fec..be295eac 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index 3afde425..68caa03b 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
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_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 70c0f423..c3942d03 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html index c13e947a..cc83b2e8 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_cstor.Make.1-A.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 +N (sidekick.Sidekick_th_cstor.Make.1-A.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_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 53dbfdef..bfe91c37 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 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_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 eb6543cd..da5d4591 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.

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_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 50aedd70..0e4d60ee 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 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_th_cstor/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html index 57a87a16..9dea9e69 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_cstor.Make.1-A.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 +Fun (sidekick.Sidekick_th_cstor.Make.1-A.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_th_cstor/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html index a3715e45..4d71a9af 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_cstor.Make.1-A.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
+Term (sidekick.Sidekick_th_cstor.Make.1-A.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
diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html
index 58f54adb..7159f1b4 100644
--- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_cstor.Make.1-A.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 +Ty (sidekick.Sidekick_th_cstor.Make.1-A.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_th_cstor/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html index d3d59ff3..4d28795f 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_cstor.Make.1-A.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 +T (sidekick.Sidekick_th_cstor.Make.1-A.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_th_cstor/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html index f1c64d94..a6ee4a4a 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_cstor.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_cstor.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 1e9b2c2a..60d2e23b 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 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_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html index 3910b929..167bed62 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_cstor.Make.1-A.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 +THEORY (sidekick.Sidekick_th_cstor.Make.1-A.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_cstor/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/index.html index bbf0ab4a..791ca8f4 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
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/index.html b/dev/sidekick/Sidekick_th_cstor/Make/index.html index 850120f2..9dc5fee9 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_th_cstor.Make)

Module Sidekick_th_cstor.Make

Parameters

Signature

module A = A
val theory : A.S.theory
\ No newline at end of file +Make (sidekick.Sidekick_th_cstor.Make)

Module Sidekick_th_cstor.Make

Parameters

Signature

module A = A
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/index.html b/dev/sidekick/Sidekick_th_cstor/index.html index 0a08d33a..c5a3b07a 100644 --- a/dev/sidekick/Sidekick_th_cstor/index.html +++ b/dev/sidekick/Sidekick_th_cstor/index.html @@ -1,2 +1,2 @@ -Sidekick_th_cstor (sidekick.Sidekick_th_cstor)

Module Sidekick_th_cstor

Theory for constructors

type ('c, 't) cstor_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t
| T_other of 't
val name : string
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_th_cstor (sidekick.Sidekick_th_cstor)

Module Sidekick_th_cstor

Theory for constructors

type ('c, 't) cstor_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t
| T_other of 't
val name : string
module type ARG = sig ... end
module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ 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 index 014fe15d..f1c68f48 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 ac14b2ed..a2e33b6c 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
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/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html index 406e1e42..ed13a132 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_cstor.ARG.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 +Model (sidekick.Sidekick_th_cstor.ARG.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_th_cstor/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Quip/index.html index 2b129909..139908ab 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 89e76dc1..5daa188e 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

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_th_cstor/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Pre_proof/index.html index 3330d31b..590b1bd7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/index.html index dc3e32db..09f0e5c8 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
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_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 ea8f9193..c16f9329 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html index d5b3ae77..bb651794 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_cstor.ARG.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 +N (sidekick.Sidekick_th_cstor.ARG.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_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 54c1a825..f406b434 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 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_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 03bff13a..4e164ab0 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.

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_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 574911c9..f1f6ec10 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 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_th_cstor/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html index 8a592fc0..6017321f 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_cstor.ARG.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 +Fun (sidekick.Sidekick_th_cstor.ARG.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_th_cstor/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html index 5dcbf080..189a0318 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_cstor.ARG.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
+Term (sidekick.Sidekick_th_cstor.ARG.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
diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html
index be1b4fcd..becbab6c 100644
--- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_cstor.ARG.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 +Ty (sidekick.Sidekick_th_cstor.ARG.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_th_cstor/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html index 410812a6..0751e19c 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_cstor.ARG.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 +T (sidekick.Sidekick_th_cstor.ARG.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_th_cstor/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html index 1d811f36..e916b1fb 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_cstor.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_cstor.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 f2155f7f..3f9f4d07 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 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_th_cstor/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html index ba7d7347..61235348 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_cstor.ARG.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 +THEORY (sidekick.Sidekick_th_cstor.ARG.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_cstor/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/index.html index b4cd4842..43b3ce47 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
\ 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 index d3451ba1..d7a1909a 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 f18f9834..8097b9ab 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
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/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html index df8a9581..ce8c6d29 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_cstor.S.A.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 +Model (sidekick.Sidekick_th_cstor.S.A.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_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 index f29d1646..39ef15b5 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 f71b6cf8..0d177dd7 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

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_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 index 99032807..a68445f7 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/index.html index 223e2aa3..b0797483 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
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_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 34635f4e..5d7c779f 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html index f3c84753..a74cfc63 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_cstor.S.A.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 +N (sidekick.Sidekick_th_cstor.S.A.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_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 86fb5272..e267d005 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 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_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 9c0fdf2a..f43266c3 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.

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_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 adae2d9f..b7ed333b 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 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_th_cstor/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html index 8c2dbadb..9abe4c10 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_cstor.S.A.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 +Fun (sidekick.Sidekick_th_cstor.S.A.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_th_cstor/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html index 2ae4fc41..24b5a28f 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_cstor.S.A.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
+Term (sidekick.Sidekick_th_cstor.S.A.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
diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html
index bd9b9dba..c30e8612 100644
--- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_cstor.S.A.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 +Ty (sidekick.Sidekick_th_cstor.S.A.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_th_cstor/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html index 23244eb6..518805c8 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_cstor.S.A.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 +T (sidekick.Sidekick_th_cstor.S.A.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_th_cstor/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html index 0711a967..4068a9d1 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_cstor.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_cstor.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 b422471c..60ebf82c 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 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_th_cstor/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html index 03b58536..5a906463 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_cstor.S.A.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 +THEORY (sidekick.Sidekick_th_cstor.S.A.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_cstor/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/index.html index 25e83d16..a83baa90 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
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html index 36c9e919..ce143b39 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_cstor.S)

Module type Sidekick_th_cstor.S

module A : ARG
val theory : A.S.theory
\ No newline at end of file +S (sidekick.Sidekick_th_cstor.S)

Module type Sidekick_th_cstor.S

module A : ARG
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html index fcb9db83..2ef05e93 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick.Sidekick_th_data.Make.1-A.Cstor)

Module 1-A.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ No newline at end of file +Cstor (sidekick.Sidekick_th_data.Make.1-A.Cstor)

Module 1-A.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ 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 index b60727cd..7b1ba748 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 4749410f..45435e82 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
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/Model/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html index 2d5fc9ec..266f014a 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_data.Make.1-A.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 +Model (sidekick.Sidekick_th_data.Make.1-A.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_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 index 9f1caaa3..dd1d15f1 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 9ac5fce3..945b19b9 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

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_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 index 8b6692e0..fba88837 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html index 6598252e..4d771985 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
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_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 098bb0c0..23725d6f 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html index 9ae1a531..76b80777 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_data.Make.1-A.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 +N (sidekick.Sidekick_th_data.Make.1-A.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_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 d3c347ab..0b0ec560 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 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_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 5ec05658..fcfc6b1c 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.

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_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 ce261cfa..fa9f2b12 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 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_th_data/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html index 764bd918..4d8295b0 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_data.Make.1-A.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 +Fun (sidekick.Sidekick_th_data.Make.1-A.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_th_data/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html index 4416c1c2..4e421eb2 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_data.Make.1-A.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
+Term (sidekick.Sidekick_th_data.Make.1-A.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
diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html
index dd1a6748..501b8e9b 100644
--- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_data.Make.1-A.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 +Ty (sidekick.Sidekick_th_data.Make.1-A.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_th_data/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html index f06eada7..7293f534 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_data.Make.1-A.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 +T (sidekick.Sidekick_th_data.Make.1-A.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_th_data/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html index 42f20839..b2cdc9a2 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_data.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_data.Make.1-A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 10f19646..e5fa3c29 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 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_th_data/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html index bb50a1bf..44280858 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_data.Make.1-A.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 +THEORY (sidekick.Sidekick_th_data.Make.1-A.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_data/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/index.html index a80c8818..fc5ff2f1 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 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 diff --git a/dev/sidekick/Sidekick_th_data/Make/index.html b/dev/sidekick/Sidekick_th_data/Make/index.html index fa88b574..a3b11e49 100644 --- a/dev/sidekick/Sidekick_th_data/Make/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_th_data.Make)

Module Sidekick_th_data.Make

Parameters

Signature

module A = A
val theory : A.S.theory

A theory that can be added to A.S to perform datatype reasoning.

\ No newline at end of file +Make (sidekick.Sidekick_th_data.Make)

Module Sidekick_th_data.Make

Parameters

Signature

module A = A
val theory : A.S.theory

A theory that can be added to A.S to perform datatype reasoning.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/index.html b/dev/sidekick/Sidekick_th_data/index.html index e14f266d..cac0c6fb 100644 --- a/dev/sidekick/Sidekick_th_data/index.html +++ b/dev/sidekick/Sidekick_th_data/index.html @@ -1,2 +1,2 @@ -Sidekick_th_data (sidekick.Sidekick_th_data)

Module Sidekick_th_data

Theory for datatypes.

type ('c, 't) data_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t

T_cstor (c,args) is the term c(args)

| T_select of 'c * int * 't

T_select (c,i,u) means the i-th argument of u, which should start with constructor c

| T_is_a of 'c * 't

T_is_a (c,u) means u starts with constructor c

| T_other of 't

non-datatype term

Datatype-oriented view of terms.

  • 'c is the representation of constructors
  • 't is the representation of terms
type ('c, 'ty) data_ty_view =
| Ty_arrow of 'ty Iter.t * 'ty
| Ty_app of {
args : 'ty Iter.t;
}
| Ty_data of {
cstors : 'c;
}
| Ty_other

View of types in a way that is directly useful for the theory of datatypes

module type ARG = sig ... end

Argument to the functor

module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file +Sidekick_th_data (sidekick.Sidekick_th_data)

Module Sidekick_th_data

Theory for datatypes.

type ('c, 't) data_view =
| T_cstor of 'c * 't Sidekick_util.IArray.t

T_cstor (c,args) is the term c(args)

| T_select of 'c * int * 't

T_select (c,i,u) means the i-th argument of u, which should start with constructor c

| T_is_a of 'c * 't

T_is_a (c,u) means u starts with constructor c

| T_other of 't

non-datatype term

Datatype-oriented view of terms.

  • 'c is the representation of constructors
  • 't is the representation of terms
type ('c, 'ty) data_ty_view =
| Ty_arrow of 'ty Iter.t * 'ty
| Ty_app of {
args : 'ty Iter.t;
}
| Ty_data of {
cstors : 'c;
}
| Ty_other

View of types in a way that is directly useful for the theory of datatypes

module type ARG = sig ... end

Argument to the functor

module type S = sig ... end
module Make : functor (A : ARG) -> S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html index 1cb15355..2e1d3590 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick.Sidekick_th_data.ARG.Cstor)

Module ARG.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ No newline at end of file +Cstor (sidekick.Sidekick_th_data.ARG.Cstor)

Module ARG.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ 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 index f08fdf3e..56bdaf90 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 fd8a8a9a..e9664e5d 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
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/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html index 853bb721..b99628af 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_data.ARG.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 +Model (sidekick.Sidekick_th_data.ARG.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_th_data/module-type-ARG/S/P/Quip/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Quip/index.html index fb7fbd21..2ab9719f 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 c576932b..32deacd3 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

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_th_data/module-type-ARG/S/Pre_proof/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Pre_proof/index.html index 56d071c7..0c3bf631 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/index.html index 1b18d11e..73182b36 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
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_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 9749d9c4..b6dcc423 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html index c731935c..5f28ca11 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_data.ARG.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 +N (sidekick.Sidekick_th_data.ARG.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_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 bac6435c..4db44dff 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 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_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 010e3b4e..ae2087dd 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.

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_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 799361ff..e584059f 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 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_th_data/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html index b4989f56..9bcf222a 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_data.ARG.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 +Fun (sidekick.Sidekick_th_data.ARG.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_th_data/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html index 9664b270..b9fb4561 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_data.ARG.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
+Term (sidekick.Sidekick_th_data.ARG.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
diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html
index fc5382a2..6d72c57e 100644
--- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_data.ARG.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 +Ty (sidekick.Sidekick_th_data.ARG.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_th_data/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html index 1d61bf91..7069f253 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_data.ARG.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 +T (sidekick.Sidekick_th_data.ARG.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_th_data/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html index 6c5eee8d..dc6657e8 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_data.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_data.ARG.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 f8fb098c..6ef9a8ca 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 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_th_data/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html index d1e8b3dd..73f7beb6 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_data.ARG.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 +THEORY (sidekick.Sidekick_th_data.ARG.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_data/module-type-ARG/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/index.html index e79cf444..a2c4cf2c 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 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 diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html index 2d6719de..964b81e8 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/Cstor/index.html @@ -1,2 +1,2 @@ -Cstor (sidekick.Sidekick_th_data.S.A.Cstor)

Module A.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ No newline at end of file +Cstor (sidekick.Sidekick_th_data.S.A.Cstor)

Module A.Cstor

Constructor symbols.

A constructor is an injective symbol, part of a datatype (or "sum type"). For example, in type option a = Some a | None, the constructors are Some and None.

type t

Constructor

val ty_args : t -> S.T.Ty.t Iter.t

Type arguments, for a polymorphic constructor

val pp : t Sidekick_util.Fmt.printer
val equal : t -> t -> bool

Comparison

\ 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 index ed5e5a90..d4dadca0 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 6f2a43d1..4988d08a 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
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/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html index 8de45187..ae796756 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_th_data.S.A.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 +Model (sidekick.Sidekick_th_data.S.A.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_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 index e87be2f7..4d54ca31 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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 c333bb88..4cc0cb36 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

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_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 index 837faf2c..24b428ac 100644 --- 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 @@ -1,2 +1,2 @@ -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 +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/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/index.html index 20bf9a68..45d90c45 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
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_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 c8d6d606..0a9ee3f0 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_proof : P.t -> 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/N/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html index 5f842bfc..df77ba5d 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_th_data.S.A.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 +N (sidekick.Sidekick_th_data.S.A.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_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 4e449831..652b586c 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 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_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 c811a377..3d28635b 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.

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_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 9b65192b..40f5ab61 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 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_th_data/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html index 3eb9969a..11ca5ff2 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_th_data.S.A.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 +Fun (sidekick.Sidekick_th_data.S.A.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_th_data/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html index 36d9ff97..90ee930c 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Term/index.html @@ -1,5 +1,5 @@ -Term (sidekick.Sidekick_th_data.S.A.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
+Term (sidekick.Sidekick_th_data.S.A.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
diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html
index 1ef70f0a..595d18bb 100644
--- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html
+++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Ty/index.html
@@ -1,2 +1,2 @@
 
-Ty (sidekick.Sidekick_th_data.S.A.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 +Ty (sidekick.Sidekick_th_data.S.A.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_th_data/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html index f4c17fd9..1c09c2d3 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_th_data.S.A.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 +T (sidekick.Sidekick_th_data.S.A.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_th_data/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html index 7d2c95cf..5b17d159 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_th_data.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_th_data.S.A.S.Unknown)

Module S.Unknown

type t
val pp : t CCFormat.printer
\ 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 b4e53869..4949097d 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 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_th_data/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html index 029de097..e6aa2725 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_th_data.S.A.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 +THEORY (sidekick.Sidekick_th_data.S.A.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_data/module-type-S/A/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/index.html index 70a93e54..fe04c75c 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 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 diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/index.html index 28126c50..14e7de78 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_th_data.S)

Module type Sidekick_th_data.S

module A : ARG
val theory : A.S.theory

A theory that can be added to A.S to perform datatype reasoning.

\ No newline at end of file +S (sidekick.Sidekick_th_data.S)

Module type Sidekick_th_data.S

module A : ARG
val theory : A.S.theory

A theory that can be added to A.S to perform datatype reasoning.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__/Types/index.html b/dev/sidekick/Sidekick_th_data__/Types/index.html index 6b34299a..d2563932 100644 --- a/dev/sidekick/Sidekick_th_data__/Types/index.html +++ b/dev/sidekick/Sidekick_th_data__/Types/index.html @@ -1,2 +1,2 @@ -Types (sidekick.Sidekick_th_data__.Types)

Module Sidekick_th_data__.Types

\ No newline at end of file +Types (sidekick.Sidekick_th_data__.Types)

Module Sidekick_th_data__.Types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__/index.html b/dev/sidekick/Sidekick_th_data__/index.html index f3b89a58..58068e9b 100644 --- a/dev/sidekick/Sidekick_th_data__/index.html +++ b/dev/sidekick/Sidekick_th_data__/index.html @@ -1,2 +1,2 @@ -Sidekick_th_data__ (sidekick.Sidekick_th_data__)

Module Sidekick_th_data__

module Types : sig ... end
\ No newline at end of file +Sidekick_th_data__ (sidekick.Sidekick_th_data__)

Module Sidekick_th_data__

module Types : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__Types/index.html b/dev/sidekick/Sidekick_th_data__Types/index.html index c4f05231..6bac84d4 100644 --- a/dev/sidekick/Sidekick_th_data__Types/index.html +++ b/dev/sidekick/Sidekick_th_data__Types/index.html @@ -1,2 +1,2 @@ -Sidekick_th_data__Types (sidekick.Sidekick_th_data__Types)

Module Sidekick_th_data__Types

\ No newline at end of file +Sidekick_th_data__Types (sidekick.Sidekick_th_data__Types)

Module Sidekick_th_data__Types

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrack_stack/index.html b/dev/sidekick/Sidekick_util/Backtrack_stack/index.html index f65cdada..f90c94f2 100644 --- a/dev/sidekick/Sidekick_util/Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util/Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Backtrack_stack (sidekick.Sidekick_util.Backtrack_stack)

Module Sidekick_util.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file +Backtrack_stack (sidekick.Sidekick_util.Backtrack_stack)

Module Sidekick_util.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html index 9d23df37..3535f022 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_util.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +1-A (sidekick.Sidekick_util.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html index 85d5b5cb..91120437 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_util.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +Make (sidekick.Sidekick_util.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html index 358f6022..88b82036 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/index.html @@ -1,2 +1,2 @@ -Backtrackable_tbl (sidekick.Sidekick_util.Backtrackable_tbl)

Module Sidekick_util.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file +Backtrackable_tbl (sidekick.Sidekick_util.Backtrackable_tbl)

Module Sidekick_util.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html index 838b1dd2..a7ed2d20 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_util.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +ARG (sidekick.Sidekick_util.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html index 4014e245..609e41c1 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_tbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_util.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +S (sidekick.Sidekick_util.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Bag/index.html b/dev/sidekick/Sidekick_util/Bag/index.html index 7be1b518..f7175953 100644 --- a/dev/sidekick/Sidekick_util/Bag/index.html +++ b/dev/sidekick/Sidekick_util/Bag/index.html @@ -1,2 +1,2 @@ -Bag (sidekick.Sidekick_util.Bag)

Module Sidekick_util.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Bag (sidekick.Sidekick_util.Bag)

Module Sidekick_util.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Error/index.html b/dev/sidekick/Sidekick_util/Error/index.html index fd50bec0..90a0dc71 100644 --- a/dev/sidekick/Sidekick_util/Error/index.html +++ b/dev/sidekick/Sidekick_util/Error/index.html @@ -1,2 +1,2 @@ -Error (sidekick.Sidekick_util.Error)

Module Sidekick_util.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file +Error (sidekick.Sidekick_util.Error)

Module Sidekick_util.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Hash/index.html b/dev/sidekick/Sidekick_util/Hash/index.html index 5cd29add..5b0aadbc 100644 --- a/dev/sidekick/Sidekick_util/Hash/index.html +++ b/dev/sidekick/Sidekick_util/Hash/index.html @@ -1,2 +1,2 @@ -Hash (sidekick.Sidekick_util.Hash)

Module Sidekick_util.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file +Hash (sidekick.Sidekick_util.Hash)

Module Sidekick_util.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/IArray/index.html b/dev/sidekick/Sidekick_util/IArray/index.html index f56389a8..66e7cd7c 100644 --- a/dev/sidekick/Sidekick_util/IArray/index.html +++ b/dev/sidekick/Sidekick_util/IArray/index.html @@ -1,2 +1,2 @@ -IArray (sidekick.Sidekick_util.IArray)

Module Sidekick_util.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +IArray (sidekick.Sidekick_util.IArray)

Module Sidekick_util.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Log/index.html b/dev/sidekick/Sidekick_util/Log/index.html new file mode 100644 index 00000000..c8b51025 --- /dev/null +++ b/dev/sidekick/Sidekick_util/Log/index.html @@ -0,0 +1,2 @@ + +Log (sidekick.Sidekick_util.Log)

Module Sidekick_util.Log

Logging function, for debugging

val enabled : bool
val set_debug : int -> unit

Set debug level

val get_debug : unit -> int

Current debug level

val debugf : int -> ((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) -> unit

Emit a debug message at the given level. If the level is lower than get_debug (), the message will indeed be emitted

val debug : int -> string -> unit

Simpler version of debug, without formatting

val set_debug_out : Stdlib.Format.formatter -> unit

Change the output formatter.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/Control/index.html b/dev/sidekick/Sidekick_util/Profile/Control/index.html index 129e3f44..d0ae7ff6 100644 --- a/dev/sidekick/Sidekick_util/Profile/Control/index.html +++ b/dev/sidekick/Sidekick_util/Profile/Control/index.html @@ -1,2 +1,2 @@ -Control (sidekick.Sidekick_util.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file +Control (sidekick.Sidekick_util.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/index.html b/dev/sidekick/Sidekick_util/Profile/index.html index 5c3897f3..06bb2985 100644 --- a/dev/sidekick/Sidekick_util/Profile/index.html +++ b/dev/sidekick/Sidekick_util/Profile/index.html @@ -1,2 +1,2 @@ -Profile (sidekick.Sidekick_util.Profile)

Module Sidekick_util.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file +Profile (sidekick.Sidekick_util.Profile)

Module Sidekick_util.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html index ccc0ee2d..9c2a44de 100644 --- a/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html +++ b/dev/sidekick/Sidekick_util/Profile/module-type-BACKEND/index.html @@ -1,2 +1,2 @@ -BACKEND (sidekick.Sidekick_util.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file +BACKEND (sidekick.Sidekick_util.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Stat/index.html b/dev/sidekick/Sidekick_util/Stat/index.html index 2d67e4f5..8b504cae 100644 --- a/dev/sidekick/Sidekick_util/Stat/index.html +++ b/dev/sidekick/Sidekick_util/Stat/index.html @@ -1,2 +1,2 @@ -Stat (sidekick.Sidekick_util.Stat)

Module Sidekick_util.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Stat (sidekick.Sidekick_util.Stat)

Module Sidekick_util.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ 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 22e95bad..aed1729b 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 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 new file mode 100644 index 00000000..a5630cfe --- /dev/null +++ b/dev/sidekick/Sidekick_util/Vec/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_util/index.html b/dev/sidekick/Sidekick_util/index.html index e40efc1d..db6a7ef3 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 Vec = Msat.Vec
module Log = Msat.Log
module Util : sig ... end
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 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 diff --git a/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html b/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html index 1ca79c01..70359a07 100644 --- a/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Backtrack_stack (sidekick.Sidekick_util__.Backtrack_stack)

Module Sidekick_util__.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file +Backtrack_stack (sidekick.Sidekick_util__.Backtrack_stack)

Module Sidekick_util__.Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html index 037bc949..eade2cfe 100644 --- a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_util__.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +1-A (sidekick.Sidekick_util__.Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html index dc755e5a..b96e8bdf 100644 --- a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_util__.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +Make (sidekick.Sidekick_util__.Backtrackable_tbl.Make)

Module Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html index be2c3414..df75b055 100644 --- a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/index.html @@ -1,2 +1,2 @@ -Backtrackable_tbl (sidekick.Sidekick_util__.Backtrackable_tbl)

Module Sidekick_util__.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file +Backtrackable_tbl (sidekick.Sidekick_util__.Backtrackable_tbl)

Module Sidekick_util__.Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html index 7a73c82b..73de5339 100644 --- a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_util__.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +ARG (sidekick.Sidekick_util__.Backtrackable_tbl.ARG)

Module type Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html index 2a6a4def..c6b24257 100644 --- a/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html +++ b/dev/sidekick/Sidekick_util__/Backtrackable_tbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_util__.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +S (sidekick.Sidekick_util__.Backtrackable_tbl.S)

Module type Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Bag/index.html b/dev/sidekick/Sidekick_util__/Bag/index.html index 820d59d7..34c88ca7 100644 --- a/dev/sidekick/Sidekick_util__/Bag/index.html +++ b/dev/sidekick/Sidekick_util__/Bag/index.html @@ -1,2 +1,2 @@ -Bag (sidekick.Sidekick_util__.Bag)

Module Sidekick_util__.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Bag (sidekick.Sidekick_util__.Bag)

Module Sidekick_util__.Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Error/index.html b/dev/sidekick/Sidekick_util__/Error/index.html index efec20a7..e3af3ad7 100644 --- a/dev/sidekick/Sidekick_util__/Error/index.html +++ b/dev/sidekick/Sidekick_util__/Error/index.html @@ -1,2 +1,2 @@ -Error (sidekick.Sidekick_util__.Error)

Module Sidekick_util__.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file +Error (sidekick.Sidekick_util__.Error)

Module Sidekick_util__.Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Hash/index.html b/dev/sidekick/Sidekick_util__/Hash/index.html index 370e75e8..586b50c3 100644 --- a/dev/sidekick/Sidekick_util__/Hash/index.html +++ b/dev/sidekick/Sidekick_util__/Hash/index.html @@ -1,2 +1,2 @@ -Hash (sidekick.Sidekick_util__.Hash)

Module Sidekick_util__.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file +Hash (sidekick.Sidekick_util__.Hash)

Module Sidekick_util__.Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/IArray/index.html b/dev/sidekick/Sidekick_util__/IArray/index.html index a6cbcf39..39bd7f02 100644 --- a/dev/sidekick/Sidekick_util__/IArray/index.html +++ b/dev/sidekick/Sidekick_util__/IArray/index.html @@ -1,2 +1,2 @@ -IArray (sidekick.Sidekick_util__.IArray)

Module Sidekick_util__.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +IArray (sidekick.Sidekick_util__.IArray)

Module Sidekick_util__.IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Log/index.html b/dev/sidekick/Sidekick_util__/Log/index.html new file mode 100644 index 00000000..06216ac1 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Log/index.html @@ -0,0 +1,2 @@ + +Log (sidekick.Sidekick_util__.Log)

Module Sidekick_util__.Log

val enabled : bool
val set_debug : int -> unit

Set debug level

val get_debug : unit -> int

Current debug level

val debugf : int -> ((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) -> unit

Emit a debug message at the given level. If the level is lower than get_debug (), the message will indeed be emitted

val debug : int -> string -> unit

Simpler version of debug, without formatting

val set_debug_out : Stdlib.Format.formatter -> unit

Change the output formatter.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/Control/index.html b/dev/sidekick/Sidekick_util__/Profile/Control/index.html index 61b5acec..2790b4e0 100644 --- a/dev/sidekick/Sidekick_util__/Profile/Control/index.html +++ b/dev/sidekick/Sidekick_util__/Profile/Control/index.html @@ -1,2 +1,2 @@ -Control (sidekick.Sidekick_util__.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file +Control (sidekick.Sidekick_util__.Profile.Control)

Module Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/index.html b/dev/sidekick/Sidekick_util__/Profile/index.html index 7ecd07b2..74d3495d 100644 --- a/dev/sidekick/Sidekick_util__/Profile/index.html +++ b/dev/sidekick/Sidekick_util__/Profile/index.html @@ -1,2 +1,2 @@ -Profile (sidekick.Sidekick_util__.Profile)

Module Sidekick_util__.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file +Profile (sidekick.Sidekick_util__.Profile)

Module Sidekick_util__.Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html index 213f370b..dc85ce38 100644 --- a/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html +++ b/dev/sidekick/Sidekick_util__/Profile/module-type-BACKEND/index.html @@ -1,2 +1,2 @@ -BACKEND (sidekick.Sidekick_util__.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file +BACKEND (sidekick.Sidekick_util__.Profile.BACKEND)

Module type Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/Stat/index.html b/dev/sidekick/Sidekick_util__/Stat/index.html index 1e430148..5c3a0812 100644 --- a/dev/sidekick/Sidekick_util__/Stat/index.html +++ b/dev/sidekick/Sidekick_util__/Stat/index.html @@ -1,2 +1,2 @@ -Stat (sidekick.Sidekick_util__.Stat)

Module Sidekick_util__.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Stat (sidekick.Sidekick_util__.Stat)

Module Sidekick_util__.Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ 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 f5f2f292..373ab69e 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 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 new file mode 100644 index 00000000..45055aa5 --- /dev/null +++ b/dev/sidekick/Sidekick_util__/Vec/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_util__/index.html b/dev/sidekick/Sidekick_util__/index.html index 7fec0673..a4af7cc5 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 Profile : sig ... end
module Stat : sig ... end
module Util : 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 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 diff --git a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html b/dev/sidekick/Sidekick_util__Backtrack_stack/index.html index 85c625cf..b29e44f8 100644 --- a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html +++ b/dev/sidekick/Sidekick_util__Backtrack_stack/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Backtrack_stack (sidekick.Sidekick_util__Backtrack_stack)

Module Sidekick_util__Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file +Sidekick_util__Backtrack_stack (sidekick.Sidekick_util__Backtrack_stack)

Module Sidekick_util__Backtrack_stack

A backtracking stack

type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit

Push an element onto the stack

val push_if_nonzero_level : 'a t -> 'a -> unit

Push an element onto the stack if level > 0

val n_levels : _ t -> int

Number of levels

val push_level : _ t -> unit

Push a backtracking point

val pop_levels : 'a t -> int -> f:('a -> unit) -> unit

pop_levels st n ~f removes n levels, calling f on every removed item

val iter : f:('a -> unit) -> 'a t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html index a267572f..589fd35a 100644 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/argument-1-A/index.html @@ -1,2 +1,2 @@ -1-A (sidekick.Sidekick_util__Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +1-A (sidekick.Sidekick_util__Backtrackable_tbl.Make.1-A)

Parameter Make.1-A

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html index 92e25310..876ba7b0 100644 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_util__Backtrackable_tbl.Make)

Module Sidekick_util__Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +Make (sidekick.Sidekick_util__Backtrackable_tbl.Make)

Module Sidekick_util__Backtrackable_tbl.Make

Parameters

Signature

type key = A.t
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html index 85b24f02..9e7d3b61 100644 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Backtrackable_tbl (sidekick.Sidekick_util__Backtrackable_tbl)

Module Sidekick_util__Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file +Sidekick_util__Backtrackable_tbl (sidekick.Sidekick_util__Backtrackable_tbl)

Module Sidekick_util__Backtrackable_tbl

A backtrackable hashtable

module type S = sig ... end
module type ARG = sig ... end
module Make : functor (A : ARG) -> S with type key = A.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html index 9cbef29e..8b2095f1 100644 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-ARG/index.html @@ -1,2 +1,2 @@ -ARG (sidekick.Sidekick_util__Backtrackable_tbl.ARG)

Module type Sidekick_util__Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +ARG (sidekick.Sidekick_util__Backtrackable_tbl.ARG)

Module type Sidekick_util__Backtrackable_tbl.ARG

type t
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html index cf70ecd5..f07345b3 100644 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html +++ b/dev/sidekick/Sidekick_util__Backtrackable_tbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_util__Backtrackable_tbl.S)

Module type Sidekick_util__Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file +S (sidekick.Sidekick_util__Backtrackable_tbl.S)

Module type Sidekick_util__Backtrackable_tbl.S

type key
type 'a t
val create : ?⁠size:int -> unit -> 'a t
val find : 'a t -> key -> 'a
raises Not_found

if the key is not present

val get : 'a t -> key -> 'a option
val mem : _ t -> key -> bool
val length : _ t -> int
val iter : (key -> 'a -> unit) -> 'a t -> unit
val to_iter : 'a t -> (key * 'a) Iter.t
val add : 'a t -> key -> 'a -> unit
val remove : _ t -> key -> unit
val push_level : _ t -> unit
val pop_levels : _ t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Bag/index.html b/dev/sidekick/Sidekick_util__Bag/index.html index 4f2be7f0..26191174 100644 --- a/dev/sidekick/Sidekick_util__Bag/index.html +++ b/dev/sidekick/Sidekick_util__Bag/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Bag (sidekick.Sidekick_util__Bag)

Module Sidekick_util__Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file +Sidekick_util__Bag (sidekick.Sidekick_util__Bag)

Module Sidekick_util__Bag

Ordered Bag of Elements

A data structure where we can have duplicate elements, optimized for fast concatenation and size.

type +'a t = private
| E
| L of 'a
| N of 'a t * 'a t
val empty : 'a t
val is_empty : _ t -> bool
val return : 'a -> 'a t
val cons : 'a -> 'a t -> 'a t
val append : 'a t -> 'a t -> 'a t
val to_iter : 'a t -> 'a Iter.t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val iter : ('a -> unit) -> 'a t -> unit
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Are the two bags equal, element wise?

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Error/index.html b/dev/sidekick/Sidekick_util__Error/index.html index 2caa703f..c652a941 100644 --- a/dev/sidekick/Sidekick_util__Error/index.html +++ b/dev/sidekick/Sidekick_util__Error/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Error (sidekick.Sidekick_util__Error)

Module Sidekick_util__Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file +Sidekick_util__Error (sidekick.Sidekick_util__Error)

Module Sidekick_util__Error

exception Error of string
val errorf : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
raises Error

when called

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Hash/index.html b/dev/sidekick/Sidekick_util__Hash/index.html index 9a94f591..8b4dd467 100644 --- a/dev/sidekick/Sidekick_util__Hash/index.html +++ b/dev/sidekick/Sidekick_util__Hash/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Hash (sidekick.Sidekick_util__Hash)

Module Sidekick_util__Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file +Sidekick_util__Hash (sidekick.Sidekick_util__Hash)

Module Sidekick_util__Hash

type 'a t = 'a -> int
val bool : bool t
val int : int t
val string : string t
val combine : 'a t -> int -> 'a -> int
val pair : 'a t -> 'b t -> ('a * 'b) t
val opt : 'a t -> 'a option t
val list : 'a t -> 'a list t
val array : 'a t -> 'a array t
val iarray : 'a t -> 'a Sidekick_util.IArray.t t
val seq : 'a t -> 'a Iter.t t
val combine2 : int -> int -> int
val combine3 : int -> int -> int -> int
val combine4 : int -> int -> int -> int -> int
val poly : 'a t

the regular polymorphic hash function

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__IArray/index.html b/dev/sidekick/Sidekick_util__IArray/index.html index 69f23e08..ee3f5223 100644 --- a/dev/sidekick/Sidekick_util__IArray/index.html +++ b/dev/sidekick/Sidekick_util__IArray/index.html @@ -1,2 +1,2 @@ -Sidekick_util__IArray (sidekick.Sidekick_util__IArray)

Module Sidekick_util__IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file +Sidekick_util__IArray (sidekick.Sidekick_util__IArray)

Module Sidekick_util__IArray

type 'a t = private 'a array

Array of values of type 'a. The underlying type really is an array, but it will never be modified.

It should be covariant but OCaml will not accept it.

val empty : 'a t
val is_empty : _ t -> bool
val length : _ t -> int
val sub : 'a t -> int -> int -> 'a t
val singleton : 'a -> 'a t
val doubleton : 'a -> 'a -> 'a t
val make : int -> 'a -> 'a t

make n x makes an array of n times x

val init : int -> (int -> 'a) -> 'a t

init n f makes the array [| f 0; f 1; ... ; f (n-1) |].

raises Invalid_argument

if n < 0

val get : 'a t -> int -> 'a

Access the element

val unsafe_get : 'a t -> int -> 'a

Unsafe access, not bound-checked. Use with caution

val set : 'a t -> int -> 'a -> 'a t

Copy the array and modify its copy

val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
val append : 'a t -> 'a t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit
val iteri : (int -> 'a -> unit) -> 'a t -> unit
val foldi : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool

Conversions

type 'a iter = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val of_list_map : ('a -> 'b) -> 'a list -> 'b t
val to_list_map : ('a -> 'b) -> 'a t -> 'b list
val of_array_map : ('a -> 'b) -> 'a array -> 'b t
val to_array_map : ('a -> 'b) -> 'a t -> 'b array
val of_array_unsafe : 'a array -> 'a t

Take ownership of the given array. Careful, the array must NOT be modified afterwards!

val to_iter : 'a t -> 'a iter
val to_iter_sub : 'a t -> int -> int -> 'a iter
val of_iter : 'a iter -> 'a t
val of_gen : 'a gen -> 'a t
val to_gen : 'a t -> 'a gen

IO

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
val print : ?⁠start:string -> ?⁠stop:string -> ?⁠sep:string -> 'a printer -> 'a t printer

Binary

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val exists2 : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc
val iteri2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Log/.dune-keep b/dev/sidekick/Sidekick_util__Log/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Log/index.html b/dev/sidekick/Sidekick_util__Log/index.html new file mode 100644 index 00000000..a02e59a8 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Log/index.html @@ -0,0 +1,2 @@ + +Sidekick_util__Log (sidekick.Sidekick_util__Log)

Module Sidekick_util__Log

Logging function, for debugging

val enabled : bool
val set_debug : int -> unit

Set debug level

val get_debug : unit -> int

Current debug level

val debugf : int -> ((('a, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'a) -> unit) -> unit

Emit a debug message at the given level. If the level is lower than get_debug (), the message will indeed be emitted

val debug : int -> string -> unit

Simpler version of debug, without formatting

val set_debug_out : Stdlib.Format.formatter -> unit

Change the output formatter.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/Control/index.html b/dev/sidekick/Sidekick_util__Profile/Control/index.html index 3a2a64df..249b8b0e 100644 --- a/dev/sidekick/Sidekick_util__Profile/Control/index.html +++ b/dev/sidekick/Sidekick_util__Profile/Control/index.html @@ -1,2 +1,2 @@ -Control (sidekick.Sidekick_util__Profile.Control)

Module Sidekick_util__Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file +Control (sidekick.Sidekick_util__Profile.Control)

Module Sidekick_util__Profile.Control

val setup : backend option -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/index.html b/dev/sidekick/Sidekick_util__Profile/index.html index cf6a63b6..543f902c 100644 --- a/dev/sidekick/Sidekick_util__Profile/index.html +++ b/dev/sidekick/Sidekick_util__Profile/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Profile (sidekick.Sidekick_util__Profile)

Module Sidekick_util__Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file +Sidekick_util__Profile (sidekick.Sidekick_util__Profile)

Module Sidekick_util__Profile

Profiling probes

type probe
val null_probe : probe
val enabled : unit -> bool
val instant : string -> unit
val begin_ : string -> probe
val exit : probe -> unit
val with_ : string -> (unit -> 'a) -> 'a
val with1 : string -> ('a -> 'b) -> 'a -> 'b
val with2 : string -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
module type BACKEND = sig ... end
type backend = (module BACKEND)
module Control : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html b/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html index 1756db33..0b088d18 100644 --- a/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html +++ b/dev/sidekick/Sidekick_util__Profile/module-type-BACKEND/index.html @@ -1,2 +1,2 @@ -BACKEND (sidekick.Sidekick_util__Profile.BACKEND)

Module type Sidekick_util__Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file +BACKEND (sidekick.Sidekick_util__Profile.BACKEND)

Module type Sidekick_util__Profile.BACKEND

val get_ts : unit -> float
val emit_duration_event : name:string -> start:float -> end_:float -> unit -> unit
val emit_instant_event : name:string -> ts:float -> unit -> unit
val teardown : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Stat/index.html b/dev/sidekick/Sidekick_util__Stat/index.html index f1bb9c56..ed7e86c9 100644 --- a/dev/sidekick/Sidekick_util__Stat/index.html +++ b/dev/sidekick/Sidekick_util__Stat/index.html @@ -1,2 +1,2 @@ -Sidekick_util__Stat (sidekick.Sidekick_util__Stat)

Module Sidekick_util__Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ No newline at end of file +Sidekick_util__Stat (sidekick.Sidekick_util__Stat)

Module Sidekick_util__Stat

Statistics

module Fmt = CCFormat
type t
val create : unit -> t
type 'a counter
val mk_int : t -> string -> int counter
val mk_float : t -> string -> float counter
val incr : int counter -> unit
val incr_f : float counter -> float -> unit
val set : 'a counter -> 'a -> unit
type ex_counter

Existential counter

val all : t -> ex_counter Iter.t
val pp_all : ex_counter Iter.t Fmt.printer
val global : t

Global statistics, by default

\ 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 89f73500..bac1345f 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 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/.dune-keep b/dev/sidekick/Sidekick_util__Vec/.dune-keep new file mode 100644 index 00000000..e69de29b diff --git a/dev/sidekick/Sidekick_util__Vec/index.html b/dev/sidekick/Sidekick_util__Vec/index.html new file mode 100644 index 00000000..8f79c804 --- /dev/null +++ b/dev/sidekick/Sidekick_util__Vec/index.html @@ -0,0 +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 diff --git a/dev/sidekick/Sidekick_zarith/Int/index.html b/dev/sidekick/Sidekick_zarith/Int/index.html index 39b6038c..e9570cdf 100644 --- a/dev/sidekick/Sidekick_zarith/Int/index.html +++ b/dev/sidekick/Sidekick_zarith/Int/index.html @@ -1,2 +1,2 @@ -Int (sidekick.Sidekick_zarith.Int)

Module Sidekick_zarith.Int

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val succ : t -> t
\ No newline at end of file +Int (sidekick.Sidekick_zarith.Int)

Module Sidekick_zarith.Int

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val succ : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_zarith/Rational/index.html b/dev/sidekick/Sidekick_zarith/Rational/index.html index cbcf46b3..69b4eed7 100644 --- a/dev/sidekick/Sidekick_zarith/Rational/index.html +++ b/dev/sidekick/Sidekick_zarith/Rational/index.html @@ -1,2 +1,2 @@ -Rational (sidekick.Sidekick_zarith.Rational)

Module Sidekick_zarith.Rational

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint = Z.t
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file +Rational (sidekick.Sidekick_zarith.Rational)

Module Sidekick_zarith.Rational

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
type t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := t
type t
val pp : t CCFormat.printer
val (+) : t -> t -> t
val (-) : t -> t -> t
val (*) : t -> t -> t
val (~-) : t -> t
val neg : t -> t
val min : t -> t -> t
val max : t -> t -> t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (>) : t -> t -> bool
val (>=) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
type bigint = Z.t
val (/) : t -> t -> t
val num : t -> bigint
val denum : t -> bigint
val pp_approx : int -> Stdlib.Format.formatter -> t -> unit

Pretty print rational with given amount of precision (for example as a floating point number)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_zarith/index.html b/dev/sidekick/Sidekick_zarith/index.html index fd1edf95..635b1b25 100644 --- a/dev/sidekick/Sidekick_zarith/index.html +++ b/dev/sidekick/Sidekick_zarith/index.html @@ -1,2 +1,2 @@ -Sidekick_zarith (sidekick.Sidekick_zarith)

Module Sidekick_zarith

module Int : Sidekick_arith.INT with type t = Z.t
module Rational : Sidekick_arith.RATIONAL with type t = Q.t and type bigint = Z.t
\ No newline at end of file +Sidekick_zarith (sidekick.Sidekick_zarith)

Module Sidekick_zarith

module Int : Sidekick_arith.INT with type t = Z.t
module Rational : Sidekick_arith.RATIONAL with type t = Q.t and type bigint = Z.t
\ No newline at end of file diff --git a/dev/sidekick/index.html b/dev/sidekick/index.html index 0c7b7547..2a86b7c0 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.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.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.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.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