From 116f19215accb8effeb2793088e69a833b05b48f Mon Sep 17 00:00:00 2001 From: c-cube Date: Fri, 15 Jul 2022 01:53:58 +0000 Subject: [PATCH] deploy: b16fce6f263c2f349b783e15a3d469bd2c7c80e9 --- dev/odoc.css | 35 ++++++------ .../Sidekick_base/{.dune-keep => .dummy} | 0 .../Sidekick_base/Base_types/Cstor/index.html | 2 +- .../Sidekick_base/Base_types/Data/index.html | 2 +- .../Sidekick_base/Base_types/Fun/index.html | 2 +- .../Base_types/LIA_view/index.html | 2 + .../Base_types/LRA_op/index.html | 2 + .../Base_types/LRA_pred/index.html | 2 + .../Base_types/LRA_view/index.html | 2 + .../Base_types/Select/index.html | 2 +- .../Base_types/Statement/index.html | 2 +- .../Base_types/Term/Iter_dag/index.html | 2 +- .../Base_types/Term/LIA/index.html | 2 + .../Base_types/Term/LRA/index.html | 2 +- .../Sidekick_base/Base_types/Term/index.html | 2 +- .../Term/module-type-ARITH_HELPER/index.html | 2 + .../Term_cell/Make_eq/argument-1-X/index.html | 2 +- .../Base_types/Term_cell/Make_eq/index.html | 2 +- .../Base_types/Term_cell/index.html | 2 +- .../Term_cell/module-type-ARG/index.html | 2 +- .../Base_types/Ty/Fun/index.html | 2 +- .../Sidekick_base/Base_types/Ty/index.html | 2 +- .../Sidekick_base/Base_types/Value/index.html | 2 +- .../Sidekick_base/Base_types/index.html | 7 ++- .../Sidekick_base/Form/Funs/index.html | 2 +- .../Sidekick_base/Form/Gensym/index.html | 2 +- .../Sidekick_base/Form/index.html | 10 +++- dev/sidekick-base/Sidekick_base/ID/index.html | 2 +- .../Sidekick_base/Lit/index.html | 2 +- .../Model/Fun_interpretation/index.html | 5 +- .../Sidekick_base/Model/Val_map/index.html | 2 +- .../Sidekick_base/Model/index.html | 2 +- .../Sidekick_base/Proof/Config/index.html | 2 +- .../Sidekick_base/Proof/Step_vec/index.html | 2 +- .../Sidekick_base/Proof/Unsafe_/index.html | 2 +- .../Sidekick_base/Proof/index.html | 46 ++++++++++++++- .../Proof_dummy/Step_vec/index.html | 2 +- .../Sidekick_base/Proof_dummy/index.html | 57 ++++++++++++++++++- .../Sidekick_base/Proof_quip/index.html | 2 +- .../Sidekick_base/Solver_arg/Fun/index.html | 2 +- .../Sidekick_base/Solver_arg/Term/index.html | 4 +- .../Sidekick_base/Solver_arg/Ty/index.html | 2 +- .../Sidekick_base/Solver_arg/index.html | 7 ++- dev/sidekick-base/Sidekick_base/index.html | 2 +- dev/sidekick-base/Sidekick_base__/index.html | 2 - .../Sidekick_base__Base_types/index.html | 2 - .../Sidekick_base__CCHet/index.html | 2 - .../Sidekick_base__Config/index.html | 2 - .../Sidekick_base__Form/index.html | 2 - .../Sidekick_base__Hashcons/index.html | 2 - .../Sidekick_base__ID/index.html | 2 - .../Sidekick_base__Lit/index.html | 2 - .../Sidekick_base__Model/index.html | 2 - .../Sidekick_base__Proof/index.html | 2 - .../Sidekick_base__Proof_dummy/index.html | 2 - .../Sidekick_base__Proof_quip/index.html | 2 - .../Sidekick_base__Solver_arg/index.html | 2 - .../.dummy} | 0 .../Proof_ser/Bare/Decode/index.html | 2 +- .../Proof_ser/Bare/Encode/index.html | 2 +- .../Proof_ser/Bare/Pp/index.html | 18 +++++- .../Proof_ser/Bare/String_map/index.html | 6 +- .../Proof_ser/Bare/index.html | 12 +++- .../Bare/module-type-INPUT/index.html | 2 +- .../Bare/module-type-OUTPUT/index.html | 2 +- .../Proof_ser/Clause/index.html | 2 +- .../Proof_ser/Expr_app/index.html | 2 +- .../Proof_ser/Expr_bool/index.html | 2 +- .../Proof_ser/Expr_def/index.html | 2 +- .../Proof_ser/Expr_eq/index.html | 2 +- .../Proof_ser/Expr_if/index.html | 2 +- .../Proof_ser/Expr_isa/index.html | 2 +- .../Proof_ser/Expr_not/index.html | 2 +- .../Proof_ser/Fun_decl/index.html | 2 +- .../Proof_ser/ID/index.html | 2 +- .../Proof_ser/Lit/index.html | 2 +- .../Proof_ser/Step/index.html | 2 +- .../Proof_ser/Step_bool_c/index.html | 2 +- .../Proof_ser/Step_bool_tauto/index.html | 2 +- .../Proof_ser/Step_bridge_lit_expr/index.html | 2 +- .../Proof_ser/Step_cc/index.html | 2 +- .../Proof_ser/Step_clause_rw/index.html | 2 +- .../Proof_ser/Step_input/index.html | 2 +- .../Proof_ser/Step_preprocess/index.html | 2 +- .../Proof_ser/Step_proof_p1/index.html | 2 +- .../Proof_ser/Step_proof_r1/index.html | 2 +- .../Proof_ser/Step_proof_res/index.html | 2 +- .../Proof_ser/Step_rup/index.html | 2 +- .../Proof_ser/Step_true/index.html | 2 +- .../Proof_ser/Step_unsat/index.html | 2 +- .../Proof_ser/Step_view/index.html | 2 +- .../Proof_ser/index.html | 2 +- .../Storage/index.html | 2 +- .../Sidekick_base_proof_trace/index.html | 2 +- .../Sidekick_base_proof_trace__/index.html | 2 - .../index.html | 2 - .../index.html | 2 - .../.dummy} | 0 .../Sidekick_base_solver/Gensym/index.html | 2 + .../Solver/Lit/T/Fun/index.html | 2 +- .../Solver/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver/Lit/T/Term/index.html | 2 +- .../Solver/Lit/T/Ty/index.html | 2 +- .../Solver/Lit/T/index.html | 2 +- .../Solver/Lit/index.html | 2 +- .../Solver/Model/index.html | 2 +- .../Solver/P/Step_vec/index.html | 2 +- .../Sidekick_base_solver/Solver/P/index.html | 6 +- .../Solver/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 +- .../CC/Actions/Lit/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/Lit/T/Term/index.html | 2 +- .../CC/Actions/Lit/T/Ty/index.html | 2 +- .../CC/Actions/Lit/T/index.html | 2 +- .../Solver_internal/CC/Actions/Lit/index.html | 2 +- .../CC/Actions/P/Step_vec/index.html | 3 +- .../Solver_internal/CC/Actions/P/index.html | 6 +- .../CC/Actions/T/Fun/index.html | 2 +- .../CC/Actions/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/T/Term/index.html | 2 +- .../CC/Actions/T/Ty/index.html | 2 +- .../Solver_internal/CC/Actions/T/index.html | 2 +- .../Solver_internal/CC/Actions/index.html | 10 +++- .../Solver_internal/CC/Debug_/index.html | 2 +- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../CC/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../Solver_internal/CC/Lit/T/index.html | 2 +- .../Solver/Solver_internal/CC/Lit/index.html | 2 +- .../Solver/Solver_internal/CC/N/index.html | 3 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../Solver/Solver_internal/CC/P/index.html | 6 +- .../CC/Resolved_expl/index.html | 4 ++ .../Solver_internal/CC/T/Fun/index.html | 2 +- .../Solver_internal/CC/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/CC/T/Term/index.html | 2 +- .../Solver/Solver_internal/CC/T/Ty/index.html | 2 +- .../Solver/Solver_internal/CC/T/index.html | 2 +- .../Solver/Solver_internal/CC/index.html | 15 ++++- .../Solver_internal/Lit/T/Fun/index.html | 2 +- .../Solver_internal/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/Lit/T/Term/index.html | 2 +- .../Solver_internal/Lit/T/Ty/index.html | 2 +- .../Solver/Solver_internal/Lit/T/index.html | 2 +- .../Solver/Solver_internal/Lit/index.html | 2 +- .../Solver_internal/P/Step_vec/index.html | 2 +- .../Solver/Solver_internal/P/index.html | 6 +- .../Solver_internal/Registry/index.html | 3 + .../Solver_internal/Simplify/index.html | 2 +- .../Solver/Solver_internal/T/Fun/index.html | 2 +- .../Solver_internal/T/Term/Tbl/index.html | 25 +++++++- .../Solver/Solver_internal/T/Term/index.html | 2 +- .../Solver/Solver_internal/T/Ty/index.html | 2 +- .../Solver/Solver_internal/T/index.html | 2 +- .../Solver/Solver_internal/index.html | 37 +++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Solver/T/Fun/index.html | 2 +- .../Solver/T/Term/Tbl/index.html | 25 +++++++- .../Solver/T/Term/index.html | 2 +- .../Solver/T/Ty/index.html | 2 +- .../Sidekick_base_solver/Solver/T/index.html | 2 +- .../Solver/Unknown/index.html | 2 +- .../Sidekick_base_solver/Solver/index.html | 31 ++++++++-- .../Solver/module-type-THEORY/index.html | 2 +- .../Solver_arg/index.html | 11 +++- .../Th_bool/A/Gensym/index.html | 2 +- .../Th_bool/A/S/Lit/T/Fun/index.html | 2 +- .../Th_bool/A/S/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Th_bool/A/S/Lit/T/Term/index.html | 2 +- .../Th_bool/A/S/Lit/T/Ty/index.html | 2 +- .../Th_bool/A/S/Lit/T/index.html | 2 +- .../Th_bool/A/S/Lit/index.html | 2 +- .../Th_bool/A/S/Model/index.html | 2 +- .../Th_bool/A/S/P/Step_vec/index.html | 2 +- .../Th_bool/A/S/P/index.html | 6 +- .../Th_bool/A/S/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 +- .../CC/Actions/Lit/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/Lit/T/Term/index.html | 2 +- .../CC/Actions/Lit/T/Ty/index.html | 2 +- .../CC/Actions/Lit/T/index.html | 2 +- .../Solver_internal/CC/Actions/Lit/index.html | 2 +- .../CC/Actions/P/Step_vec/index.html | 3 +- .../S/Solver_internal/CC/Actions/P/index.html | 6 +- .../CC/Actions/T/Fun/index.html | 2 +- .../CC/Actions/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/T/Term/index.html | 2 +- .../CC/Actions/T/Ty/index.html | 2 +- .../S/Solver_internal/CC/Actions/T/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/index.html | 10 +++- .../A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../CC/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/T/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 3 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 6 +- .../CC/Resolved_expl/index.html | 4 ++ .../A/S/Solver_internal/CC/T/Fun/index.html | 2 +- .../Solver_internal/CC/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_bool/A/S/Solver_internal/CC/index.html | 15 ++++- .../A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Solver_internal/Lit/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/Lit/T/index.html | 2 +- .../A/S/Solver_internal/Lit/index.html | 2 +- .../A/S/Solver_internal/P/Step_vec/index.html | 2 +- .../Th_bool/A/S/Solver_internal/P/index.html | 6 +- .../A/S/Solver_internal/Registry/index.html | 3 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/T/Fun/index.html | 2 +- .../A/S/Solver_internal/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/T/Term/index.html | 2 +- .../A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_bool/A/S/Solver_internal/T/index.html | 2 +- .../Th_bool/A/S/Solver_internal/index.html | 37 +++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Th_bool/A/S/T/Fun/index.html | 2 +- .../Th_bool/A/S/T/Term/Tbl/index.html | 25 +++++++- .../Th_bool/A/S/T/Term/index.html | 2 +- .../Th_bool/A/S/T/Ty/index.html | 2 +- .../Th_bool/A/S/T/index.html | 2 +- .../Th_bool/A/S/Unknown/index.html | 2 +- .../Th_bool/A/S/index.html | 31 ++++++++-- .../Th_bool/A/S/module-type-THEORY/index.html | 2 +- .../Sidekick_base_solver/Th_bool/A/index.html | 7 ++- .../Sidekick_base_solver/Th_bool/index.html | 2 +- .../Th_data/A/Cstor/index.html | 2 +- .../Th_data/A/P/index.html | 18 +++++- .../Th_data/A/S/Lit/T/Fun/index.html | 2 +- .../Th_data/A/S/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Th_data/A/S/Lit/T/Term/index.html | 2 +- .../Th_data/A/S/Lit/T/Ty/index.html | 2 +- .../Th_data/A/S/Lit/T/index.html | 2 +- .../Th_data/A/S/Lit/index.html | 2 +- .../Th_data/A/S/Model/index.html | 2 +- .../Th_data/A/S/P/Step_vec/index.html | 2 +- .../Th_data/A/S/P/index.html | 6 +- .../Th_data/A/S/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 +- .../CC/Actions/Lit/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/Lit/T/Term/index.html | 2 +- .../CC/Actions/Lit/T/Ty/index.html | 2 +- .../CC/Actions/Lit/T/index.html | 2 +- .../Solver_internal/CC/Actions/Lit/index.html | 2 +- .../CC/Actions/P/Step_vec/index.html | 3 +- .../S/Solver_internal/CC/Actions/P/index.html | 6 +- .../CC/Actions/T/Fun/index.html | 2 +- .../CC/Actions/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/T/Term/index.html | 2 +- .../CC/Actions/T/Ty/index.html | 2 +- .../S/Solver_internal/CC/Actions/T/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/index.html | 10 +++- .../A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../CC/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/T/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 3 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 6 +- .../CC/Resolved_expl/index.html | 4 ++ .../A/S/Solver_internal/CC/T/Fun/index.html | 2 +- .../Solver_internal/CC/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_data/A/S/Solver_internal/CC/index.html | 15 ++++- .../A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Solver_internal/Lit/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/Lit/T/index.html | 2 +- .../A/S/Solver_internal/Lit/index.html | 2 +- .../A/S/Solver_internal/P/Step_vec/index.html | 2 +- .../Th_data/A/S/Solver_internal/P/index.html | 6 +- .../A/S/Solver_internal/Registry/index.html | 3 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/T/Fun/index.html | 2 +- .../A/S/Solver_internal/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/T/Term/index.html | 2 +- .../A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_data/A/S/Solver_internal/T/index.html | 2 +- .../Th_data/A/S/Solver_internal/index.html | 37 +++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Th_data/A/S/T/Fun/index.html | 2 +- .../Th_data/A/S/T/Term/Tbl/index.html | 25 +++++++- .../Th_data/A/S/T/Term/index.html | 2 +- .../Th_data/A/S/T/Ty/index.html | 2 +- .../Th_data/A/S/T/index.html | 2 +- .../Th_data/A/S/Unknown/index.html | 2 +- .../Th_data/A/S/index.html | 31 ++++++++-- .../Th_data/A/S/module-type-THEORY/index.html | 2 +- .../Sidekick_base_solver/Th_data/A/index.html | 10 +++- .../Sidekick_base_solver/Th_data/index.html | 2 +- .../Th_lia/A/LRA_solver/A/Gensym/index.html | 2 + .../Th_lia/A/LRA_solver/A/Q/index.html | 2 + .../A/LRA_solver/A/S/Lit/T/Fun/index.html | 2 + .../LRA_solver/A/S/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../A/LRA_solver/A/S/Lit/T/Term/index.html | 2 + .../A/LRA_solver/A/S/Lit/T/Ty/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/Lit/T/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/Lit/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/Model/index.html | 2 + .../A/LRA_solver/A/S/P/Step_vec/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/P/index.html | 6 ++ .../A/LRA_solver/A/S/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 + .../CC/Actions/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../CC/Actions/Lit/T/Term/index.html | 2 + .../CC/Actions/Lit/T/Ty/index.html | 2 + .../CC/Actions/Lit/T/index.html | 2 + .../Solver_internal/CC/Actions/Lit/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/Actions/P/index.html | 6 ++ .../CC/Actions/T/Fun/index.html | 2 + .../CC/Actions/T/Term/Tbl/index.html | 23 ++++++++ .../CC/Actions/T/Term/index.html | 2 + .../CC/Actions/T/Ty/index.html | 2 + .../S/Solver_internal/CC/Actions/T/index.html | 2 + .../A/S/Solver_internal/CC/Actions/index.html | 10 ++++ .../A/S/Solver_internal/CC/Debug_/index.html | 2 + .../A/S/Solver_internal/CC/Expl/index.html | 2 + .../S/Solver_internal/CC/Lit/T/Fun/index.html | 2 + .../CC/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../Solver_internal/CC/Lit/T/Term/index.html | 2 + .../S/Solver_internal/CC/Lit/T/Ty/index.html | 2 + .../A/S/Solver_internal/CC/Lit/T/index.html | 2 + .../A/S/Solver_internal/CC/Lit/index.html | 2 + .../A/S/Solver_internal/CC/N/index.html | 2 + .../Solver_internal/CC/P/Step_vec/index.html | 2 + .../A/S/Solver_internal/CC/P/index.html | 6 ++ .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/T/Fun/index.html | 2 + .../Solver_internal/CC/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/CC/T/Term/index.html | 2 + .../A/S/Solver_internal/CC/T/Ty/index.html | 2 + .../A/S/Solver_internal/CC/T/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 13 +++++ .../A/S/Solver_internal/Lit/T/Fun/index.html | 2 + .../Solver_internal/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/Lit/T/Term/index.html | 2 + .../A/S/Solver_internal/Lit/T/Ty/index.html | 2 + .../A/S/Solver_internal/Lit/T/index.html | 2 + .../A/S/Solver_internal/Lit/index.html | 2 + .../A/S/Solver_internal/P/Step_vec/index.html | 2 + .../A/S/Solver_internal/P/index.html | 6 ++ .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 + .../A/S/Solver_internal/T/Fun/index.html | 2 + .../A/S/Solver_internal/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/T/Term/index.html | 2 + .../A/S/Solver_internal/T/Ty/index.html | 2 + .../A/S/Solver_internal/T/index.html | 2 + .../LRA_solver/A/S/Solver_internal/index.html | 35 ++++++++++++ .../module-type-PREPROCESS_ACTS/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/T/Fun/index.html | 2 + .../A/LRA_solver/A/S/T/Term/Tbl/index.html | 23 ++++++++ .../Th_lia/A/LRA_solver/A/S/T/Term/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/T/Ty/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/T/index.html | 2 + .../A/LRA_solver/A/S/Unknown/index.html | 2 + .../Th_lia/A/LRA_solver/A/S/index.html | 26 +++++++++ .../A/S/module-type-THEORY/index.html | 2 + .../Th_lia/A/LRA_solver/A/Z/index.html | 2 + .../Th_lia/A/LRA_solver/A/index.html | 5 ++ .../SimpSolver/Constraint/index.html | 2 + .../A/LRA_solver/SimpSolver/Q/index.html | 2 + .../A/LRA_solver/SimpSolver/Subst/index.html | 2 + .../SimpSolver/Unsat_cert/index.html | 2 + .../A/LRA_solver/SimpSolver/V/index.html | 2 + .../A/LRA_solver/SimpSolver/V_map/index.html | 32 +++++++++++ .../A/LRA_solver/SimpSolver/Z/index.html | 2 + .../Th_lia/A/LRA_solver/SimpSolver/index.html | 16 ++++++ .../Th_lia/A/LRA_solver/index.html | 2 + .../Th_lia/A/Q/index.html | 2 + .../Th_lia/A/S/Lit/T/Fun/index.html | 2 + .../Th_lia/A/S/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../Th_lia/A/S/Lit/T/Term/index.html | 2 + .../Th_lia/A/S/Lit/T/Ty/index.html | 2 + .../Th_lia/A/S/Lit/T/index.html | 2 + .../Th_lia/A/S/Lit/index.html | 2 + .../Th_lia/A/S/Model/index.html | 2 + .../Th_lia/A/S/P/Step_vec/index.html | 2 + .../Th_lia/A/S/P/index.html | 6 ++ .../Th_lia/A/S/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 + .../CC/Actions/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../CC/Actions/Lit/T/Term/index.html | 2 + .../CC/Actions/Lit/T/Ty/index.html | 2 + .../CC/Actions/Lit/T/index.html | 2 + .../Solver_internal/CC/Actions/Lit/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 3 + .../S/Solver_internal/CC/Actions/P/index.html | 6 ++ .../CC/Actions/T/Fun/index.html | 2 + .../CC/Actions/T/Term/Tbl/index.html | 23 ++++++++ .../CC/Actions/T/Term/index.html | 2 + .../CC/Actions/T/Ty/index.html | 2 + .../S/Solver_internal/CC/Actions/T/index.html | 2 + .../A/S/Solver_internal/CC/Actions/index.html | 10 ++++ .../A/S/Solver_internal/CC/Debug_/index.html | 2 + .../A/S/Solver_internal/CC/Expl/index.html | 2 + .../S/Solver_internal/CC/Lit/T/Fun/index.html | 2 + .../CC/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../Solver_internal/CC/Lit/T/Term/index.html | 2 + .../S/Solver_internal/CC/Lit/T/Ty/index.html | 2 + .../A/S/Solver_internal/CC/Lit/T/index.html | 2 + .../A/S/Solver_internal/CC/Lit/index.html | 2 + .../A/S/Solver_internal/CC/N/index.html | 3 + .../Solver_internal/CC/P/Step_vec/index.html | 2 + .../A/S/Solver_internal/CC/P/index.html | 6 ++ .../CC/Resolved_expl/index.html | 4 ++ .../A/S/Solver_internal/CC/T/Fun/index.html | 2 + .../Solver_internal/CC/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/CC/T/Term/index.html | 2 + .../A/S/Solver_internal/CC/T/Ty/index.html | 2 + .../A/S/Solver_internal/CC/T/index.html | 2 + .../Th_lia/A/S/Solver_internal/CC/index.html | 13 +++++ .../A/S/Solver_internal/Lit/T/Fun/index.html | 2 + .../Solver_internal/Lit/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/Lit/T/Term/index.html | 2 + .../A/S/Solver_internal/Lit/T/Ty/index.html | 2 + .../A/S/Solver_internal/Lit/T/index.html | 2 + .../Th_lia/A/S/Solver_internal/Lit/index.html | 2 + .../A/S/Solver_internal/P/Step_vec/index.html | 2 + .../Th_lia/A/S/Solver_internal/P/index.html | 6 ++ .../A/S/Solver_internal/Registry/index.html | 3 + .../A/S/Solver_internal/Simplify/index.html | 2 + .../A/S/Solver_internal/T/Fun/index.html | 2 + .../A/S/Solver_internal/T/Term/Tbl/index.html | 23 ++++++++ .../A/S/Solver_internal/T/Term/index.html | 2 + .../A/S/Solver_internal/T/Ty/index.html | 2 + .../Th_lia/A/S/Solver_internal/T/index.html | 2 + .../Th_lia/A/S/Solver_internal/index.html | 37 ++++++++++++ .../module-type-PREPROCESS_ACTS/index.html | 2 + .../Th_lia/A/S/T/Fun/index.html | 2 + .../Th_lia/A/S/T/Term/Tbl/index.html | 23 ++++++++ .../Th_lia/A/S/T/Term/index.html | 2 + .../Th_lia/A/S/T/Ty/index.html | 2 + .../Th_lia/A/S/T/index.html | 2 + .../Th_lia/A/S/Unknown/index.html | 2 + .../Th_lia/A/S/index.html | 28 +++++++++ .../Th_lia/A/S/module-type-THEORY/index.html | 2 + .../Th_lia/A/Z/index.html | 2 + .../Sidekick_base_solver/Th_lia/A/index.html | 5 ++ .../Sidekick_base_solver/Th_lia/index.html | 2 + .../Th_lra/A/Gensym/index.html | 2 +- .../Th_lra/A/Q/index.html | 2 +- .../Th_lra/A/S/Lit/T/Fun/index.html | 2 +- .../Th_lra/A/S/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Th_lra/A/S/Lit/T/Term/index.html | 2 +- .../Th_lra/A/S/Lit/T/Ty/index.html | 2 +- .../Th_lra/A/S/Lit/T/index.html | 2 +- .../Th_lra/A/S/Lit/index.html | 2 +- .../Th_lra/A/S/Model/index.html | 2 +- .../Th_lra/A/S/P/Step_vec/index.html | 2 +- .../Th_lra/A/S/P/index.html | 6 +- .../Th_lra/A/S/Registry/index.html | 2 + .../CC/Actions/Lit/T/Fun/index.html | 2 +- .../CC/Actions/Lit/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/Lit/T/Term/index.html | 2 +- .../CC/Actions/Lit/T/Ty/index.html | 2 +- .../CC/Actions/Lit/T/index.html | 2 +- .../Solver_internal/CC/Actions/Lit/index.html | 2 +- .../CC/Actions/P/Step_vec/index.html | 3 +- .../S/Solver_internal/CC/Actions/P/index.html | 6 +- .../CC/Actions/T/Fun/index.html | 2 +- .../CC/Actions/T/Term/Tbl/index.html | 25 +++++++- .../CC/Actions/T/Term/index.html | 2 +- .../CC/Actions/T/Ty/index.html | 2 +- .../S/Solver_internal/CC/Actions/T/index.html | 2 +- .../A/S/Solver_internal/CC/Actions/index.html | 10 +++- .../A/S/Solver_internal/CC/Debug_/index.html | 2 +- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Fun/index.html | 2 +- .../CC/Lit/T/Term/Tbl/index.html | 25 +++++++- .../Solver_internal/CC/Lit/T/Term/index.html | 2 +- .../S/Solver_internal/CC/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/T/index.html | 2 +- .../A/S/Solver_internal/CC/Lit/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 3 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 6 +- .../CC/Resolved_expl/index.html | 4 ++ .../A/S/Solver_internal/CC/T/Fun/index.html | 2 +- .../Solver_internal/CC/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/CC/T/Term/index.html | 2 +- .../A/S/Solver_internal/CC/T/Ty/index.html | 2 +- .../A/S/Solver_internal/CC/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/CC/index.html | 15 ++++- .../A/S/Solver_internal/Lit/T/Fun/index.html | 2 +- .../Solver_internal/Lit/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/Lit/T/Term/index.html | 2 +- .../A/S/Solver_internal/Lit/T/Ty/index.html | 2 +- .../A/S/Solver_internal/Lit/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/Lit/index.html | 2 +- .../A/S/Solver_internal/P/Step_vec/index.html | 2 +- .../Th_lra/A/S/Solver_internal/P/index.html | 6 +- .../A/S/Solver_internal/Registry/index.html | 3 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/T/Fun/index.html | 2 +- .../A/S/Solver_internal/T/Term/Tbl/index.html | 25 +++++++- .../A/S/Solver_internal/T/Term/index.html | 2 +- .../A/S/Solver_internal/T/Ty/index.html | 2 +- .../Th_lra/A/S/Solver_internal/T/index.html | 2 +- .../Th_lra/A/S/Solver_internal/index.html | 37 +++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Th_lra/A/S/T/Fun/index.html | 2 +- .../Th_lra/A/S/T/Term/Tbl/index.html | 25 +++++++- .../Th_lra/A/S/T/Term/index.html | 2 +- .../Th_lra/A/S/T/Ty/index.html | 2 +- .../Th_lra/A/S/T/index.html | 2 +- .../Th_lra/A/S/Unknown/index.html | 2 +- .../Th_lra/A/S/index.html | 31 ++++++++-- .../Th_lra/A/S/module-type-THEORY/index.html | 2 +- .../Th_lra/A/Z/index.html | 2 + .../Sidekick_base_solver/Th_lra/A/index.html | 5 +- .../Th_lra/SimpSolver/Constraint/index.html | 2 + .../Th_lra/SimpSolver/Q/index.html | 2 + .../Th_lra/SimpSolver/Subst/index.html | 2 + .../Th_lra/SimpSolver/Unsat_cert/index.html | 2 + .../Th_lra/SimpSolver/V}/index.html | 2 +- .../Th_lra/SimpSolver/Z/index.html | 2 + .../Th_lra/SimpSolver/index.html | 16 ++++++ .../Sidekick_base_solver/Th_lra/index.html | 2 +- .../Sidekick_base_solver/index.html | 2 +- dev/sidekick-base/index.html | 2 +- .../Sidekick_bin_lib/.dummy} | 0 .../Sidekick_bin_lib/Dimacs_lexer/index.html | 2 +- .../Sidekick_bin_lib/Dimacs_parser/index.html | 2 +- .../Sidekick_bin_lib/Drup_lexer/index.html | 2 +- .../Sidekick_bin_lib/Drup_parser/index.html | 2 +- dev/sidekick-bin/Sidekick_bin_lib/index.html | 2 +- .../Sidekick_bin_lib__/index.html | 2 - .../Sidekick_bin_lib__Dimacs_lexer/index.html | 2 - .../index.html | 2 - .../Sidekick_bin_lib__Drup_lexer/index.html | 2 - .../Sidekick_bin_lib__Drup_parser/index.html | 2 - .../Sidekick_smtlib/.dummy} | 0 .../Process/Check_cc/index.html | 2 +- .../Process/Solver/Lit/index.html | 2 +- .../Process/Solver/Model/index.html | 2 +- .../Process/Solver/P/Step_vec/index.html | 2 +- .../Process/Solver/P/index.html | 10 +++- .../Process/Solver/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../Solver_internal/CC/Actions/P/index.html | 10 +++- .../Solver_internal/CC/Actions/index.html | 15 ++++- .../Solver/Solver_internal/CC/Expl/index.html | 2 +- .../Solver/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../Solver/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../Solver/Solver_internal/CC/index.html | 27 ++++++++- .../Solver_internal/Registry/index.html | 2 + .../Solver_internal/Simplify/index.html | 2 +- .../Process/Solver/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Process/Solver/T/Fun/index.html | 2 +- .../Process/Solver/T/Term/index.html | 4 +- .../Process/Solver/T/Ty/index.html | 2 +- .../Process/Solver/T/index.html | 2 +- .../Process/Solver/Unknown/index.html | 2 +- .../Sidekick_smtlib/Process/Solver/index.html | 45 +++++++++++++-- .../Solver/module-type-THEORY/index.html | 2 +- .../Sidekick_smtlib/Process/index.html | 22 ++++++- dev/sidekick-bin/Sidekick_smtlib/index.html | 2 +- dev/sidekick-bin/Sidekick_smtlib__/.dune-keep | 0 dev/sidekick-bin/Sidekick_smtlib__/index.html | 2 - .../Sidekick_smtlib__Process/.dune-keep | 0 .../Sidekick_smtlib__Process/index.html | 2 - .../Sidekick_smtlib__Typecheck/.dune-keep | 0 .../Sidekick_smtlib__Typecheck/index.html | 2 - dev/sidekick-bin/index.html | 2 +- .../Sidekick_arith/.dummy} | 0 dev/sidekick/Sidekick_arith/.dune-keep | 0 dev/sidekick/Sidekick_arith/index.html | 2 +- .../Sidekick_arith/module-type-INT/index.html | 2 +- .../module-type-INT_FULL/index.html | 2 + .../Sidekick_arith/module-type-NUM/index.html | 2 +- .../module-type-RATIONAL/index.html | 2 +- .../Sidekick_arith_lia/.dummy} | 0 .../LRA_solver/A/Gensym/index.html | 2 + .../argument-1-A/LRA_solver/A/Q/index.html | 2 + .../argument-1-A/LRA_solver/A/Z/index.html | 2 + .../Make/argument-1-A/LRA_solver/A/index.html | 5 ++ .../SimpSolver/Constraint/index.html | 2 + .../LRA_solver/SimpSolver/Q/index.html | 2 + .../LRA_solver/SimpSolver/Subst/index.html | 2 + .../SimpSolver/Unsat_cert/index.html | 2 + .../LRA_solver/SimpSolver/V/index.html | 2 + .../LRA_solver/SimpSolver/Z/index.html | 2 + .../LRA_solver/SimpSolver/index.html | 16 ++++++ .../Make/argument-1-A/LRA_solver/index.html | 2 + .../Make/argument-1-A/Q/index.html | 2 + .../Make/argument-1-A/S/Lit/index.html | 2 + .../Make/argument-1-A/S/Model/index.html | 2 + .../Make/argument-1-A/S/P/Step_vec/index.html | 2 + .../Make/argument-1-A/S/P/index.html | 10 ++++ .../Make/argument-1-A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/Actions/P/index.html | 10 ++++ .../S/Solver_internal/CC/Actions/index.html | 15 +++++ .../S/Solver_internal/CC/Expl/index.html | 2 + .../S/Solver_internal/CC/N/index.html | 2 + .../Solver_internal/CC/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/P/index.html | 10 ++++ .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 25 ++++++++ .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 + .../argument-1-A/S/Solver_internal/index.html | 43 ++++++++++++++ .../module-type-PREPROCESS_ACTS/index.html | 2 + .../Make/argument-1-A/S/T/Fun/index.html | 2 + .../Make/argument-1-A/S/T/Term/index.html | 8 +++ .../Make/argument-1-A/S/T/Ty/index.html | 2 + .../Make/argument-1-A/S/T/index.html | 2 + .../Make/argument-1-A/S/Unknown/index.html | 2 + .../Make/argument-1-A/S/index.html | 37 ++++++++++++ .../S/module-type-THEORY/index.html | 2 + .../Make/argument-1-A/Z/index.html | 2 + .../Make/argument-1-A/index.html | 3 + .../Sidekick_arith_lia/Make/index.html | 2 + dev/sidekick/Sidekick_arith_lia/index.html | 5 ++ .../LRA_solver/A/Gensym/index.html | 2 + .../module-type-ARG/LRA_solver/A/Q/index.html | 2 + .../module-type-ARG/LRA_solver/A/Z/index.html | 2 + .../module-type-ARG/LRA_solver/A/index.html | 5 ++ .../SimpSolver/Constraint/index.html | 2 + .../LRA_solver/SimpSolver/Q/index.html | 2 + .../LRA_solver/SimpSolver/Subst/index.html | 2 + .../SimpSolver/Unsat_cert/index.html | 2 + .../LRA_solver/SimpSolver/V/index.html | 2 + .../LRA_solver/SimpSolver/Z/index.html | 2 + .../LRA_solver/SimpSolver/index.html | 16 ++++++ .../module-type-ARG/LRA_solver/index.html | 2 + .../module-type-ARG/Q/index.html | 2 + .../module-type-ARG/S/Lit/index.html | 2 + .../module-type-ARG/S/Model/index.html | 2 + .../module-type-ARG/S/P/Step_vec/index.html | 2 + .../module-type-ARG/S/P/index.html | 10 ++++ .../module-type-ARG/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/Actions/P/index.html | 10 ++++ .../S/Solver_internal/CC/Actions/index.html | 15 +++++ .../S/Solver_internal/CC/Expl/index.html | 2 + .../S/Solver_internal/CC/N/index.html | 2 + .../Solver_internal/CC/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/P/index.html | 10 ++++ .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 25 ++++++++ .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 + .../S/Solver_internal/index.html | 43 ++++++++++++++ .../module-type-PREPROCESS_ACTS/index.html | 2 + .../module-type-ARG/S/T/Fun/index.html | 2 + .../module-type-ARG/S/T/Term/index.html | 8 +++ .../module-type-ARG/S/T/Ty/index.html | 2 + .../module-type-ARG/S/T/index.html | 2 + .../module-type-ARG/S/Unknown/index.html | 2 + .../module-type-ARG/S/index.html | 37 ++++++++++++ .../S/module-type-THEORY/index.html | 2 + .../module-type-ARG/Z/index.html | 2 + .../module-type-ARG/index.html | 3 + .../A/LRA_solver/A/Gensym/index.html | 2 + .../module-type-S/A/LRA_solver/A/Q/index.html | 2 + .../module-type-S/A/LRA_solver/A/Z/index.html | 2 + .../module-type-S/A/LRA_solver/A/index.html | 5 ++ .../SimpSolver/Constraint/index.html | 2 + .../A/LRA_solver/SimpSolver/Q/index.html | 2 + .../A/LRA_solver/SimpSolver/Subst/index.html | 2 + .../SimpSolver/Unsat_cert/index.html | 2 + .../A/LRA_solver/SimpSolver/V/index.html | 2 + .../A/LRA_solver/SimpSolver/Z/index.html | 2 + .../A/LRA_solver/SimpSolver/index.html | 16 ++++++ .../module-type-S/A/LRA_solver/index.html | 2 + .../module-type-S/A/Q/index.html | 2 + .../module-type-S/A/S/Lit/index.html | 2 + .../module-type-S/A/S/Model/index.html | 2 + .../module-type-S/A/S/P/Step_vec/index.html | 2 + .../module-type-S/A/S/P/index.html | 10 ++++ .../module-type-S/A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 + .../S/Solver_internal/CC/Actions/P/index.html | 10 ++++ .../A/S/Solver_internal/CC/Actions/index.html | 15 +++++ .../A/S/Solver_internal/CC/Expl/index.html | 2 + .../A/S/Solver_internal/CC/N/index.html | 2 + .../Solver_internal/CC/P/Step_vec/index.html | 2 + .../A/S/Solver_internal/CC/P/index.html | 10 ++++ .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 25 ++++++++ .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 + .../A/S/Solver_internal/index.html | 43 ++++++++++++++ .../module-type-PREPROCESS_ACTS/index.html | 2 + .../module-type-S/A/S/T/Fun/index.html | 2 + .../module-type-S/A/S/T/Term/index.html | 8 +++ .../module-type-S/A/S/T/Ty/index.html | 2 + .../module-type-S/A/S/T/index.html | 2 + .../module-type-S/A/S/Unknown/index.html | 2 + .../module-type-S/A/S/index.html | 37 ++++++++++++ .../A/S/module-type-THEORY/index.html | 2 + .../module-type-S/A/Z/index.html | 2 + .../module-type-S/A/index.html | 3 + .../module-type-S/index.html | 2 + .../Sidekick_arith_lra/.dummy} | 0 dev/sidekick/Sidekick_arith_lra/.dune-keep | 0 .../Linear_expr/Make/Comb/index.html | 2 - .../Linear_expr/Make/Constr/index.html | 2 - .../Linear_expr/Make/Expr/index.html | 2 - .../Linear_expr/Make/argument-1-C/index.html | 2 - .../Make/argument-2-Var/index.html | 2 - .../Linear_expr/Make/index.html | 2 - .../Sidekick_arith_lra/Linear_expr/index.html | 2 - .../Linear_expr/module-type-COEFF/index.html | 2 - .../Linear_expr/module-type-S/C/index.html | 2 - .../module-type-S/Comb/Infix/index.html | 2 - .../Linear_expr/module-type-S/Comb/index.html | 2 - .../module-type-S/Constr/index.html | 2 - .../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 - .../Linear_expr/module-type-S/index.html | 2 - .../Make/SimpSolver/Constraint/index.html | 2 + .../Make/SimpSolver/Q/index.html | 2 + .../Make/SimpSolver/Subst/index.html | 2 + .../Make/SimpSolver/Unsat_cert/index.html | 2 + .../Make/SimpSolver/V/index.html | 2 + .../Make/SimpSolver/Z/index.html | 2 + .../Make/SimpSolver/index.html | 16 ++++++ .../Make/argument-1-A/Gensym/index.html | 2 +- .../Make/argument-1-A/Q/index.html | 2 +- .../Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/Model/index.html | 2 +- .../Make/argument-1-A/S/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/S/P/index.html | 10 +++- .../Make/argument-1-A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../argument-1-A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Make/argument-1-A/S/T/Term/index.html | 4 +- .../Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Make/argument-1-A/S/T/index.html | 2 +- .../Make/argument-1-A/S/Unknown/index.html | 2 +- .../Make/argument-1-A/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../Make/argument-1-A/Z/index.html | 2 + .../Make/argument-1-A/index.html | 2 +- .../Sidekick_arith_lra/Make/index.html | 2 +- .../Sidekick_arith_lra/Predicate/index.html | 2 - .../Simplex2/Make/Constraint/index.html | 2 - .../Simplex2/Make/Subst/index.html | 2 - .../Simplex2/Make/Unsat_cert/index.html | 2 - .../Simplex2/Make/argument-1-Q/index.html | 2 - .../Simplex2/Make/argument-2-Var/index.html | 2 - .../Simplex2/Make/index.html | 2 - .../Sidekick_arith_lra/Simplex2/Op/index.html | 2 - .../Sidekick_arith_lra/Simplex2/index.html | 2 - .../module-type-S/Constraint/index.html | 2 - .../Simplex2/module-type-S/Q/index.html | 2 - .../Simplex2/module-type-S/Subst/index.html | 2 - .../module-type-S/Unsat_cert/index.html | 2 - .../Simplex2/module-type-S/V/index.html | 2 - .../Simplex2/module-type-S/index.html | 2 - dev/sidekick/Sidekick_arith_lra/index.html | 2 +- .../module-type-ARG/Gensym/index.html | 2 +- .../module-type-ARG/Q/index.html | 2 +- .../module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/Model/index.html | 2 +- .../module-type-ARG/S/P/Step_vec/index.html | 2 +- .../module-type-ARG/S/P/index.html | 10 +++- .../module-type-ARG/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-ARG/S/T/Fun/index.html | 2 +- .../module-type-ARG/S/T/Term/index.html | 4 +- .../module-type-ARG/S/T/Ty/index.html | 2 +- .../module-type-ARG/S/T/index.html | 2 +- .../module-type-ARG/S/Unknown/index.html | 2 +- .../module-type-ARG/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../module-type-ARG/Z/index.html | 2 + .../module-type-ARG/index.html | 2 +- .../module-type-S/A/Gensym/index.html | 2 +- .../module-type-S/A/Q/index.html | 2 +- .../module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/Model/index.html | 2 +- .../module-type-S/A/S/P/Step_vec/index.html | 2 +- .../module-type-S/A/S/P/index.html | 10 +++- .../module-type-S/A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../A/S/Solver_internal/CC/Actions/index.html | 15 ++++- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 27 ++++++++- .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-S/A/S/T/Fun/index.html | 2 +- .../module-type-S/A/S/T/Term/index.html | 4 +- .../module-type-S/A/S/T/Ty/index.html | 2 +- .../module-type-S/A/S/T/index.html | 2 +- .../module-type-S/A/S/Unknown/index.html | 2 +- .../module-type-S/A/S/index.html | 40 +++++++++++-- .../A/S/module-type-THEORY/index.html | 2 +- .../module-type-S/A/Z/index.html | 2 + .../module-type-S/A/index.html | 2 +- .../SimpSolver/Constraint/index.html | 2 + .../module-type-S/SimpSolver/Q/index.html | 2 + .../module-type-S/SimpSolver/Subst/index.html | 2 + .../SimpSolver/Unsat_cert/index.html | 2 + .../module-type-S/SimpSolver/V/index.html | 2 + .../module-type-S/SimpSolver/Z/index.html | 2 + .../module-type-S/SimpSolver/index.html | 16 ++++++ .../module-type-S/index.html | 2 +- dev/sidekick/Sidekick_arith_lra__/.dune-keep | 0 dev/sidekick/Sidekick_arith_lra__/index.html | 2 - .../.dune-keep | 0 .../index.html | 2 - .../.dune-keep | 0 .../index.html | 2 - .../Sidekick_arith_lra__Predicate/.dune-keep | 0 .../Sidekick_arith_lra__Predicate/index.html | 2 - .../Sidekick_arith_lra__Simplex2/.dune-keep | 0 .../Sidekick_arith_lra__Simplex2/index.html | 2 - .../.dune-keep | 0 .../index.html | 2 - .../Sidekick_cc/.dummy} | 0 dev/sidekick/Sidekick_cc/.dune-keep | 0 dev/sidekick/Sidekick_cc/Make/Expl/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/N/index.html | 2 +- .../Sidekick_cc/Make/P/Step_vec/index.html | 2 +- dev/sidekick/Sidekick_cc/Make/P/index.html | 10 +++- .../Sidekick_cc/Make/Resolved_expl/index.html | 2 + .../Actions/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/Actions/P/index.html | 10 +++- .../Make/argument-1-A/Actions/index.html | 15 ++++- .../Make/argument-1-A/Lit/index.html | 2 +- .../Make/argument-1-A/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/P/index.html | 10 +++- .../Make/argument-1-A/T/Fun/index.html | 2 +- .../Make/argument-1-A/T/Term/index.html | 4 +- .../Make/argument-1-A/T/Ty/index.html | 2 +- .../Make/argument-1-A/T/index.html | 2 +- .../Sidekick_cc/Make/argument-1-A/index.html | 14 ++++- dev/sidekick/Sidekick_cc/Make/index.html | 19 ++++++- dev/sidekick/Sidekick_cc/index.html | 10 +++- .../Sidekick_core/.dummy} | 0 dev/sidekick/Sidekick_core/.dune-keep | 0 dev/sidekick/Sidekick_core/CC_view/index.html | 14 ++++- .../SI/CC/Actions/P/Step_vec/index.html | 2 +- .../argument-1-M/SI/CC/Actions/P/index.html | 10 +++- .../argument-1-M/SI/CC/Actions/index.html | 15 ++++- .../argument-1-M/SI/CC/Expl/index.html | 2 +- .../argument-1-M/SI/CC/N/index.html | 2 +- .../argument-1-M/SI/CC/P/Step_vec/index.html | 2 +- .../argument-1-M/SI/CC/P/index.html | 10 +++- .../SI/CC/Resolved_expl/index.html | 2 + .../argument-1-M/SI/CC/index.html | 27 ++++++++- .../argument-1-M/SI/Lit/index.html | 2 +- .../argument-1-M/SI/P/Step_vec/index.html | 2 +- .../argument-1-M/SI/P/index.html | 10 +++- .../argument-1-M/SI/Registry/index.html | 2 + .../argument-1-M/SI/Simplify/index.html | 2 +- .../argument-1-M/SI/T/Fun/index.html | 2 +- .../argument-1-M/SI/T/Term/index.html | 4 +- .../argument-1-M/SI/T/Ty/index.html | 2 +- .../argument-1-M/SI/T/index.html | 2 +- .../Monoid_of_repr/argument-1-M/SI/index.html | 49 +++++++++++++++- .../SI/module-type-PREPROCESS_ACTS/index.html | 2 +- .../Monoid_of_repr/argument-1-M/index.html | 13 ++++- .../Sidekick_core/Monoid_of_repr/index.html | 2 +- dev/sidekick/Sidekick_core/index.html | 2 +- .../module-type-CC_ACTIONS/Lit/index.html | 2 +- .../P/Step_vec/index.html | 2 +- .../module-type-CC_ACTIONS/P/index.html | 10 +++- .../module-type-CC_ACTIONS/T/Fun/index.html | 2 +- .../module-type-CC_ACTIONS/T/Term/index.html | 4 +- .../module-type-CC_ACTIONS/T/Ty/index.html | 2 +- .../module-type-CC_ACTIONS/T/index.html | 2 +- .../module-type-CC_ACTIONS/index.html | 15 ++++- .../Actions/P/Step_vec/index.html | 2 +- .../module-type-CC_ARG/Actions/P/index.html | 10 +++- .../module-type-CC_ARG/Actions/index.html | 15 ++++- .../module-type-CC_ARG/Lit/index.html | 2 +- .../module-type-CC_ARG/P/Step_vec/index.html | 2 +- .../module-type-CC_ARG/P/index.html | 10 +++- .../module-type-CC_ARG/T/Fun/index.html | 2 +- .../module-type-CC_ARG/T/Term/index.html | 4 +- .../module-type-CC_ARG/T/Ty/index.html | 2 +- .../module-type-CC_ARG/T/index.html | 2 +- .../module-type-CC_ARG/index.html | 12 +++- .../Actions/P/Step_vec/index.html | 2 +- .../module-type-CC_S/Actions/P/index.html | 10 +++- .../module-type-CC_S/Actions/index.html | 15 ++++- .../module-type-CC_S/Expl/index.html | 2 +- .../module-type-CC_S/Lit/index.html | 2 +- .../module-type-CC_S/N/index.html | 2 +- .../module-type-CC_S/P/Step_vec/index.html | 2 +- .../module-type-CC_S/P/index.html | 10 +++- .../module-type-CC_S/Resolved_expl/index.html | 2 + .../module-type-CC_S/T/Fun/index.html | 2 +- .../module-type-CC_S/T/Term/index.html | 4 +- .../module-type-CC_S/T/Ty/index.html | 2 +- .../module-type-CC_S/T/index.html | 2 +- .../Sidekick_core/module-type-CC_S/index.html | 24 +++++++- .../module-type-LIT/T/Fun/index.html | 2 +- .../module-type-LIT/T/Term/index.html | 4 +- .../module-type-LIT/T/Ty/index.html | 2 +- .../module-type-LIT/T/index.html | 2 +- .../Sidekick_core/module-type-LIT/index.html | 2 +- .../SI/CC/Actions/P/Step_vec/index.html | 2 +- .../SI/CC/Actions/P/index.html | 10 +++- .../SI/CC/Actions/index.html | 15 ++++- .../SI/CC/Expl/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/N/index.html | 2 +- .../SI/CC/P/Step_vec/index.html | 2 +- .../module-type-MONOID_ARG/SI/CC/P/index.html | 10 +++- .../SI/CC/Resolved_expl/index.html | 2 + .../module-type-MONOID_ARG/SI/CC/index.html | 27 ++++++++- .../module-type-MONOID_ARG/SI/Lit/index.html | 2 +- .../SI/P/Step_vec/index.html | 2 +- .../module-type-MONOID_ARG/SI/P/index.html | 10 +++- .../SI/Registry/index.html | 2 + .../SI/Simplify/index.html | 2 +- .../SI/T/Fun/index.html | 2 +- .../SI/T/Term/index.html | 4 +- .../module-type-MONOID_ARG/SI/T/Ty/index.html | 2 +- .../module-type-MONOID_ARG/SI/T/index.html | 2 +- .../module-type-MONOID_ARG/SI/index.html | 49 +++++++++++++++- .../SI/module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-MONOID_ARG/index.html | 13 ++++- .../module-type-PROOF/Step_vec/index.html | 2 +- .../module-type-PROOF/index.html | 10 +++- .../module-type-REGISTRY/index.html | 2 + .../module-type-SAT_PROOF/Step_vec/index.html | 2 +- .../module-type-SAT_PROOF/index.html | 2 +- .../module-type-SOLVER/Lit/index.html | 2 +- .../module-type-SOLVER/Model/index.html | 2 +- .../module-type-SOLVER/P/Step_vec/index.html | 2 +- .../module-type-SOLVER/P/index.html | 10 +++- .../module-type-SOLVER/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../Solver_internal/CC/Actions/P/index.html | 10 +++- .../Solver_internal/CC/Actions/index.html | 15 ++++- .../Solver_internal/CC/Expl/index.html | 2 +- .../Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../Solver_internal/CC/index.html | 27 ++++++++- .../Solver_internal/Registry/index.html | 2 + .../Solver_internal/Simplify/index.html | 2 +- .../Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-SOLVER/T/Fun/index.html | 2 +- .../module-type-SOLVER/T/Term/index.html | 4 +- .../module-type-SOLVER/T/Ty/index.html | 2 +- .../module-type-SOLVER/T/index.html | 2 +- .../module-type-SOLVER/Unknown/index.html | 2 +- .../module-type-SOLVER/index.html | 40 +++++++++++-- .../module-type-THEORY/index.html | 2 +- .../CC/Actions/P/Step_vec/index.html | 2 +- .../CC/Actions/P/index.html | 10 +++- .../CC/Actions/index.html | 15 ++++- .../CC/Expl/index.html | 2 +- .../CC/N/index.html | 2 +- .../CC/P/Step_vec/index.html | 2 +- .../CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../module-type-SOLVER_INTERNAL/CC/index.html | 27 ++++++++- .../Lit/index.html | 2 +- .../P/Step_vec/index.html | 2 +- .../module-type-SOLVER_INTERNAL/P/index.html | 10 +++- .../Registry/index.html | 2 + .../Simplify/index.html | 2 +- .../T/Fun/index.html | 2 +- .../T/Term/index.html | 4 +- .../T/Ty/index.html | 2 +- .../module-type-SOLVER_INTERNAL/T/index.html | 2 +- .../module-type-SOLVER_INTERNAL/index.html | 49 +++++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-TERM/Fun/index.html | 2 +- .../module-type-TERM/Term/index.html | 4 +- .../module-type-TERM/Ty/index.html | 2 +- .../Sidekick_core/module-type-TERM/index.html | 2 +- .../Sidekick_drup/.dummy} | 0 dev/sidekick/Sidekick_drup/.dune-keep | 0 .../Sidekick_drup/Make/Atom/index.html | 2 +- .../Sidekick_drup/Make/Checker/index.html | 2 +- .../Sidekick_drup/Make/Clause/index.html | 2 +- dev/sidekick/Sidekick_drup/Make/index.html | 2 +- dev/sidekick/Sidekick_drup/index.html | 2 +- .../module-type-S/Atom/index.html | 2 +- .../module-type-S/Checker/index.html | 2 +- .../module-type-S/Clause/index.html | 2 +- .../Sidekick_drup/module-type-S/index.html | 2 +- .../Sidekick_intsolver/.dummy} | 0 .../Sidekick_intsolver/Make/Cert/index.html | 2 + .../Sidekick_intsolver/Make/Model/index.html | 2 + .../Sidekick_intsolver/Make/Op/index.html | 2 + .../Make/argument-1-A/Z/index.html | 2 + .../Make/argument-1-A/index.html | 2 + .../Sidekick_intsolver/Make/index.html | 2 + dev/sidekick/Sidekick_intsolver/index.html | 2 + .../module-type-ARG/Z/index.html | 2 + .../module-type-ARG/index.html | 2 + .../module-type-S/A/Z/index.html | 2 + .../module-type-S/A/index.html | 2 + .../module-type-S/Cert/index.html | 2 + .../module-type-S/Model/index.html | 2 + .../module-type-S/Op/index.html | 2 + .../module-type-S/index.html | 2 + .../Sidekick_lit/.dummy} | 0 dev/sidekick/Sidekick_lit/.dune-keep | 0 .../Make/argument-1-T/Fun/index.html | 2 +- .../Make/argument-1-T/Term/index.html | 4 +- .../Make/argument-1-T/Ty/index.html | 2 +- .../Sidekick_lit/Make/argument-1-T/index.html | 2 +- dev/sidekick/Sidekick_lit/Make/index.html | 2 +- dev/sidekick/Sidekick_lit/index.html | 2 +- .../Sidekick_memtrace/.dummy} | 0 dev/sidekick/Sidekick_memtrace/.dune-keep | 0 dev/sidekick/Sidekick_memtrace/index.html | 6 +- .../Sidekick_mini_cc/.dummy} | 0 dev/sidekick/Sidekick_mini_cc/.dune-keep | 0 .../Make/argument-1-A/T/Fun/index.html | 2 +- .../Make/argument-1-A/T/Term/index.html | 4 +- .../Make/argument-1-A/T/Ty/index.html | 2 +- .../Make/argument-1-A/T/index.html | 2 +- .../Make/argument-1-A/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/Make/index.html | 2 +- dev/sidekick/Sidekick_mini_cc/index.html | 7 ++- .../module-type-ARG/T/Fun/index.html | 2 +- .../module-type-ARG/T/Term/index.html | 4 +- .../module-type-ARG/T/Ty/index.html | 2 +- .../module-type-ARG/T/index.html | 2 +- .../module-type-ARG/index.html | 2 +- .../Sidekick_mini_cc/module-type-S/index.html | 2 +- .../Sidekick_quip/.dummy} | 0 dev/sidekick/Sidekick_quip/.dune-keep | 0 .../Sidekick_quip/Proof/Fun/index.html | 2 +- .../Sidekick_quip/Proof/Lit/index.html | 6 +- dev/sidekick/Sidekick_quip/Proof/T/index.html | 2 +- .../Sidekick_quip/Proof/Ty/index.html | 2 +- dev/sidekick/Sidekick_quip/Proof/index.html | 2 +- dev/sidekick/Sidekick_quip/index.html | 2 +- dev/sidekick/Sidekick_quip__/.dune-keep | 0 dev/sidekick/Sidekick_quip__/index.html | 2 - dev/sidekick/Sidekick_quip__Proof/.dune-keep | 0 dev/sidekick/Sidekick_quip__Proof/index.html | 2 - .../Sidekick_sat/.dummy} | 0 dev/sidekick/Sidekick_sat/.dune-keep | 0 .../Proof_dummy/Make/Step_vec/index.html | 2 +- .../Make/argument-1-Lit/index.html | 2 +- .../Sidekick_sat/Proof_dummy/Make/index.html | 5 +- .../Sidekick_sat/Proof_dummy/index.html | 2 +- .../Solver/Make_cdcl_t/Clause/index.html | 2 +- .../Make_cdcl_t/argument-1-Th/Lit/index.html | 2 +- .../argument-1-Th/Proof/Step_vec/index.html | 2 +- .../argument-1-Th/Proof/index.html | 2 +- .../Make_cdcl_t/argument-1-Th/index.html | 6 +- .../Solver/Make_cdcl_t/index.html | 30 +++++++++- .../Solver/Make_pure_sat/Clause/index.html | 2 +- .../argument-1-Th/Lit/index.html | 2 +- .../argument-1-Th/Proof/Step_vec/index.html | 2 +- .../argument-1-Th/Proof/index.html | 2 +- .../Make_pure_sat/argument-1-Th/index.html | 6 +- .../Solver/Make_pure_sat/index.html | 30 +++++++++- dev/sidekick/Sidekick_sat/Solver/index.html | 20 ++++++- .../Solver_intf/Clause_pool_id/index.html | 2 +- .../Sidekick_sat/Solver_intf/index.html | 10 +++- .../Solver_intf/module-type-ACTS/index.html | 2 +- .../Solver_intf/module-type-LIT/index.html | 2 +- .../module-type-PLUGIN_CDCL_T/Lit/index.html | 2 +- .../Proof/Step_vec/index.html | 2 +- .../Proof/index.html | 2 +- .../module-type-PLUGIN_CDCL_T/index.html | 3 +- .../module-type-PLUGIN_SAT/Lit/index.html | 2 +- .../Proof/Step_vec/index.html | 2 +- .../module-type-PLUGIN_SAT/Proof/index.html | 2 +- .../module-type-PLUGIN_SAT/index.html | 3 +- .../module-type-S/Clause/index.html | 2 +- .../Solver_intf/module-type-S/Lit/index.html | 2 +- .../module-type-S/Proof/Step_vec/index.html | 2 +- .../module-type-S/Proof/index.html | 2 +- .../Solver_intf/module-type-S/index.html | 30 +++++++++- .../module-type-SAT_STATE/index.html | 2 +- .../module-type-UNSAT_STATE/index.html | 2 +- dev/sidekick/Sidekick_sat/index.html | 3 +- dev/sidekick/Sidekick_sat__/.dune-keep | 0 dev/sidekick/Sidekick_sat__/index.html | 2 - dev/sidekick/Sidekick_sat__Heap/.dune-keep | 0 dev/sidekick/Sidekick_sat__Heap/index.html | 2 - .../Sidekick_sat__Heap_intf/.dune-keep | 0 .../Sidekick_sat__Heap_intf/index.html | 2 - .../Sidekick_sat__Proof_dummy/.dune-keep | 0 .../Sidekick_sat__Proof_dummy/index.html | 2 - dev/sidekick/Sidekick_sat__Solver/.dune-keep | 0 dev/sidekick/Sidekick_sat__Solver/index.html | 2 - .../Sidekick_sat__Solver_intf/.dune-keep | 0 .../Sidekick_sat__Solver_intf/index.html | 2 - .../Sidekick_sigs/.dummy} | 0 dev/sidekick/Sidekick_sigs/.dune-keep | 0 dev/sidekick/Sidekick_sigs/index.html | 2 +- .../Sidekick_sigs/module-type-EQ/index.html | 2 +- .../Sidekick_sigs/module-type-HASH/index.html | 2 +- .../Sidekick_sigs/module-type-ORD/index.html | 2 +- .../module-type-PRINT/index.html | 2 +- .../Sidekick_simplex/.dummy} | 0 .../Sidekick_simplex/Binary_op/index.html | 2 + .../Linear_expr/Make/Comb/Infix/index.html | 2 + .../Linear_expr/Make/Comb/index.html | 2 + .../Linear_expr/Make/Constr/index.html | 2 + .../Linear_expr/Make/Expr/Infix/index.html | 2 + .../Linear_expr/Make/Expr/index.html | 2 + .../Linear_expr/Make/argument-1-C/index.html | 2 + .../Make/argument-2-Var}/index.html | 2 +- .../Linear_expr/Make/index.html | 2 + .../Sidekick_simplex/Linear_expr/index.html | 5 ++ .../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 + .../Linear_expr_intf/module-type-S/index.html | 2 + .../module-type-VAR/index.html | 2 + .../Make/Constraint/index.html | 2 + .../Sidekick_simplex/Make/Subst/index.html | 2 + .../Make/Unsat_cert/index.html | 2 + .../Make/argument-1-Arg/Q/index.html | 2 + .../Make/argument-1-Arg/Var/index.html | 2 + .../Make/argument-1-Arg/Z/index.html | 2 + .../Make/argument-1-Arg/index.html | 2 + dev/sidekick/Sidekick_simplex/Make/index.html | 16 ++++++ dev/sidekick/Sidekick_simplex/Op/index.html | 2 + .../Sidekick_simplex/Predicate/index.html | 2 + dev/sidekick/Sidekick_simplex/index.html | 4 ++ .../module-type-ARG/Q/index.html | 2 + .../module-type-ARG/Var/index.html | 2 + .../module-type-ARG/Z/index.html | 2 + .../module-type-ARG/index.html | 2 + .../module-type-S/Constraint/index.html | 2 + .../module-type-S/Q/index.html | 2 + .../module-type-S/Subst/index.html | 2 + .../module-type-S/Unsat_cert/index.html | 2 + .../module-type-S/V/index.html | 2 + .../module-type-S/Z/index.html | 2 + .../Sidekick_simplex/module-type-S/index.html | 16 ++++++ .../Sidekick_smt_solver/.dummy} | 0 dev/sidekick/Sidekick_smt_solver/.dune-keep | 0 .../Sidekick_smt_solver/Make/Model/index.html | 2 +- .../Make/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../Solver_internal/CC/Actions/P/index.html | 10 +++- .../Solver_internal/CC/Actions/index.html | 15 ++++- .../Make/Solver_internal/CC/Expl/index.html | 2 +- .../Make/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../Make/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../Make/Solver_internal/CC/index.html | 27 ++++++++- .../Make/Solver_internal/Registry/index.html | 2 + .../Make/Solver_internal/Simplify/index.html | 2 +- .../Make/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Make/Unknown/index.html | 2 +- .../Make/argument-1-A/Lit/index.html | 2 +- .../Make/argument-1-A/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/P/index.html | 10 +++- .../Make/argument-1-A/T/Fun/index.html | 2 +- .../Make/argument-1-A/T/Term/index.html | 4 +- .../Make/argument-1-A/T/Ty/index.html | 2 +- .../Make/argument-1-A/T/index.html | 2 +- .../Make/argument-1-A/index.html | 9 ++- .../Sidekick_smt_solver/Make/index.html | 35 ++++++++++-- .../Make/module-type-THEORY/index.html | 2 +- .../Sidekick_smt_solver/Registry/index.html | 2 + dev/sidekick/Sidekick_smt_solver/index.html | 10 +++- .../module-type-ARG/Lit/index.html | 2 +- .../module-type-ARG/P/Step_vec/index.html | 2 +- .../module-type-ARG/P/index.html | 10 +++- .../module-type-ARG/T/Fun/index.html | 2 +- .../module-type-ARG/T/Term/index.html | 4 +- .../module-type-ARG/T/Ty/index.html | 2 +- .../module-type-ARG/T/index.html | 2 +- .../module-type-ARG/index.html | 9 ++- .../Sidekick_tef/.dummy} | 0 dev/sidekick/Sidekick_tef/.dune-keep | 0 dev/sidekick/Sidekick_tef/index.html | 2 +- .../Sidekick_th_bool_static/.dummy} | 0 .../Sidekick_th_bool_static/.dune-keep | 0 .../Make/argument-1-A/Gensym/index.html | 2 +- .../Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/Model/index.html | 2 +- .../Make/argument-1-A/S/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/S/P/index.html | 10 +++- .../Make/argument-1-A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../argument-1-A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Make/argument-1-A/S/T/Term/index.html | 4 +- .../Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Make/argument-1-A/S/T/index.html | 2 +- .../Make/argument-1-A/S/Unknown/index.html | 2 +- .../Make/argument-1-A/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../Make/argument-1-A/index.html | 9 ++- .../Sidekick_th_bool_static/Make/index.html | 2 +- .../Sidekick_th_bool_static/index.html | 2 +- .../module-type-ARG/Gensym/index.html | 2 +- .../module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/Model/index.html | 2 +- .../module-type-ARG/S/P/Step_vec/index.html | 2 +- .../module-type-ARG/S/P/index.html | 10 +++- .../module-type-ARG/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-ARG/S/T/Fun/index.html | 2 +- .../module-type-ARG/S/T/Term/index.html | 4 +- .../module-type-ARG/S/T/Ty/index.html | 2 +- .../module-type-ARG/S/T/index.html | 2 +- .../module-type-ARG/S/Unknown/index.html | 2 +- .../module-type-ARG/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../module-type-ARG/index.html | 9 ++- .../module-type-PROOF/index.html | 2 +- .../module-type-S/A/Gensym/index.html | 2 +- .../module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/Model/index.html | 2 +- .../module-type-S/A/S/P/Step_vec/index.html | 2 +- .../module-type-S/A/S/P/index.html | 10 +++- .../module-type-S/A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../A/S/Solver_internal/CC/Actions/index.html | 15 ++++- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 27 ++++++++- .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-S/A/S/T/Fun/index.html | 2 +- .../module-type-S/A/S/T/Term/index.html | 4 +- .../module-type-S/A/S/T/Ty/index.html | 2 +- .../module-type-S/A/S/T/index.html | 2 +- .../module-type-S/A/S/Unknown/index.html | 2 +- .../module-type-S/A/S/index.html | 40 +++++++++++-- .../A/S/module-type-THEORY/index.html | 2 +- .../module-type-S/A/index.html | 9 ++- .../module-type-S/index.html | 2 +- .../Sidekick_th_cstor/.dummy} | 0 dev/sidekick/Sidekick_th_cstor/.dune-keep | 0 .../Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/Model/index.html | 2 +- .../Make/argument-1-A/S/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/S/P/index.html | 10 +++- .../Make/argument-1-A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../argument-1-A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Make/argument-1-A/S/T/Term/index.html | 4 +- .../Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Make/argument-1-A/S/T/index.html | 2 +- .../Make/argument-1-A/S/Unknown/index.html | 2 +- .../Make/argument-1-A/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../Make/argument-1-A/index.html | 2 +- .../Sidekick_th_cstor/Make/index.html | 2 +- dev/sidekick/Sidekick_th_cstor/index.html | 2 +- .../module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/Model/index.html | 2 +- .../module-type-ARG/S/P/Step_vec/index.html | 2 +- .../module-type-ARG/S/P/index.html | 10 +++- .../module-type-ARG/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-ARG/S/T/Fun/index.html | 2 +- .../module-type-ARG/S/T/Term/index.html | 4 +- .../module-type-ARG/S/T/Ty/index.html | 2 +- .../module-type-ARG/S/T/index.html | 2 +- .../module-type-ARG/S/Unknown/index.html | 2 +- .../module-type-ARG/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../module-type-ARG/index.html | 2 +- .../module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/Model/index.html | 2 +- .../module-type-S/A/S/P/Step_vec/index.html | 2 +- .../module-type-S/A/S/P/index.html | 10 +++- .../module-type-S/A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../A/S/Solver_internal/CC/Actions/index.html | 15 ++++- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 27 ++++++++- .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-S/A/S/T/Fun/index.html | 2 +- .../module-type-S/A/S/T/Term/index.html | 4 +- .../module-type-S/A/S/T/Ty/index.html | 2 +- .../module-type-S/A/S/T/index.html | 2 +- .../module-type-S/A/S/Unknown/index.html | 2 +- .../module-type-S/A/S/index.html | 40 +++++++++++-- .../A/S/module-type-THEORY/index.html | 2 +- .../module-type-S/A/index.html | 2 +- .../module-type-S/index.html | 2 +- .../Sidekick_th_data/.dummy} | 0 dev/sidekick/Sidekick_th_data/.dune-keep | 0 .../Make/argument-1-A/Cstor/index.html | 2 +- .../Make/argument-1-A/P/index.html | 18 +++++- .../Make/argument-1-A/S/Lit/index.html | 2 +- .../Make/argument-1-A/S/Model/index.html | 2 +- .../Make/argument-1-A/S/P/Step_vec/index.html | 2 +- .../Make/argument-1-A/S/P/index.html | 10 +++- .../Make/argument-1-A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../argument-1-A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../Make/argument-1-A/S/T/Fun/index.html | 2 +- .../Make/argument-1-A/S/T/Term/index.html | 4 +- .../Make/argument-1-A/S/T/Ty/index.html | 2 +- .../Make/argument-1-A/S/T/index.html | 2 +- .../Make/argument-1-A/S/Unknown/index.html | 2 +- .../Make/argument-1-A/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../Make/argument-1-A/index.html | 11 +++- dev/sidekick/Sidekick_th_data/Make/index.html | 2 +- dev/sidekick/Sidekick_th_data/index.html | 2 +- .../module-type-ARG/Cstor/index.html | 2 +- .../module-type-ARG/P/index.html | 18 +++++- .../module-type-ARG/S/Lit/index.html | 2 +- .../module-type-ARG/S/Model/index.html | 2 +- .../module-type-ARG/S/P/Step_vec/index.html | 2 +- .../module-type-ARG/S/P/index.html | 10 +++- .../module-type-ARG/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../S/Solver_internal/CC/Actions/index.html | 15 ++++- .../S/Solver_internal/CC/Expl/index.html | 2 +- .../S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../S/Solver_internal/CC/index.html | 27 ++++++++- .../S/Solver_internal/Registry/index.html | 2 + .../S/Solver_internal/Simplify/index.html | 2 +- .../S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-ARG/S/T/Fun/index.html | 2 +- .../module-type-ARG/S/T/Term/index.html | 4 +- .../module-type-ARG/S/T/Ty/index.html | 2 +- .../module-type-ARG/S/T/index.html | 2 +- .../module-type-ARG/S/Unknown/index.html | 2 +- .../module-type-ARG/S/index.html | 40 +++++++++++-- .../S/module-type-THEORY/index.html | 2 +- .../module-type-ARG/index.html | 11 +++- .../module-type-PROOF/index.html | 2 +- .../module-type-S/A/Cstor/index.html | 2 +- .../module-type-S/A/P/index.html | 18 +++++- .../module-type-S/A/S/Lit/index.html | 2 +- .../module-type-S/A/S/Model/index.html | 2 +- .../module-type-S/A/S/P/Step_vec/index.html | 2 +- .../module-type-S/A/S/P/index.html | 10 +++- .../module-type-S/A/S/Registry/index.html | 2 + .../CC/Actions/P/Step_vec/index.html | 2 +- .../S/Solver_internal/CC/Actions/P/index.html | 10 +++- .../A/S/Solver_internal/CC/Actions/index.html | 15 ++++- .../A/S/Solver_internal/CC/Expl/index.html | 2 +- .../A/S/Solver_internal/CC/N/index.html | 2 +- .../Solver_internal/CC/P/Step_vec/index.html | 2 +- .../A/S/Solver_internal/CC/P/index.html | 10 +++- .../CC/Resolved_expl/index.html | 2 + .../A/S/Solver_internal/CC/index.html | 27 ++++++++- .../A/S/Solver_internal/Registry/index.html | 2 + .../A/S/Solver_internal/Simplify/index.html | 2 +- .../A/S/Solver_internal/index.html | 44 +++++++++++++- .../module-type-PREPROCESS_ACTS/index.html | 2 +- .../module-type-S/A/S/T/Fun/index.html | 2 +- .../module-type-S/A/S/T/Term/index.html | 4 +- .../module-type-S/A/S/T/Ty/index.html | 2 +- .../module-type-S/A/S/T/index.html | 2 +- .../module-type-S/A/S/Unknown/index.html | 2 +- .../module-type-S/A/S/index.html | 40 +++++++++++-- .../A/S/module-type-THEORY/index.html | 2 +- .../module-type-S/A/index.html | 11 +++- .../Sidekick_th_data/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_th_data__/.dune-keep | 0 dev/sidekick/Sidekick_th_data__/index.html | 2 - .../Sidekick_th_data__Th_intf/.dune-keep | 0 .../Sidekick_th_data__Th_intf/index.html | 2 - .../Sidekick_th_data__Types/.dune-keep | 0 .../Sidekick_th_data__Types/index.html | 2 - .../Sidekick_util/.dummy} | 0 dev/sidekick/Sidekick_util/.dune-keep | 0 .../Sidekick_util/Backtrack_stack/index.html | 2 +- .../Backtrackable_ref/index.html | 2 +- .../Make/argument-1-A/index.html | 2 +- .../Backtrackable_tbl/Make/index.html | 2 +- .../Backtrackable_tbl/index.html | 2 +- .../module-type-ARG/index.html | 2 +- .../module-type-S/index.html | 2 +- dev/sidekick/Sidekick_util/Bag/index.html | 2 +- dev/sidekick/Sidekick_util/Bitvec/index.html | 2 +- .../Sidekick_util/Chunk_stack/Buf/index.html | 2 +- .../Chunk_stack/Reader/index.html | 6 +- .../Chunk_stack/Writer/index.html | 2 +- .../Sidekick_util/Chunk_stack/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 | 7 ++- .../Sidekick_util/Int_id/Make/index.html | 2 +- dev/sidekick/Sidekick_util/Int_id/index.html | 2 +- .../Int_id/module-type-S/index.html | 2 +- dev/sidekick/Sidekick_util/Log/index.html | 6 +- .../Sidekick_util/Profile/Control/index.html | 2 +- dev/sidekick/Sidekick_util/Profile/index.html | 2 +- .../Profile/module-type-BACKEND/index.html | 7 ++- dev/sidekick/Sidekick_util/Stat/index.html | 2 +- dev/sidekick/Sidekick_util/Util/index.html | 5 +- dev/sidekick/Sidekick_util/Vec/index.html | 8 ++- dev/sidekick/Sidekick_util/VecI32/index.html | 2 +- .../Sidekick_util/VecSmallInt/index.html | 2 +- .../Sidekick_util/Vec_float/index.html | 2 +- .../Make_extensions/argument-1-B/index.html | 2 +- .../Vec_sig/Make_extensions/index.html | 2 +- dev/sidekick/Sidekick_util/Vec_sig/index.html | 4 +- .../Vec_sig/module-type-BASE/index.html | 2 +- .../Vec_sig/module-type-BASE_RO/index.html | 2 +- .../Vec_sig/module-type-EXTENSIONS/index.html | 2 +- .../Vec_sig/module-type-S/index.html | 2 +- .../Sidekick_util/Vec_unit/index.html | 2 +- dev/sidekick/Sidekick_util/index.html | 2 +- dev/sidekick/Sidekick_util__/.dune-keep | 0 dev/sidekick/Sidekick_util__/index.html | 2 - .../Sidekick_util__Backtrack_stack/.dune-keep | 0 .../Sidekick_util__Backtrack_stack/index.html | 2 - .../.dune-keep | 0 .../index.html | 2 - .../.dune-keep | 0 .../index.html | 2 - dev/sidekick/Sidekick_util__Bag/.dune-keep | 0 dev/sidekick/Sidekick_util__Bag/index.html | 2 - dev/sidekick/Sidekick_util__Bitvec/.dune-keep | 0 dev/sidekick/Sidekick_util__Bitvec/index.html | 2 - .../Sidekick_util__Chunk_stack/.dune-keep | 0 .../Sidekick_util__Chunk_stack/index.html | 2 - dev/sidekick/Sidekick_util__Error/.dune-keep | 0 dev/sidekick/Sidekick_util__Error/index.html | 2 - dev/sidekick/Sidekick_util__Hash/.dune-keep | 0 dev/sidekick/Sidekick_util__Hash/index.html | 2 - dev/sidekick/Sidekick_util__IArray/.dune-keep | 0 dev/sidekick/Sidekick_util__IArray/index.html | 2 - dev/sidekick/Sidekick_util__Int_id/.dune-keep | 0 dev/sidekick/Sidekick_util__Int_id/index.html | 2 - dev/sidekick/Sidekick_util__Log/.dune-keep | 0 dev/sidekick/Sidekick_util__Log/index.html | 2 - .../Sidekick_util__Profile/.dune-keep | 0 .../Sidekick_util__Profile/index.html | 2 - dev/sidekick/Sidekick_util__Stat/.dune-keep | 0 dev/sidekick/Sidekick_util__Stat/index.html | 2 - dev/sidekick/Sidekick_util__Util/.dune-keep | 0 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_util__VecI32/.dune-keep | 0 dev/sidekick/Sidekick_util__VecI32/index.html | 2 - .../Sidekick_util__VecSmallInt/.dune-keep | 0 .../Sidekick_util__VecSmallInt/index.html | 2 - .../Sidekick_util__Vec_float/.dune-keep | 0 .../Sidekick_util__Vec_float/index.html | 2 - .../Sidekick_util__Vec_sig/.dune-keep | 0 .../Sidekick_util__Vec_sig/index.html | 2 - .../Sidekick_util__Vec_unit/.dune-keep | 0 .../Sidekick_util__Vec_unit/index.html | 2 - .../Sidekick_zarith/.dummy} | 0 dev/sidekick/Sidekick_zarith/.dune-keep | 0 dev/sidekick/Sidekick_zarith/Int/index.html | 2 +- .../Sidekick_zarith/Rational/index.html | 2 +- dev/sidekick/Sidekick_zarith/index.html | 3 +- dev/sidekick/index.html | 2 +- 1588 files changed, 7166 insertions(+), 1416 deletions(-) rename dev/sidekick-base/Sidekick_base/{.dune-keep => .dummy} (100%) create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/LIA_view/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/LRA_op/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/LRA_pred/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/LRA_view/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/Term/LIA/index.html create mode 100644 dev/sidekick-base/Sidekick_base/Base_types/Term/module-type-ARITH_HELPER/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Base_types/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__CCHet/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Config/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Form/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Hashcons/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__ID/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Lit/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Model/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Proof/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Proof_dummy/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Proof_quip/index.html delete mode 100644 dev/sidekick-base/Sidekick_base__Solver_arg/index.html rename dev/sidekick-base/{Sidekick_base__/.dune-keep => Sidekick_base_proof_trace/.dummy} (100%) delete mode 100644 dev/sidekick-base/Sidekick_base_proof_trace__/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_proof_trace__Proof_ser/index.html delete mode 100644 dev/sidekick-base/Sidekick_base_proof_trace__Storage/index.html rename dev/sidekick-base/{Sidekick_base__Base_types/.dune-keep => Sidekick_base_solver/.dummy} (100%) create mode 100644 dev/sidekick-base/Sidekick_base_solver/Gensym/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Gensym/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Q/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Model/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Debug_/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Unknown/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/module-type-THEORY/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Z/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Q/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Subst/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V_map/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Z/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Q/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Model/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Debug_/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/P/Step_vec/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/P/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Fun/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/Tbl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Ty/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Unknown/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/module-type-THEORY/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Z/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/A/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lia/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Z/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Q/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Subst/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Unsat_cert/index.html rename dev/{sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR => sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/V}/index.html (69%) create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Z/index.html create mode 100644 dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/index.html rename dev/{sidekick-base/Sidekick_base__CCHet/.dune-keep => sidekick-bin/Sidekick_bin_lib/.dummy} (100%) delete mode 100644 dev/sidekick-bin/Sidekick_bin_lib__/index.html delete mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/index.html delete mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/index.html delete mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/index.html delete mode 100644 dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/index.html rename dev/{sidekick-base/Sidekick_base__Config/.dune-keep => sidekick-bin/Sidekick_smtlib/.dummy} (100%) create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Registry/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Registry/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__/.dune-keep delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/.dune-keep delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Process/index.html delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Typecheck/.dune-keep delete mode 100644 dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html rename dev/{sidekick-base/Sidekick_base__Form/.dune-keep => sidekick/Sidekick_arith/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_arith/.dune-keep create mode 100644 dev/sidekick/Sidekick_arith/module-type-INT_FULL/index.html rename dev/{sidekick-base/Sidekick_base__Hashcons/.dune-keep => sidekick/Sidekick_arith_lia/.dummy} (100%) create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Gensym/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Subst/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/V/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Lit/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Model/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Unknown/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/module-type-THEORY/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/Make/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Gensym/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Subst/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/V/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Lit/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Model/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Unknown/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/module-type-THEORY/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-ARG/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Gensym/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Subst/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/V/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Lit/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Model/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/N/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Simplify/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Fun/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Term/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Ty/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Unknown/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/module-type-THEORY/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/A/index.html create mode 100644 dev/sidekick/Sidekick_arith_lia/module-type-S/index.html rename dev/{sidekick-base/Sidekick_base__ID/.dune-keep => sidekick/Sidekick_arith_lra/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_arith_lra/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Subst/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/V/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Z/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Predicate/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-ARG/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Q/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Subst/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/V/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Z/index.html create mode 100644 dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__Linear_expr/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__Predicate/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__Predicate/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__Simplex2/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__Simplex2/index.html delete mode 100644 dev/sidekick/Sidekick_arith_lra__Simplex_intf/.dune-keep delete mode 100644 dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html rename dev/{sidekick-base/Sidekick_base__Lit/.dune-keep => sidekick/Sidekick_cc/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_cc/.dune-keep create mode 100644 dev/sidekick/Sidekick_cc/Make/Resolved_expl/index.html rename dev/{sidekick-base/Sidekick_base__Model/.dune-keep => sidekick/Sidekick_core/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_core/.dune-keep create mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Registry/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-CC_S/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Registry/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-REGISTRY/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Registry/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Registry/index.html rename dev/{sidekick-base/Sidekick_base__Proof/.dune-keep => sidekick/Sidekick_drup/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_drup/.dune-keep rename dev/{sidekick-base/Sidekick_base__Proof_dummy/.dune-keep => sidekick/Sidekick_intsolver/.dummy} (100%) create mode 100644 dev/sidekick/Sidekick_intsolver/Make/Cert/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/Make/Model/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/Make/Op/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/Make/argument-1-A/Z/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/Make/argument-1-A/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/Make/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-ARG/Z/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-ARG/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/A/Z/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/A/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/Cert/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/Model/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/Op/index.html create mode 100644 dev/sidekick/Sidekick_intsolver/module-type-S/index.html rename dev/{sidekick-base/Sidekick_base__Proof_quip/.dune-keep => sidekick/Sidekick_lit/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_lit/.dune-keep rename dev/{sidekick-base/Sidekick_base__Solver_arg/.dune-keep => sidekick/Sidekick_memtrace/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_memtrace/.dune-keep rename dev/{sidekick-base/Sidekick_base_proof_trace/.dune-keep => sidekick/Sidekick_mini_cc/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_mini_cc/.dune-keep rename dev/{sidekick-base/Sidekick_base_proof_trace__/.dune-keep => sidekick/Sidekick_quip/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_quip/.dune-keep delete mode 100644 dev/sidekick/Sidekick_quip__/.dune-keep delete mode 100644 dev/sidekick/Sidekick_quip__/index.html delete mode 100644 dev/sidekick/Sidekick_quip__Proof/.dune-keep delete mode 100644 dev/sidekick/Sidekick_quip__Proof/index.html rename dev/{sidekick-base/Sidekick_base_proof_trace__Proof_ser/.dune-keep => sidekick/Sidekick_sat/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_sat/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Heap/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__Heap/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__Heap_intf/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Proof_dummy/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__Proof_dummy/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__Solver/index.html delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/.dune-keep delete mode 100644 dev/sidekick/Sidekick_sat__Solver_intf/index.html rename dev/{sidekick-base/Sidekick_base_proof_trace__Storage/.dune-keep => sidekick/Sidekick_sigs/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_sigs/.dune-keep rename dev/{sidekick-base/Sidekick_base_solver/.dune-keep => sidekick/Sidekick_simplex/.dummy} (100%) create mode 100644 dev/sidekick/Sidekick_simplex/Binary_op/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/Infix/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/Constr/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/Infix/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-1-C/index.html rename dev/sidekick/{Sidekick_arith_lra/Simplex2/module-type-VAR => Sidekick_simplex/Linear_expr/Make/argument-2-Var}/index.html (69%) create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/Make/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-COEFF/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/C/index.html rename dev/sidekick/{Sidekick_arith_lra/Linear_expr/Make => Sidekick_simplex/Linear_expr_intf/module-type-S}/Comb/Infix/index.html (74%) create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Comb/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Constr/index.html rename dev/sidekick/{Sidekick_arith_lra/Linear_expr/Make => Sidekick_simplex/Linear_expr_intf/module-type-S}/Expr/Infix/index.html (74%) create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Expr/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Var/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-VAR/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/Subst/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Q/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Var/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Z/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Make/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Op/index.html create mode 100644 dev/sidekick/Sidekick_simplex/Predicate/index.html create mode 100644 dev/sidekick/Sidekick_simplex/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-ARG/Q/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-ARG/Var/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-ARG/Z/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-ARG/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/Constraint/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/Q/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/Subst/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/Unsat_cert/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/V/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/Z/index.html create mode 100644 dev/sidekick/Sidekick_simplex/module-type-S/index.html rename dev/{sidekick-bin/Sidekick_bin_lib/.dune-keep => sidekick/Sidekick_smt_solver/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_smt_solver/.dune-keep create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Registry/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_smt_solver/Registry/index.html rename dev/{sidekick-bin/Sidekick_bin_lib__/.dune-keep => sidekick/Sidekick_tef/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_tef/.dune-keep rename dev/{sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep => sidekick/Sidekick_th_bool_static/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_th_bool_static/.dune-keep create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Registry/index.html rename dev/{sidekick-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep => sidekick/Sidekick_th_cstor/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_th_cstor/.dune-keep create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Registry/index.html rename dev/{sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep => sidekick/Sidekick_th_data/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_th_data/.dune-keep create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Registry/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html create mode 100644 dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Registry/index.html delete mode 100644 dev/sidekick/Sidekick_th_data__/.dune-keep delete mode 100644 dev/sidekick/Sidekick_th_data__/index.html delete mode 100644 dev/sidekick/Sidekick_th_data__Th_intf/.dune-keep delete mode 100644 dev/sidekick/Sidekick_th_data__Th_intf/index.html delete mode 100644 dev/sidekick/Sidekick_th_data__Types/.dune-keep delete mode 100644 dev/sidekick/Sidekick_th_data__Types/index.html rename dev/{sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep => sidekick/Sidekick_util/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_util/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__/index.html delete mode 100644 dev/sidekick/Sidekick_util__Backtrack_stack/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Backtrack_stack/index.html delete mode 100644 dev/sidekick/Sidekick_util__Backtrackable_ref/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Backtrackable_ref/index.html delete mode 100644 dev/sidekick/Sidekick_util__Backtrackable_tbl/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html delete mode 100644 dev/sidekick/Sidekick_util__Bag/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Bag/index.html delete mode 100644 dev/sidekick/Sidekick_util__Bitvec/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Bitvec/index.html delete mode 100644 dev/sidekick/Sidekick_util__Chunk_stack/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Chunk_stack/index.html delete mode 100644 dev/sidekick/Sidekick_util__Error/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Error/index.html delete mode 100644 dev/sidekick/Sidekick_util__Hash/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Hash/index.html delete mode 100644 dev/sidekick/Sidekick_util__IArray/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__IArray/index.html delete mode 100644 dev/sidekick/Sidekick_util__Int_id/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Int_id/index.html delete mode 100644 dev/sidekick/Sidekick_util__Log/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Log/index.html delete mode 100644 dev/sidekick/Sidekick_util__Profile/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Profile/index.html delete mode 100644 dev/sidekick/Sidekick_util__Stat/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Stat/index.html delete mode 100644 dev/sidekick/Sidekick_util__Util/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Util/index.html delete mode 100644 dev/sidekick/Sidekick_util__Vec/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Vec/index.html delete mode 100644 dev/sidekick/Sidekick_util__VecI32/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__VecI32/index.html delete mode 100644 dev/sidekick/Sidekick_util__VecSmallInt/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__VecSmallInt/index.html delete mode 100644 dev/sidekick/Sidekick_util__Vec_float/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Vec_float/index.html delete mode 100644 dev/sidekick/Sidekick_util__Vec_sig/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Vec_sig/index.html delete mode 100644 dev/sidekick/Sidekick_util__Vec_unit/.dune-keep delete mode 100644 dev/sidekick/Sidekick_util__Vec_unit/index.html rename dev/{sidekick-bin/Sidekick_smtlib/.dune-keep => sidekick/Sidekick_zarith/.dummy} (100%) delete mode 100644 dev/sidekick/Sidekick_zarith/.dune-keep diff --git a/dev/odoc.css b/dev/odoc.css index c5d2acb0..edc8a2b3 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 2.0.2 */ + odoc 2.1.1 */ /* Fonts */ @import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); @@ -124,7 +124,6 @@ /* Reset a few things. */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { - margin: 0; padding: 0; border: 0; font: inherit; @@ -153,7 +152,7 @@ body { } body { - max-width: 90ex; + max-width: 100ex; margin-left: calc(10vw + 20ex); margin-right: 4ex; margin-top: 20px; @@ -202,15 +201,6 @@ sup, sub { margin-left: 0.2ex; } -pre { - margin-top: 0.8em; - margin-bottom: 1.2em; -} - -p, ul, ol { - margin-top: 0.5em; - margin-bottom: 1em; -} ul, ol { list-style-position: outside } @@ -306,7 +296,6 @@ a.anchor { h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { font-family: "Fira Sans", Helvetica, Arial, sans-serif; font-weight: 400; - margin: 0.5em 0 0.5em 0; padding-top: 0.1em; line-height: 1.2; overflow-wrap: break-word; @@ -315,7 +304,6 @@ h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { h1 { font-weight: 500; font-size: 2.441em; - margin-top: 1.214em; } h1 { @@ -403,6 +391,10 @@ p a > code { color: var(--link-color); } +code { + white-space: pre-wrap; +} + /* Code blocks (e.g. Examples) */ pre code { @@ -427,8 +419,13 @@ pre code { padding: 0.35em 0.5em; } -div.spec, .def-doc { - margin-bottom: 20px; +.def-doc { + margin-bottom: 10px; +} + +/* Spacing between items */ +div.odoc-spec,.odoc-include { + margin-bottom: 2em; } .spec.type .variant { @@ -467,6 +464,10 @@ div.def-doc>*:first-child { position: relative; } +.odoc-include.shadowed-include { + display: none; +} + .odoc-include details:after { z-index: -100; display: block; @@ -483,7 +484,7 @@ div.def-doc>*:first-child { .odoc-include summary { position: relative; - margin-bottom: 20px; + margin-bottom: 1em; cursor: pointer; outline: none; } diff --git a/dev/sidekick-base/Sidekick_base/.dune-keep b/dev/sidekick-base/Sidekick_base/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base/.dune-keep rename to dev/sidekick-base/Sidekick_base/.dummy 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 0e4ff191..58e1cd3b 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 11db3452..d2d33f89 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 f2958345..35c49985 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 key = t
module Tbl : CCHashtbl.S with type 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 key = t
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/LIA_view/index.html b/dev/sidekick-base/Sidekick_base/Base_types/LIA_view/index.html new file mode 100644 index 00000000..464276e2 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/LIA_view/index.html @@ -0,0 +1,2 @@ + +LIA_view (sidekick-base.Sidekick_base.Base_types.LIA_view)

Module Base_types.LIA_view

type 'a t =
| Pred of LIA_pred.t * 'a * 'a
| Op of LIA_op.t * 'a * 'a
| Mult of Z.t * 'a
| Const of Z.t
| Var of 'a
val map : f_c:( Z.t -> Z.t ) -> ( 'a -> 'b ) -> 'a t -> 'b t
val iter : ( 'a -> unit ) -> 'a t -> unit
val pp : pp_t:( Fmt.t -> 'a -> unit ) -> Fmt.t -> 'a t -> unit
val hash : sub_hash:( 'a -> int ) -> 'a t -> int
val equal : sub_eq:( 'a -> 'b -> bool ) -> 'a t -> 'b t -> bool
val to_lra : ( 'a -> 'b ) -> 'a t -> 'b LRA_view.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/LRA_op/index.html b/dev/sidekick-base/Sidekick_base/Base_types/LRA_op/index.html new file mode 100644 index 00000000..e3d371ce --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/LRA_op/index.html @@ -0,0 +1,2 @@ + +LRA_op (sidekick-base.Sidekick_base.Base_types.LRA_op)

Module Base_types.LRA_op

type t = Sidekick_arith_lra.op =
| Plus
| Minus
val to_string : t -> string
val pp : Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/LRA_pred/index.html b/dev/sidekick-base/Sidekick_base/Base_types/LRA_pred/index.html new file mode 100644 index 00000000..f27abe97 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/LRA_pred/index.html @@ -0,0 +1,2 @@ + +LRA_pred (sidekick-base.Sidekick_base.Base_types.LRA_pred)

Module Base_types.LRA_pred

type t = Sidekick_arith_lra.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
val to_string : t -> string
val pp : Fmt.t -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/LRA_view/index.html b/dev/sidekick-base/Sidekick_base/Base_types/LRA_view/index.html new file mode 100644 index 00000000..ccc3b460 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/LRA_view/index.html @@ -0,0 +1,2 @@ + +LRA_view (sidekick-base.Sidekick_base.Base_types.LRA_view)

Module Base_types.LRA_view

type 'a t =
| Pred of LRA_pred.t * 'a * 'a
| Op of LRA_op.t * 'a * 'a
| Mult of Q.t * 'a
| Const of Q.t
| Var of 'a
| To_real of 'a
val map : f_c:( Q.t -> Q.t ) -> ( 'a -> 'b ) -> 'a t -> 'b t
val iter : ( 'a -> unit ) -> 'a t -> unit
val pp : pp_t:( Fmt.t -> 'a -> unit ) -> Fmt.t -> 'a t -> unit
val hash : sub_hash:( 'a -> int ) -> 'a t -> int
val equal : sub_eq:( 'a -> 'b -> bool ) -> 'a t -> 'b t -> bool
\ 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 2a4abf6a..02e4f8c9 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 5203da1e..5b06a921 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_get_model
| Stmt_get_value of 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 3b6729c3..0e7da7ce 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/LIA/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term/LIA/index.html new file mode 100644 index 00000000..4d9008e0 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term/LIA/index.html @@ -0,0 +1,2 @@ + +LIA (sidekick-base.Sidekick_base.Base_types.Term.LIA)

Module Term.LIA

val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> Z.t -> t -> t
val const : store -> Z.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
\ 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 adcb4541..39c9da98 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

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
\ 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 d3f74f0a..85643358 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 key = t
module Map : CCMap.S with type key = t
module Set : CCSet.S with type 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 'a LRA_view.t
| LIA of 'a LIA_view.t
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 -> t LRA_view.t -> t
val lia : store -> t LIA_view.t -> t
module type ARITH_HELPER = sig ... end
module LRA : ARITH_HELPER with type num := Q.t
module LIA : ARITH_HELPER with type num := Z.t
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 iter_shallow : store -> ( t -> unit ) -> t -> unit
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_, t, t 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 key = t
module Map : CCMap.S with type key = t
module Set : CCSet.S with type elt = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Base_types/Term/module-type-ARITH_HELPER/index.html b/dev/sidekick-base/Sidekick_base/Base_types/Term/module-type-ARITH_HELPER/index.html new file mode 100644 index 00000000..49cb29c2 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base/Base_types/Term/module-type-ARITH_HELPER/index.html @@ -0,0 +1,2 @@ + +ARITH_HELPER (sidekick-base.Sidekick_base.Base_types.Term.ARITH_HELPER)

Module type Term.ARITH_HELPER

type num
val plus : store -> t -> t -> t
val minus : store -> t -> t -> t
val mult : store -> num -> t -> t
val const : store -> num -> 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
\ 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 73da3453..a48b9e85 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 @@ -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 +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 d23ce76e..a7239a0a 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

module X : ARG

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

module X : ARG

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 e3e82e2f..5839c7a1 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 (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 'a LRA_view.t
| LIA of 'a LIA_view.t
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 : term LRA_view.t -> t
val lia : term LIA_view.t -> 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 (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 b9873cad..39ba2659 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 320326a4..57635e35 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 d6e5a7f6..5e71e306 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 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_int
| 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 int : 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 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 1107fbe1..0beac360 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 e8a913ed..2789572e 100644 --- a/dev/sidekick-base/Sidekick_base/Base_types/index.html +++ b/dev/sidekick-base/Sidekick_base/Base_types/index.html @@ -1,2 +1,7 @@ -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_db : Stdlib.Format.formatter -> (int * 'a) -> unit
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
val hash_z : Z.t -> int
val hash_q : Q.t -> CCHash.hash
module LRA_pred : sig ... end
module LRA_op : sig ... end
module LRA_view : sig ... end
module LIA_pred = LRA_pred
module LIA_op = LRA_op
module LIA_view : sig ... end
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 'a LRA_view.t
| LIA of 'a LIA_view.t

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_int
| 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_get_model
| Stmt_get_value of 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_db : Stdlib.Format.formatter -> (int * 'a) -> 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 13c1ab0f..eef026a8 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 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 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 d8921715..4ac8e259 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 6c9c44cd..d781ff28 100644 --- a/dev/sidekick-base/Sidekick_base/Form/index.html +++ b/dev/sidekick-base/Sidekick_base/Form/index.html @@ -1,2 +1,10 @@ -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
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 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
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
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 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
module Gensym : sig ... end
\ 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 b95bb974..a68a20ef 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

We use generative identifiers everywhere in Sidekick_base. Unlike strings, there are no risk of collision: during parsing, a new declaration or definition should create a fresh ID.t and associate it with the string name, and later references should look into some hashtable or map to get the ID corresponding to a string.

This allows us to handle definition shadowing or binder shadowing easily.

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

Module Sidekick_base.ID

Unique Identifiers

We use generative identifiers everywhere in Sidekick_base. Unlike strings, there are no risk of collision: during parsing, a new declaration or definition should create a fresh ID.t and associate it with the string name, and later references should look into some hashtable or map to get the ID corresponding to a string.

This allows us to handle definition shadowing or binder shadowing easily.

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
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type key = t
module Set : CCSet.S with type elt = t
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Lit/index.html b/dev/sidekick-base/Sidekick_base/Lit/index.html index 97c1f8ce..265147ae 100644 --- a/dev/sidekick-base/Sidekick_base/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base.Lit)

Module Sidekick_base.Lit

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

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

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

Module Sidekick_base.Lit

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

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html b/dev/sidekick-base/Sidekick_base/Model/Fun_interpretation/index.html index ed56efff..f057e9c8 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,5 @@ -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 abd9fe0c..af96957b 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 76f605f3..62742ad5 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 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 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/Config/index.html b/dev/sidekick-base/Sidekick_base/Proof/Config/index.html index 8d3e8333..a4f35919 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/Config/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/Config/index.html @@ -1,2 +1,2 @@ -Config (sidekick-base.Sidekick_base.Proof.Config)

Module Proof.Config

Configuration of proofs

type t
val pp : t Sidekick_base__.Base_types.Fmt.printer
val default : t

Default proof config, enabled

val empty : t

Disabled proof, without storage

val enable : bool -> t -> t

Enable/disable proof storage

val store_in_memory : t -> t

Store proof in memory

val store_on_disk_at : string -> t -> t

store_on_disk_at file stores temporary proof in file file

val no_store : t -> t
\ No newline at end of file +Config (sidekick-base.Sidekick_base.Proof.Config)

Module Proof.Config

Configuration of proofs

type t
val pp : t Sidekick_base__.Base_types.Fmt.printer
val default : t

Default proof config, enabled

val empty : t

Disabled proof, without storage

val enable : bool -> t -> t

Enable/disable proof storage

val store_in_memory : t -> t

Store proof in memory

val store_on_disk_at : string -> t -> t

store_on_disk_at file stores temporary proof in file file

val no_store : t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof/Step_vec/index.html b/dev/sidekick-base/Sidekick_base/Proof/Step_vec/index.html index 22e4067c..98f2dfe0 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof/Unsafe_/index.html b/dev/sidekick-base/Sidekick_base/Proof/Unsafe_/index.html index da4e0901..b2ba1d35 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/Unsafe_/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/Unsafe_/index.html @@ -1,2 +1,2 @@ -Unsafe_ (sidekick-base.Sidekick_base.Proof.Unsafe_)

Module Proof.Unsafe_

val id_of_proof_step_ : proof_step -> Base_types.Proof_ser.ID.t
\ No newline at end of file +Unsafe_ (sidekick-base.Sidekick_base.Proof.Unsafe_)

Module Proof.Unsafe_

val id_of_proof_step_ : proof_step -> Base_types.Proof_ser.ID.t
\ 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 b207ff3b..bf518de4 100644 --- a/dev/sidekick-base/Sidekick_base/Proof/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof/index.html @@ -1,2 +1,46 @@ -Proof (sidekick-base.Sidekick_base.Proof)

Module Sidekick_base.Proof

Proof representation

module Config : sig ... end

Configuration of proofs

Main Proof API

type t

A container for the whole proof

type proof_step

A proof step in the trace.

The proof will store all steps, and at the end when we find the empty clause we can filter them to keep only the relevant ones.

include Sidekick_core.PROOF with type t := t and type proof_step := proof_step and type lit = Lit.t and type term = Base_types.Term.t
type term = Base_types.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

val lemma_lra : Lit.t Iter.t -> proof_rule
include Sidekick_th_data.PROOF with type proof := t and type proof_step := proof_step and type lit := Lit.t and type term := Base_types.Term.t
val lemma_isa_cstor : cstor_t:Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : Base_types.Term.t -> Lit.t Iter.t -> t -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : Base_types.Term.t -> t -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : Lit.t -> Lit.t -> t -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : Base_types.Term.t -> Base_types.Term.t -> int -> t -> proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (Base_types.Term.t * Base_types.Term.t) Iter.t -> t -> proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

include Sidekick_th_bool_static.PROOF with type proof := t and type proof_step := proof_step and type lit := Lit.t and type term := Base_types.Term.t
val lemma_bool_tauto : Lit.t Iter.t -> t -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> Base_types.Term.t list -> t -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:Base_types.Term.t -> t -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:Base_types.Term.t -> t -> proof_step

lemma ¬a ==> ite a b c = c

Creation

val create : ?config:Config.t -> unit -> t

Create new proof.

  • parameter config

    modifies the proof behavior

val empty : t

Empty proof, stores nothing

val disable : t -> unit

Disable proof, even if the config would enable it

Use the proof

val iter_steps_backward : t -> Base_types.Proof_ser.Step.t Iter.t

Iterates on all the steps of the proof, from the end.

This will yield nothing if the proof was disabled or used a dummy backend.

module Unsafe_ : sig ... end
\ No newline at end of file +Proof (sidekick-base.Sidekick_base.Proof)

Module Sidekick_base.Proof

Proof representation

module Config : sig ... end

Configuration of proofs

Main Proof API

type t

A container for the whole proof

type proof_step

A proof step in the trace.

The proof will store all steps, and at the end when we find the empty clause we can filter them to keep only the relevant ones.

include Sidekick_core.PROOF + with type t := t + and type proof_step := proof_step + and type lit = Lit.t + and type term = Base_types.Term.t
type term = Base_types.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

val lemma_lra : Lit.t Iter.t -> proof_rule
val lemma_relax_to_lra : Lit.t Iter.t -> proof_rule
val lemma_lia : Lit.t Iter.t -> proof_rule
include Sidekick_th_data.PROOF + with type proof := t + and type proof_step := proof_step + and type lit := Lit.t + and type term := Base_types.Term.t
val lemma_isa_cstor : + cstor_t:Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : + cstor_t:Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : Base_types.Term.t -> Lit.t Iter.t -> t -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : Base_types.Term.t -> t -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : Lit.t -> Lit.t -> t -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : + Base_types.Term.t -> + Base_types.Term.t -> + int -> + t -> + proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : + Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : + (Base_types.Term.t * Base_types.Term.t) Iter.t -> + t -> + proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

include Sidekick_th_bool_static.PROOF + with type proof := t + and type proof_step := proof_step + and type lit := Lit.t + and type term := Base_types.Term.t
val lemma_bool_tauto : Lit.t Iter.t -> t -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> Base_types.Term.t list -> t -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : + Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:Base_types.Term.t -> t -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:Base_types.Term.t -> t -> proof_step

lemma ¬a ==> ite a b c = c

Creation

val create : ?config:Config.t -> unit -> t

Create new proof.

  • parameter config

    modifies the proof behavior

val empty : t

Empty proof, stores nothing

val disable : t -> unit

Disable proof, even if the config would enable it

Use the proof

val iter_steps_backward : t -> Base_types.Proof_ser.Step.t Iter.t

Iterates on all the steps of the proof, from the end.

This will yield nothing if the proof was disabled or used a dummy backend.

module Unsafe_ : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof_dummy/Step_vec/index.html b/dev/sidekick-base/Sidekick_base/Proof_dummy/Step_vec/index.html index 8b6bc6fc..5d4ddb95 100644 --- a/dev/sidekick-base/Sidekick_base/Proof_dummy/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof_dummy/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base.Proof_dummy.Step_vec)

Module Proof_dummy.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base.Proof_dummy.Step_vec)

Module Proof_dummy.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Proof_dummy/index.html b/dev/sidekick-base/Sidekick_base/Proof_dummy/index.html index ffa20389..4d116ac6 100644 --- a/dev/sidekick-base/Sidekick_base/Proof_dummy/index.html +++ b/dev/sidekick-base/Sidekick_base/Proof_dummy/index.html @@ -1,3 +1,56 @@ -Proof_dummy (sidekick-base.Sidekick_base.Proof_dummy)

Module Sidekick_base.Proof_dummy

Dummy proof module that does nothing.

include Sidekick_core.PROOF with type t = private unit and type proof_step = private unit and type -lit = Lit.t and type term = Base_types.Term.t
type t = private unit

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 proof_step = private unit

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = Base_types.Term.t
type lit = Lit.t
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := t -> proof_step

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

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

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> t -> proof_step

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

val emit_unsat_core : lit Iter.t -> t -> proof_step

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> t -> proof_step

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

val define_term : term -> term -> t -> proof_step

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> t -> proof_step

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> t -> proof_step

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> t -> proof_step

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> t -> proof_step

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> t -> proof_step

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> t -> proof_step

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> t -> proof_step

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

type proof_rule = t -> proof_step
val create : unit -> t
val lemma_lra : Lit.t Iter.t -> proof_rule
include Sidekick_th_data.PROOF with type proof := t and type proof_step := proof_step and type lit := Lit.t and type term := Base_types.Term.t
val lemma_isa_cstor : cstor_t:Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : Base_types.Term.t -> Lit.t Iter.t -> t -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : Base_types.Term.t -> t -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : Lit.t -> Lit.t -> t -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : Base_types.Term.t -> Base_types.Term.t -> int -> t -> proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (Base_types.Term.t * Base_types.Term.t) Iter.t -> t -> proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

include Sidekick_th_bool_static.PROOF with type proof := t and type proof_step := proof_step and type lit := Lit.t and type term := Base_types.Term.t
val lemma_bool_tauto : Lit.t Iter.t -> t -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> Base_types.Term.t list -> t -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : Base_types.Term.t -> Base_types.Term.t -> t -> proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:Base_types.Term.t -> t -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:Base_types.Term.t -> t -> proof_step

lemma ¬a ==> ite a b c = c

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

Module Sidekick_base.Proof_dummy

Dummy proof module that does nothing.

include Sidekick_core.PROOF + with type t = private unit + and type proof_step = private unit + and type lit = Lit.t + and type term = Base_types.Term.t
type t = private unit

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 proof_step = private unit

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = Base_types.Term.t
type lit = Lit.t
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := t -> proof_step

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

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

Emit an input clause.

val emit_redundant_clause : + lit Iter.t -> + hyps:proof_step Iter.t -> + t -> + proof_step

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

val emit_unsat_core : lit Iter.t -> t -> proof_step

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> t -> proof_step

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

val define_term : term -> term -> t -> proof_step

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> t -> proof_step

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> t -> proof_step

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> t -> proof_step

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> t -> proof_step

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> t -> proof_step

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : + term -> + term -> + using:proof_step Iter.t -> + t -> + proof_step

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + t -> + proof_step

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

type proof_rule = t -> proof_step
val create : unit -> t
val lemma_lra : Lit.t Iter.t -> proof_rule
include Sidekick_th_data.PROOF + with type proof := t + and type proof_step := proof_step + and type lit := Lit.t + and type term := Base_types.Term.t
val lemma_isa_cstor : + cstor_t:Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : + cstor_t:Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : Base_types.Term.t -> Lit.t Iter.t -> t -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : Base_types.Term.t -> t -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : Lit.t -> Lit.t -> t -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : + Base_types.Term.t -> + Base_types.Term.t -> + int -> + t -> + proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : + Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : + (Base_types.Term.t * Base_types.Term.t) Iter.t -> + t -> + proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

include Sidekick_th_bool_static.PROOF + with type proof := t + and type proof_step := proof_step + and type lit := Lit.t + and type term := Base_types.Term.t
val lemma_bool_tauto : Lit.t Iter.t -> t -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> Base_types.Term.t list -> t -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : + Base_types.Term.t -> + Base_types.Term.t -> + t -> + proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:Base_types.Term.t -> t -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:Base_types.Term.t -> t -> proof_step

lemma ¬a ==> ite a b c = c

\ 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 f76655f6..277d9cf5 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 @@ -Proof_quip (sidekick-base.Sidekick_base.Proof_quip)

Module Sidekick_base.Proof_quip

Export to Quip from Proof.

We use Sidekick_quip but do not export anything from it.

type t
val of_proof : Proof.t -> unsat:Proof.proof_step -> t
type out_format = Sidekick_quip.out_format =
| Sexp
| CSexp
val output : ?fmt:out_format -> Stdlib.out_channel -> t -> unit
\ No newline at end of file +Proof_quip (sidekick-base.Sidekick_base.Proof_quip)

Module Sidekick_base.Proof_quip

Export to Quip from Proof.

We use Sidekick_quip but do not export anything from it.

type t
val of_proof : Proof.t -> unsat:Proof.proof_step -> t
type out_format = Sidekick_quip.out_format =
| Sexp
| CSexp
val output : ?fmt:out_format -> Stdlib.out_channel -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html index 1231a272..53f9b4c3 100644 --- a/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick-base.Sidekick_base.Solver_arg.Fun)

Module Solver_arg.Fun

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

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_arg.Fun)

Module Solver_arg.Fun

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html index 9810416b..2f5dec27 100644 --- a/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/Term/index.html @@ -1,8 +1,8 @@ -Term (sidekick-base.Sidekick_base.Solver_arg.Term)

Module Solver_arg.Term

Term structure.

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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer

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.Solver_arg.Term)

Module Solver_arg.Term

Term structure.

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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer

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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

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

Module Solver_arg.Ty

Types

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

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

Module Solver_arg.Ty

Types

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = Base_types.Ty.store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base/Solver_arg/index.html b/dev/sidekick-base/Sidekick_base/Solver_arg/index.html index 72bdb1aa..5f2a1483 100644 --- a/dev/sidekick-base/Sidekick_base/Solver_arg/index.html +++ b/dev/sidekick-base/Sidekick_base/Solver_arg/index.html @@ -1,2 +1,7 @@ -Solver_arg (sidekick-base.Sidekick_base.Solver_arg)

Module Sidekick_base.Solver_arg

Concrete implementation of Sidekick_core.TERM

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

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

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 +Solver_arg (sidekick-base.Sidekick_base.Solver_arg)

Module Sidekick_base.Solver_arg

Concrete implementation of Sidekick_core.TERM

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

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

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-base/Sidekick_base/index.html b/dev/sidekick-base/Sidekick_base/index.html index 39d6f8c2..0f8f1d19 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 Form : sig ... end

Formulas (boolean terms).

module Solver_arg : sig ... end

Concrete implementation of Sidekick_core.TERM

module Lit : sig ... end
module Proof_dummy : sig ... end

Dummy proof module that does nothing.

module Proof : sig ... end

Proof representation

module Proof_quip : sig ... end

Export to Quip from Proof.

module IArray = Sidekick_util.IArray
\ No newline at end of file +Sidekick_base (sidekick-base.Sidekick_base)

Module Sidekick_base

Sidekick base

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

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

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

module Base_types : sig ... end

Basic type definitions for Sidekick_base

module ID : sig ... end

Unique Identifiers

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

Models

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

Formulas (boolean terms).

module LRA_view = Base_types.LRA_view
module LRA_pred = Base_types.LRA_pred
module LRA_op = Base_types.LRA_op
module LIA_view = Base_types.LIA_view
module LIA_pred = Base_types.LIA_pred
module LIA_op = Base_types.LIA_op
module Solver_arg : sig ... end

Concrete implementation of Sidekick_core.TERM

module Lit : sig ... end
module Proof_dummy : sig ... end

Dummy proof module that does nothing.

module Proof : sig ... end

Proof representation

module Proof_quip : sig ... end

Export to Quip from Proof.

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

Module Sidekick_base__

\ 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 deleted file mode 100644 index 64c2357a..00000000 --- a/dev/sidekick-base/Sidekick_base__Base_types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Base_types (sidekick-base.Sidekick_base__Base_types)

Module Sidekick_base__Base_types

\ 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 deleted file mode 100644 index c834ebdc..00000000 --- a/dev/sidekick-base/Sidekick_base__CCHet/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__CCHet (sidekick-base.Sidekick_base__CCHet)

Module Sidekick_base__CCHet

\ 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 deleted file mode 100644 index c83de69e..00000000 --- a/dev/sidekick-base/Sidekick_base__Config/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Config (sidekick-base.Sidekick_base__Config)

Module Sidekick_base__Config

\ 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 deleted file mode 100644 index 338a446e..00000000 --- a/dev/sidekick-base/Sidekick_base__Form/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Form (sidekick-base.Sidekick_base__Form)

Module Sidekick_base__Form

\ 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 deleted file mode 100644 index 074ddbd6..00000000 --- a/dev/sidekick-base/Sidekick_base__Hashcons/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Hashcons (sidekick-base.Sidekick_base__Hashcons)

Module Sidekick_base__Hashcons

\ 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 deleted file mode 100644 index b4917176..00000000 --- a/dev/sidekick-base/Sidekick_base__ID/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__ID (sidekick-base.Sidekick_base__ID)

Module Sidekick_base__ID

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

Module Sidekick_base__Lit

\ 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 deleted file mode 100644 index cf1b8300..00000000 --- a/dev/sidekick-base/Sidekick_base__Model/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base__Model (sidekick-base.Sidekick_base__Model)

Module Sidekick_base__Model

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

Module Sidekick_base__Proof

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

Module Sidekick_base__Proof_dummy

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

Module Sidekick_base__Proof_quip

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

Module Sidekick_base__Solver_arg

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__/.dune-keep b/dev/sidekick-base/Sidekick_base_proof_trace/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__/.dune-keep rename to dev/sidekick-base/Sidekick_base_proof_trace/.dummy diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Decode/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Decode/index.html index 928e6a13..ea8cb993 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Decode/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Decode/index.html @@ -1,2 +1,2 @@ -Decode (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Decode)

Module Bare.Decode

type t = input
val of_input : input -> t
val of_bytes : ?off:int -> ?len:int -> bytes -> t
val of_string : ?off:int -> ?len:int -> string -> t
type 'a dec = t -> 'a
val uint : t -> int64
val int : t -> int64
val i8 : t -> char
val u8 : t -> char
val i16 : t -> int
val u16 : t -> int
val i32 : t -> int32
val u32 : t -> int32
val i64 : t -> int64
val u64 : t -> int64
val bool : t -> bool
val f32 : t -> float
val f64 : t -> float
val data_of : size:int -> t -> bytes
val data : t -> bytes
val string : t -> string
val optional : (t -> 'a) -> t -> 'a option
\ No newline at end of file +Decode (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Decode)

Module Bare.Decode

type t = input
val of_input : input -> t
val of_bytes : ?off:int -> ?len:int -> bytes -> t
val of_string : ?off:int -> ?len:int -> string -> t
type 'a dec = t -> 'a
val uint : t -> int64
val int : t -> int64
val i8 : t -> char
val u8 : t -> char
val i16 : t -> int
val u16 : t -> int
val i32 : t -> int32
val u32 : t -> int32
val i64 : t -> int64
val u64 : t -> int64
val bool : t -> bool
val f32 : t -> float
val f64 : t -> float
val data_of : size:int -> t -> bytes
val data : t -> bytes
val string : t -> string
val optional : ( t -> 'a ) -> t -> 'a option
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Encode/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Encode/index.html index aea5bde7..f0b04df9 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Encode/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Encode/index.html @@ -1,2 +1,2 @@ -Encode (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Encode)

Module Bare.Encode

type t = output
val of_output : output -> t
val of_buffer : Stdlib.Buffer.t -> t
type 'a enc = t -> 'a -> unit
val unsafe_chr : int -> char
val uint : t -> int64 -> unit
val int : t -> int64 -> unit
val i8 : t -> char -> unit
val u8 : t -> char -> unit
val i16 : t -> int -> unit
val u16 : t -> int -> unit
val i32 : t -> int32 -> unit
val u32 : t -> int32 -> unit
val i64 : t -> int64 -> unit
val u64 : t -> int64 -> unit
val bool : t -> bool -> unit
val f64 : t -> float -> unit
val data_of : size:int -> t -> bytes -> unit
val data : t -> bytes -> unit
val string : t -> string -> unit
val optional : (t -> 'a -> unit) -> t -> 'a option -> unit
\ No newline at end of file +Encode (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Encode)

Module Bare.Encode

type t = output
val of_output : output -> t
val of_buffer : Stdlib.Buffer.t -> t
type 'a enc = t -> 'a -> unit
val unsafe_chr : int -> char
val uint : t -> int64 -> unit
val int : t -> int64 -> unit
val i8 : t -> char -> unit
val u8 : t -> char -> unit
val i16 : t -> int -> unit
val u16 : t -> int -> unit
val i32 : t -> int32 -> unit
val u32 : t -> int32 -> unit
val i64 : t -> int64 -> unit
val u64 : t -> int64 -> unit
val bool : t -> bool -> unit
val f64 : t -> float -> unit
val data_of : size:int -> t -> bytes -> unit
val data : t -> bytes -> unit
val string : t -> string -> unit
val optional : ( t -> 'a -> unit ) -> t -> 'a option -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Pp/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Pp/index.html index b4af184c..94a6eef9 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Pp/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/Pp/index.html @@ -1,2 +1,18 @@ -Pp (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Pp)

Module Bare.Pp

type 'a t = Stdlib.Format.formatter -> 'a -> unit
type 'a iter = ('a -> unit) -> unit
val unit : Stdlib.Format.formatter -> unit -> unit
val int8 : Stdlib.Format.formatter -> char -> unit
val int : Stdlib.Format.formatter -> int -> unit
val int32 : Stdlib.Format.formatter -> int32 -> unit
val int64 : Stdlib.Format.formatter -> int64 -> unit
val float : Stdlib.Format.formatter -> float -> unit
val bool : Stdlib.Format.formatter -> bool -> unit
val string : Stdlib.Format.formatter -> string -> unit
val data : Stdlib.Format.formatter -> bytes -> unit
val option : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a option -> unit
val array : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a array -> unit
val iter : (Stdlib.Format.formatter -> 'a -> 'b) -> Stdlib.Format.formatter -> (('a -> 'b) -> unit) -> unit
val list : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a list -> unit
\ No newline at end of file +Pp (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.Pp)

Module Bare.Pp

type 'a t = Stdlib.Format.formatter -> 'a -> unit
type 'a iter = ( 'a -> unit ) -> unit
val unit : Stdlib.Format.formatter -> unit -> unit
val int8 : Stdlib.Format.formatter -> char -> unit
val int : Stdlib.Format.formatter -> int -> unit
val int32 : Stdlib.Format.formatter -> int32 -> unit
val int64 : Stdlib.Format.formatter -> int64 -> unit
val float : Stdlib.Format.formatter -> float -> unit
val bool : Stdlib.Format.formatter -> bool -> unit
val string : Stdlib.Format.formatter -> string -> unit
val data : Stdlib.Format.formatter -> bytes -> unit
val option : + ( Stdlib.Format.formatter -> 'a -> unit ) -> + Stdlib.Format.formatter -> + 'a option -> + unit
val array : + ( Stdlib.Format.formatter -> 'a -> unit ) -> + Stdlib.Format.formatter -> + 'a array -> + unit
val iter : + ( Stdlib.Format.formatter -> 'a -> 'b ) -> + Stdlib.Format.formatter -> + ( ( 'a -> 'b ) -> unit ) -> + unit
val list : + ( Stdlib.Format.formatter -> 'a -> unit ) -> + Stdlib.Format.formatter -> + 'a list -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/String_map/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/String_map/index.html index 124ac6ac..dfaa8d8f 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/String_map/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/String_map/index.html @@ -1,2 +1,6 @@ -String_map (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.String_map)

Module Bare.String_map

type key = Stdlib.String.t
type !'a t = 'a Stdlib__map.Make(Stdlib.String).t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
\ No newline at end of file +String_map (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.String_map)

Module Bare.String_map

type key = Stdlib.String.t
type !'a t = 'a Stdlib__map.Make(Stdlib.String).t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ( 'a option -> 'a option ) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : + ( key -> 'a option -> 'b option -> 'c option ) -> + 'a t -> + 'b t -> + 'c t
val union : ( key -> 'a -> 'a -> 'a option ) -> 'a t -> 'a t -> 'a t
val compare : ( 'a -> 'a -> int ) -> 'a t -> 'a t -> int
val equal : ( 'a -> 'a -> bool ) -> 'a t -> 'a t -> bool
val iter : ( key -> 'a -> unit ) -> 'a t -> unit
val fold : ( key -> 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'b
val for_all : ( key -> 'a -> bool ) -> 'a t -> bool
val exists : ( key -> 'a -> bool ) -> 'a t -> bool
val filter : ( key -> 'a -> bool ) -> 'a t -> 'a t
val filter_map : ( key -> 'a -> 'b option ) -> 'a t -> 'b t
val partition : ( key -> 'a -> bool ) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : ( key -> bool ) -> 'a t -> key * 'a
val find_first_opt : ( key -> bool ) -> 'a t -> (key * 'a) option
val find_last : ( key -> bool ) -> 'a t -> key * 'a
val find_last_opt : ( key -> bool ) -> 'a t -> (key * 'a) option
val map : ( 'a -> 'b ) -> 'a t -> 'b t
val mapi : ( key -> 'a -> 'b ) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/index.html index 628709c6..bba5942c 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/index.html @@ -1,2 +1,12 @@ -Bare (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare)

Module Proof_ser.Bare

module String_map : sig ... end
module type INPUT = sig ... end
type input = (module INPUT)
val input_of_bytes : ?off:int -> ?len:int -> bytes -> input
module Decode : sig ... end
module type OUTPUT = sig ... end
type output = (module OUTPUT)
val output_of_buffer : Stdlib.Buffer.t -> output
module Encode : sig ... end
module Pp : sig ... end
val to_string : 'a Encode.enc -> 'a -> string
val of_bytes_exn : ?off:int -> ?len:int -> (Decode.t -> 'a) -> bytes -> 'a
val of_bytes : ?off:int -> ?len:int -> (Decode.t -> 'a) -> bytes -> ('a, string) Stdlib.result
val of_string_exn : ?off:int -> ?len:int -> (Decode.t -> 'a) -> string -> 'a
val of_string : ?off:int -> ?len:int -> (Decode.t -> 'a) -> string -> ('a, string) Stdlib.result
\ No newline at end of file +Bare (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare)

Module Proof_ser.Bare

module String_map : sig ... end
module type INPUT = sig ... end
type input = (module INPUT)
val input_of_bytes : ?off:int -> ?len:int -> bytes -> input
module Decode : sig ... end
module type OUTPUT = sig ... end
type output = (module OUTPUT)
val output_of_buffer : Stdlib.Buffer.t -> output
module Encode : sig ... end
module Pp : sig ... end
val to_string : 'a Encode.enc -> 'a -> string
val of_bytes_exn : ?off:int -> ?len:int -> ( Decode.t -> 'a ) -> bytes -> 'a
val of_bytes : + ?off:int -> + ?len:int -> + ( Decode.t -> 'a ) -> + bytes -> + ( 'a, string ) Stdlib.result
val of_string_exn : ?off:int -> ?len:int -> ( Decode.t -> 'a ) -> string -> 'a
val of_string : + ?off:int -> + ?len:int -> + ( Decode.t -> 'a ) -> + string -> + ( 'a, string ) Stdlib.result
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-INPUT/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-INPUT/index.html index 5d4334aa..1c5873c8 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-INPUT/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-INPUT/index.html @@ -1,2 +1,2 @@ -INPUT (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.INPUT)

Module type Bare.INPUT

val read_byte : unit -> char
val read_i16 : unit -> int
val read_i32 : unit -> int32
val read_i64 : unit -> int64
val read_exact : bytes -> int -> int -> unit
\ No newline at end of file +INPUT (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.INPUT)

Module type Bare.INPUT

val read_byte : unit -> char
val read_i16 : unit -> int
val read_i32 : unit -> int32
val read_i64 : unit -> int64
val read_exact : bytes -> int -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-OUTPUT/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-OUTPUT/index.html index 2e576c9c..62654e89 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-OUTPUT/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Bare/module-type-OUTPUT/index.html @@ -1,2 +1,2 @@ -OUTPUT (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.OUTPUT)

Module type Bare.OUTPUT

val write_byte : char -> unit
val write_i16 : int -> unit
val write_i32 : int32 -> unit
val write_i64 : int64 -> unit
val write_exact : bytes -> int -> int -> unit
val flush : unit -> unit
\ No newline at end of file +OUTPUT (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Bare.OUTPUT)

Module type Bare.OUTPUT

val write_byte : char -> unit
val write_i16 : int -> unit
val write_i32 : int32 -> unit
val write_i64 : int64 -> unit
val write_exact : bytes -> int -> int -> unit
val flush : unit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Clause/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Clause/index.html index b8805c3d..d906fb6f 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Clause/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Clause)

Module Proof_ser.Clause

type t = {
lits : Lit.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Clause (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Clause)

Module Proof_ser.Clause

type t = {
lits : Lit.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_app/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_app/index.html index 13d0d9df..23844231 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_app/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_app/index.html @@ -1,2 +1,2 @@ -Expr_app (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_app)

Module Proof_ser.Expr_app

type t = {
f : ID.t;
args : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_app (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_app)

Module Proof_ser.Expr_app

type t = {
f : ID.t;
args : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_bool/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_bool/index.html index d636dc89..52ee4a09 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_bool/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_bool/index.html @@ -1,2 +1,2 @@ -Expr_bool (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_bool)

Module Proof_ser.Expr_bool

type t = {
b : bool;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_bool (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_bool)

Module Proof_ser.Expr_bool

type t = {
b : bool;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_def/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_def/index.html index ad326eec..6f0a16a5 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_def/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_def/index.html @@ -1,2 +1,2 @@ -Expr_def (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_def)

Module Proof_ser.Expr_def

type t = {
c : ID.t;
rhs : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_def (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_def)

Module Proof_ser.Expr_def

type t = {
c : ID.t;
rhs : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_eq/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_eq/index.html index 1b13c578..46eebe14 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_eq/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_eq/index.html @@ -1,2 +1,2 @@ -Expr_eq (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_eq)

Module Proof_ser.Expr_eq

type t = {
lhs : ID.t;
rhs : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_eq (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_eq)

Module Proof_ser.Expr_eq

type t = {
lhs : ID.t;
rhs : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_if/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_if/index.html index 5cf5a509..d4381d18 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_if/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_if/index.html @@ -1,2 +1,2 @@ -Expr_if (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_if)

Module Proof_ser.Expr_if

type t = {
cond : ID.t;
then_ : ID.t;
else_ : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_if (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_if)

Module Proof_ser.Expr_if

type t = {
cond : ID.t;
then_ : ID.t;
else_ : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_isa/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_isa/index.html index fbba7470..02fc6d10 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_isa/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_isa/index.html @@ -1,2 +1,2 @@ -Expr_isa (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_isa)

Module Proof_ser.Expr_isa

type t = {
c : ID.t;
arg : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_isa (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_isa)

Module Proof_ser.Expr_isa

type t = {
c : ID.t;
arg : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_not/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_not/index.html index 1ca24529..cd50f536 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_not/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Expr_not/index.html @@ -1,2 +1,2 @@ -Expr_not (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_not)

Module Proof_ser.Expr_not

type t = {
f : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Expr_not (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Expr_not)

Module Proof_ser.Expr_not

type t = {
f : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Fun_decl/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Fun_decl/index.html index f0ab2037..a9f9e0b6 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Fun_decl/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Fun_decl/index.html @@ -1,2 +1,2 @@ -Fun_decl (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Fun_decl)

Module Proof_ser.Fun_decl

type t = {
f : string;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Fun_decl (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Fun_decl)

Module Proof_ser.Fun_decl

type t = {
f : string;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/ID/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/ID/index.html index 3af17fc0..4a6ded27 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/ID/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/ID/index.html @@ -1,2 +1,2 @@ -ID (sidekick-base.Sidekick_base_proof_trace.Proof_ser.ID)

Module Proof_ser.ID

type t = int32
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +ID (sidekick-base.Sidekick_base_proof_trace.Proof_ser.ID)

Module Proof_ser.ID

type t = int32
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Lit/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Lit/index.html index 70d2c4b7..093edee4 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Lit/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Lit)

Module Proof_ser.Lit

type t = ID.t
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Lit)

Module Proof_ser.Lit

type t = ID.t
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step/index.html index 6eb2a45f..8f8b8b9c 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step/index.html @@ -1,2 +1,2 @@ -Step (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step)

Module Proof_ser.Step

type t = {
id : ID.t;
view : Step_view.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step)

Module Proof_ser.Step

type t = {
id : ID.t;
view : Step_view.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_c/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_c/index.html index edb19ea6..e8ca4753 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_c/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_c/index.html @@ -1,2 +1,2 @@ -Step_bool_c (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bool_c)

Module Proof_ser.Step_bool_c

type t = {
rule : string;
exprs : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_bool_c (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bool_c)

Module Proof_ser.Step_bool_c

type t = {
rule : string;
exprs : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_tauto/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_tauto/index.html index b13785c4..3ff2f1eb 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_tauto/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bool_tauto/index.html @@ -1,2 +1,2 @@ -Step_bool_tauto (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bool_tauto)

Module Proof_ser.Step_bool_tauto

type t = {
lits : Lit.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_bool_tauto (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bool_tauto)

Module Proof_ser.Step_bool_tauto

type t = {
lits : Lit.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bridge_lit_expr/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bridge_lit_expr/index.html index a7e1e3c4..570d441e 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bridge_lit_expr/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_bridge_lit_expr/index.html @@ -1,2 +1,2 @@ -Step_bridge_lit_expr (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bridge_lit_expr)

Module Proof_ser.Step_bridge_lit_expr

type t = {
lit : Lit.t;
expr : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_bridge_lit_expr (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_bridge_lit_expr)

Module Proof_ser.Step_bridge_lit_expr

type t = {
lit : Lit.t;
expr : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_cc/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_cc/index.html index ca30badc..e1ca30db 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_cc/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_cc/index.html @@ -1,2 +1,2 @@ -Step_cc (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_cc)

Module Proof_ser.Step_cc

type t = {
eqns : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_cc (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_cc)

Module Proof_ser.Step_cc

type t = {
eqns : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_clause_rw/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_clause_rw/index.html index 062eb06c..dbb239ed 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_clause_rw/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_clause_rw/index.html @@ -1,2 +1,2 @@ -Step_clause_rw (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_clause_rw)

Module Proof_ser.Step_clause_rw

type t = {
c : ID.t;
res : Clause.t;
using : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_clause_rw (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_clause_rw)

Module Proof_ser.Step_clause_rw

type t = {
c : ID.t;
res : Clause.t;
using : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_input/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_input/index.html index dd80b7d1..02ddc4ba 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_input/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_input/index.html @@ -1,2 +1,2 @@ -Step_input (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_input)

Module Proof_ser.Step_input

type t = {
c : Clause.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_input (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_input)

Module Proof_ser.Step_input

type t = {
c : Clause.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_preprocess/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_preprocess/index.html index d1c916b9..708e3ba9 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_preprocess/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_preprocess/index.html @@ -1,2 +1,2 @@ -Step_preprocess (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_preprocess)

Module Proof_ser.Step_preprocess

type t = {
t : ID.t;
u : ID.t;
using : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_preprocess (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_preprocess)

Module Proof_ser.Step_preprocess

type t = {
t : ID.t;
u : ID.t;
using : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_p1/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_p1/index.html index 472e5649..8d97f9e8 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_p1/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_p1/index.html @@ -1,2 +1,2 @@ -Step_proof_p1 (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_p1)

Module Proof_ser.Step_proof_p1

type t = {
rw_with : ID.t;
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_proof_p1 (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_p1)

Module Proof_ser.Step_proof_p1

type t = {
rw_with : ID.t;
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_r1/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_r1/index.html index 39bf399a..a3a1adc9 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_r1/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_r1/index.html @@ -1,2 +1,2 @@ -Step_proof_r1 (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_r1)

Module Proof_ser.Step_proof_r1

type t = {
unit : ID.t;
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_proof_r1 (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_r1)

Module Proof_ser.Step_proof_r1

type t = {
unit : ID.t;
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_res/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_res/index.html index 14bf428b..64c2b8d0 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_res/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_proof_res/index.html @@ -1,2 +1,2 @@ -Step_proof_res (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_res)

Module Proof_ser.Step_proof_res

type t = {
pivot : ID.t;
c1 : ID.t;
c2 : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_proof_res (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_proof_res)

Module Proof_ser.Step_proof_res

type t = {
pivot : ID.t;
c1 : ID.t;
c2 : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_rup/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_rup/index.html index 4e782189..02d2782b 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_rup/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_rup/index.html @@ -1,2 +1,2 @@ -Step_rup (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_rup)

Module Proof_ser.Step_rup

type t = {
res : Clause.t;
hyps : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_rup (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_rup)

Module Proof_ser.Step_rup

type t = {
res : Clause.t;
hyps : ID.t array;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_true/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_true/index.html index 5095ff5e..59d8b7be 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_true/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_true/index.html @@ -1,2 +1,2 @@ -Step_true (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_true)

Module Proof_ser.Step_true

type t = {
true_ : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_true (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_true)

Module Proof_ser.Step_true

type t = {
true_ : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_unsat/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_unsat/index.html index d7a2a0c0..9452c96c 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_unsat/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_unsat/index.html @@ -1,2 +1,2 @@ -Step_unsat (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_unsat)

Module Proof_ser.Step_unsat

type t = {
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_unsat (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_unsat)

Module Proof_ser.Step_unsat

type t = {
c : ID.t;
}
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_view/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_view/index.html index 73525069..535c25aa 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_view/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/Step_view/index.html @@ -1,2 +1,2 @@ -Step_view (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_view)

Module Proof_ser.Step_view

type t =
| Step_input of Step_input.t
| Step_unsat of Step_unsat.t
| Step_rup of Step_rup.t
| Step_bridge_lit_expr of Step_bridge_lit_expr.t
| Step_cc of Step_cc.t
| Step_preprocess of Step_preprocess.t
| Step_clause_rw of Step_clause_rw.t
| Step_bool_tauto of Step_bool_tauto.t
| Step_bool_c of Step_bool_c.t
| Step_proof_p1 of Step_proof_p1.t
| Step_proof_r1 of Step_proof_r1.t
| Step_proof_res of Step_proof_res.t
| Step_true of Step_true.t
| Fun_decl of Fun_decl.t
| Expr_def of Expr_def.t
| Expr_bool of Expr_bool.t
| Expr_if of Expr_if.t
| Expr_not of Expr_not.t
| Expr_isa of Expr_isa.t
| Expr_eq of Expr_eq.t
| Expr_app of Expr_app.t
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Step_view (sidekick-base.Sidekick_base_proof_trace.Proof_ser.Step_view)

Module Proof_ser.Step_view

type t =
| Step_input of Step_input.t
| Step_unsat of Step_unsat.t
| Step_rup of Step_rup.t
| Step_bridge_lit_expr of Step_bridge_lit_expr.t
| Step_cc of Step_cc.t
| Step_preprocess of Step_preprocess.t
| Step_clause_rw of Step_clause_rw.t
| Step_bool_tauto of Step_bool_tauto.t
| Step_bool_c of Step_bool_c.t
| Step_proof_p1 of Step_proof_p1.t
| Step_proof_r1 of Step_proof_r1.t
| Step_proof_res of Step_proof_res.t
| Step_true of Step_true.t
| Fun_decl of Fun_decl.t
| Expr_def of Expr_def.t
| Expr_bool of Expr_bool.t
| Expr_if of Expr_if.t
| Expr_not of Expr_not.t
| Expr_isa of Expr_isa.t
| Expr_eq of Expr_eq.t
| Expr_app of Expr_app.t
val decode : Bare.Decode.t -> t
  • raises Invalid_argument

    in case of error.

val encode : Bare.Encode.t -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/index.html index 0a86571e..b222aa9e 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Proof_ser/index.html @@ -1,2 +1,2 @@ -Proof_ser (sidekick-base.Sidekick_base_proof_trace.Proof_ser)

Module Sidekick_base_proof_trace.Proof_ser

module Bare : sig ... end
module ID : sig ... end
module Lit : sig ... end
module Clause : sig ... end
module Step_input : sig ... end
module Step_rup : sig ... end
module Step_bridge_lit_expr : sig ... end
module Step_cc : sig ... end
module Step_preprocess : sig ... end
module Step_clause_rw : sig ... end
module Step_unsat : sig ... end
module Step_proof_p1 : sig ... end
module Step_proof_r1 : sig ... end
module Step_proof_res : sig ... end
module Step_bool_tauto : sig ... end
module Step_bool_c : sig ... end
module Step_true : sig ... end
module Fun_decl : sig ... end
module Expr_def : sig ... end
module Expr_bool : sig ... end
module Expr_if : sig ... end
module Expr_not : sig ... end
module Expr_eq : sig ... end
module Expr_app : sig ... end
module Expr_isa : sig ... end
module Step_view : sig ... end
module Step : sig ... end
\ No newline at end of file +Proof_ser (sidekick-base.Sidekick_base_proof_trace.Proof_ser)

Module Sidekick_base_proof_trace.Proof_ser

module Bare : sig ... end
module ID : sig ... end
module Lit : sig ... end
module Clause : sig ... end
module Step_input : sig ... end
module Step_rup : sig ... end
module Step_bridge_lit_expr : sig ... end
module Step_cc : sig ... end
module Step_preprocess : sig ... end
module Step_clause_rw : sig ... end
module Step_unsat : sig ... end
module Step_proof_p1 : sig ... end
module Step_proof_r1 : sig ... end
module Step_proof_res : sig ... end
module Step_bool_tauto : sig ... end
module Step_bool_c : sig ... end
module Step_true : sig ... end
module Fun_decl : sig ... end
module Expr_def : sig ... end
module Expr_bool : sig ... end
module Expr_if : sig ... end
module Expr_not : sig ... end
module Expr_eq : sig ... end
module Expr_app : sig ... end
module Expr_isa : sig ... end
module Step_view : sig ... end
module Step : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/Storage/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/Storage/index.html index 153800ad..9db80b2d 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/Storage/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/Storage/index.html @@ -1,2 +1,2 @@ -Storage (sidekick-base.Sidekick_base_proof_trace.Storage)

Module Sidekick_base_proof_trace.Storage

type t =
| No_store
| In_memory of Sidekick_util.Chunk_stack.Buf.t
| On_disk of string * Stdlib.out_channel
val pp : Stdlib.Format.formatter -> t -> unit
val iter_steps_backward : t -> Proof_ser.Step.t Iter.t
\ No newline at end of file +Storage (sidekick-base.Sidekick_base_proof_trace.Storage)

Module Sidekick_base_proof_trace.Storage

type t =
| No_store
| In_memory of Sidekick_util.Chunk_stack.Buf.t
| On_disk of string * Stdlib.out_channel
val pp : Stdlib.Format.formatter -> t -> unit
val iter_steps_backward : t -> Proof_ser.Step.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace/index.html b/dev/sidekick-base/Sidekick_base_proof_trace/index.html index e1b3c8b9..cb49e134 100644 --- a/dev/sidekick-base/Sidekick_base_proof_trace/index.html +++ b/dev/sidekick-base/Sidekick_base_proof_trace/index.html @@ -1,2 +1,2 @@ -Sidekick_base_proof_trace (sidekick-base.Sidekick_base_proof_trace)

Module Sidekick_base_proof_trace

Proof trace with serialization

This library is useful to serialize a series of reasoning steps in memory or into a file, to be able to reconstruct a proper proof later.

module Proof_ser : sig ... end
module Storage : sig ... end
val iter_steps_backward : Storage.t -> Proof_ser.Step.t Iter.t
\ No newline at end of file +Sidekick_base_proof_trace (sidekick-base.Sidekick_base_proof_trace)

Module Sidekick_base_proof_trace

Proof trace with serialization

This library is useful to serialize a series of reasoning steps in memory or into a file, to be able to reconstruct a proper proof later.

module Proof_ser : sig ... end
module Storage : sig ... end
val iter_steps_backward : Storage.t -> Proof_ser.Step.t Iter.t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace__/index.html b/dev/sidekick-base/Sidekick_base_proof_trace__/index.html deleted file mode 100644 index 297c3827..00000000 --- a/dev/sidekick-base/Sidekick_base_proof_trace__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_base_proof_trace__ (sidekick-base.Sidekick_base_proof_trace__)

Module Sidekick_base_proof_trace__

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

Module Sidekick_base_proof_trace__Proof_ser

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

Module Sidekick_base_proof_trace__Storage

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Base_types/.dune-keep b/dev/sidekick-base/Sidekick_base_solver/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Base_types/.dune-keep rename to dev/sidekick-base/Sidekick_base_solver/.dummy diff --git a/dev/sidekick-base/Sidekick_base_solver/Gensym/index.html b/dev/sidekick-base/Sidekick_base_solver/Gensym/index.html new file mode 100644 index 00000000..c424bc67 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-base.Sidekick_base_solver.Gensym)

Module Sidekick_base_solver.Gensym

type t = {
tst : Sidekick_base.Term.store;
mutable fresh : int;
}
val create : Sidekick_base.Term.store -> t
val copy : t -> t
val fresh_term : t -> pre:string -> Sidekick_base.Ty.t -> Sidekick_base.Term.t
\ 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 7a5c56ef..1fcaa261 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

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

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 142a3986..efdef40f 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,4 +1,23 @@ -Tbl (sidekick-base.Sidekick_base_solver.Solver.Lit.T.Term.Tbl)

Module Term.Tbl

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

Module Term.Tbl

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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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 31448b47..b58fc71c 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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 dcd04019..c3e7cc34 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 7b51d18f..c65e9ba4 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
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Lit)

Module Solver.Lit

module T : sig ... end
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Model/index.html index 613e47a3..54c3295e 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

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

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/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/P/Step_vec/index.html index 939e7c3d..8e229b7e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Solver.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Solver.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 bf21200c..deb53f20 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Solver.P)

Module Solver.P

type proof_step = Solver_arg.proof_step
type lit = Solver_arg.Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.P)

Module Solver.P

type proof_step = Solver_arg.proof_step
type lit = Solver_arg.Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Registry/index.html new file mode 100644 index 00000000..73cccc26 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Solver.Registry)

Module Solver.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 d1373f70..170727d3 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 2a097a6c..8dc56506 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,4 +1,23 @@ -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 7acc7c6e..5b3f89c9 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_shallow : store -> ( t -> unit ) -> t -> unit
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 1191f5b3..b9cd7975 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 76d6ac53..ef5f55a6 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 78a5eef0..b756a92e 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 4e6e4a1e..520acf68 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ 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 e48b9faf..743ab147 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 4781be29..add22cb6 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,4 +1,23 @@ -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 08bae5b5..2cc042ba 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_shallow : store -> ( t -> unit ) -> t -> unit
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 24b1d431..e87a2199 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 01727bb1..bfc4f73a 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 16725d1c..7ffd2498 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,10 @@ -Actions (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Actions)

Module CC.Actions

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

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 93632cbb..eaff4bff 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 2e6d11e7..99a39275 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

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

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> 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 47322363..91b5e159 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 806237ea..a532a1b1 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,4 +1,23 @@ -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 2810ddfe..feba5e46 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_shallow : store -> ( t -> unit ) -> t -> unit
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 49249fda..f9da3528 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 4716a106..f413b21c 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 7eccb7aa..3fd807c1 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/N/index.html index e74cd3e4..b18d185f 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,3 @@ -N (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Step_vec/index.html index b7b072c5..6b033925 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 d501cafe..58868fc6 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..ec7f494e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,4 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = + Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Resolved_expl.t = + {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
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/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/CC/T/Fun/index.html index 5ddc59d3..53b71d48 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 c9e1a864..92cda7e2 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,4 +1,23 @@ -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 3d3b9667..39bb7006 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_shallow : store -> ( t -> unit ) -> t -> unit
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 be9d7421..52dc3e7e 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 0eaf211f..c594edc1 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 aa04f1c4..19815da4 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,4 +1,13 @@ -CC (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
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 proof : t -> proof
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 * proof_step) -> 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 -> proof -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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 8a74ead7..f9008d7a 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 1e8280e5..f0907874 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,4 +1,23 @@ -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 be3d6971..3bdb3625 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_shallow : store -> ( t -> unit ) -> t -> unit
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 c54fd93b..fd9038da 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 7e4832fd..ac0be1b5 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 b0b26153..20e23d5f 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P.Step_vec)

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 c1cc739d..78dc1587 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Registry/index.html new file mode 100644 index 00000000..99c6a843 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Registry/index.html @@ -0,0 +1,3 @@ + +Registry (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/Simplify/index.html index 16b62014..d26dbbd7 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

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

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ 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 380337fd..6bfbacec 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 6326f95a..1f811c81 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,4 +1,23 @@ -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 d0746389..038dd3ac 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_shallow : store -> ( t -> unit ) -> t -> unit
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 9a9e63e9..8a18717f 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 c88d02e9..211c517e 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 5d34e18a..52de1670 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,37 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Solver.Solver_internal)

Module Solver.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Solver.Solver_internal)

Module Solver.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 3e610389..4fa7ed55 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit
val mk_lit : ?sign:bool -> term -> lit * proof_step option
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Solver.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Solver/T/Fun/index.html index f75b3ff7..99aed7f7 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

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

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 088bd721..8672b1eb 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,4 +1,23 @@ -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 98600341..192ddd85 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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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 36b0fa24..fdf239e4 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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 52dda1e9..5e6b60e0 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 982aa378..42e14625 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

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

Module Solver.Unknown

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 c2a1e5bb..2cefd49a 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Solver/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Solver/index.html @@ -1,5 +1,28 @@ -Solver (sidekick-base.Sidekick_base_solver.Solver)

Module Sidekick_base_solver.Solver

SMT solver, obtained from Sidekick_smt_solver

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.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 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 proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : ?on_exit:(unit -> unit) list -> ?check:bool -> ?on_progress:(t -> unit) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = Sidekick_smt_solver.Make(Solver_arg).propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file +Solver (sidekick-base.Sidekick_base_solver.Solver)

Module Sidekick_base_solver.Solver

SMT solver, obtained from Sidekick_smt_solver

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = + Sidekick_smt_solver.Make(Solver_arg).propagation_result = +
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
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 d45724fd..b183c999 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 835faa25..49509ddd 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,11 @@ -Solver_arg (sidekick-base.Sidekick_base_solver.Solver_arg)

Module Sidekick_base_solver.Solver_arg

Argument to the SMT solver

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

Module Sidekick_base_solver.Solver_arg

Argument to the SMT solver

module Lit = Sidekick_base.Lit
val cc_view : + Sidekick_base.Term.t -> + ( Sidekick_base__Base_types.fun_, + Sidekick_base.Term.t, + Sidekick_base.Term.t Iter.t ) + Sidekick_core.CC_view.t
val is_valid_literal : 'a -> bool
type proof = P.t
type proof_step = P.proof_step
\ 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 8eee7ecf..981905eb 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
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
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/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Lit/T/Fun/index.html index 9521573d..fe8f5bba 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 702f1b52..7d7d9f6d 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,4 +1,23 @@ -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 ec253b84..a86106d7 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_shallow : store -> ( t -> unit ) -> t -> unit
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 7bdaade7..c8756e34 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 e0283448..905f58ce 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 b7981247..1eb7347c 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
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Lit)

Module S.Lit

module T : sig ... end
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Model/index.html index f5c7dab0..81ddba01 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

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

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/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Step_vec/index.html index 3de689f8..7b7a5f38 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 cf9cf8df..3ea1c4cd 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Registry/index.html new file mode 100644 index 00000000..ced9972f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Registry)

Module S.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 6746191f..8b472822 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 aaf65652..0de88caa 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,4 +1,23 @@ -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 e42a42f1..3becdc36 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_shallow : store -> ( t -> unit ) -> t -> unit
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 7e8577bf..d0645521 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 b4a83289..808c9f55 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 a6839650..441724e2 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.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/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Actions/P/index.html index 5509b9b6..ef3e4490 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ 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 fd7c9a37..dd09e7d5 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 7708ed65..4bad1201 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,4 +1,23 @@ -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 1d2e2661..f77419bb 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_shallow : store -> ( t -> unit ) -> t -> unit
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 03a10dd1..83fe1a06 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 b400f69b..2d64dad7 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 653413f0..a11219d6 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,10 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Actions)

Module CC.Actions

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

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 3507aba3..780cfd40 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 8654977d..46de2b4b 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

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

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> 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 8aab89f3..8be2bcfe 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 c213249e..011c3990 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,4 +1,23 @@ -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 a21dc3e5..57fc9655 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_shallow : store -> ( t -> unit ) -> t -> unit
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 e8c580f7..5e07fc06 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 c2ae58c8..aa5955db 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 2039ae89..1e0ae349 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/N/index.html index 900eef30..d78a24c5 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,3 @@ -N (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Step_vec/index.html index ffd695d0..b3f8b7c8 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 d74b313f..a8d80af9 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..0d677ebf --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,4 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = + Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Resolved_expl.t = + {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
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/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/CC/T/Fun/index.html index 1b4bf17c..a75444f0 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 96662668..29821fa4 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,4 +1,23 @@ -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 99cd9b63..68cfb5b4 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_shallow : store -> ( t -> unit ) -> t -> unit
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 48c0bb70..fc725199 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 c54f1984..8defbfbc 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 a4c9fbd1..cfb5226a 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,4 +1,13 @@ -CC (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
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 proof : t -> proof
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 * proof_step) -> 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 -> proof -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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 0f502450..20da91e1 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 91c53574..dac9b5bc 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,4 +1,23 @@ -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 3833d7f8..5d41105e 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_shallow : store -> ( t -> unit ) -> t -> unit
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 554e45b8..b4765eae 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 8b8b07ae..9aed4970 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 967d1705..82a87765 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P.Step_vec)

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 3af32fef..b2f963f5 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..dad6c979 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,3 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/Simplify/index.html index 35dfb318..90e8896b 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

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

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ 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 1daca23a..f09dccc7 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 2af39a50..8419d8b2 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,4 +1,23 @@ -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 ee3697a3..b24543ab 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_shallow : store -> ( t -> unit ) -> t -> unit
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 5ead314f..be5d4da0 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 8f7dd936..753dc447 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 7804acb2..897eef6e 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,37 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 71e70854..bcdc48a4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit
val mk_lit : ?sign:bool -> term -> lit * proof_step option
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_bool.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_bool/A/S/T/Fun/index.html index 8550d0eb..07cd7ea6 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

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

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 a616624a..b987abc7 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,4 +1,23 @@ -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 29c94eb1..d229fb0c 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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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 817afcbb..af52c23e 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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 9264fdc0..e925ab48 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 c412325f..367cc39a 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

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

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 d22e2032..a5681066 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,5 +1,28 @@ -S (sidekick-base.Sidekick_base_solver.Th_bool.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.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 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 proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : ?on_exit:(unit -> unit) list -> ?check:bool -> ?on_progress:(t -> unit) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = Sidekick_smt_solver.Make(Solver_arg).propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_bool.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = + Sidekick_smt_solver.Make(Solver_arg).propagation_result = +
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
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 ee0ed50e..cd6ff099 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 da6e33f7..6b4d7cd0 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,7 @@ -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 check_congruence_classes : bool
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step
val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step
val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step
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 -> + ( term, term Iter.t ) Sidekick_th_bool_static.bool_view
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step
val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step
val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step
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 d816310c..48b52f2f 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 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 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 f8ecd852..be5d27f3 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
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
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/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/P/index.html index 714fc6a7..db846b0e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/P/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/P/index.html @@ -1,2 +1,18 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.P)

Module A.P

val lemma_isa_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_select_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step
val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step
val lemma_cstor_inj : S.T.Term.t -> S.T.Term.t -> int -> S.P.t -> S.P.proof_step
val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_acyclicity : (S.T.Term.t * S.T.Term.t) Iter.t -> S.P.t -> S.P.proof_step
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.P)

Module A.P

val lemma_isa_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step
val lemma_select_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step
val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step
val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step
val lemma_cstor_inj : + S.T.Term.t -> + S.T.Term.t -> + int -> + S.P.t -> + S.P.proof_step
val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step
val lemma_acyclicity : + (S.T.Term.t * S.T.Term.t) Iter.t -> + S.P.t -> + S.P.proof_step
\ 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 46d957ec..325f5a70 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 4693a0c8..95c8c7e6 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,4 +1,23 @@ -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 0ac549d1..57e98e2e 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_shallow : store -> ( t -> unit ) -> t -> unit
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 72341aae..677ab18f 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 1517ec41..7cd204c0 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 0fd04ea6..1b687ac2 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
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Lit)

Module S.Lit

module T : sig ... end
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Model/index.html index f5bf6e4f..0a607738 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

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

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/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Step_vec/index.html index 18c1a79e..32bb128c 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 630365aa..92c76f5a 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Registry/index.html new file mode 100644 index 00000000..b80e6dd7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_data.A.S.Registry)

Module S.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 125bf823..5a145da4 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 75e5b032..8e021b1b 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,4 +1,23 @@ -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 15082331..57284d10 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_shallow : store -> ( t -> unit ) -> t -> unit
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 47159918..2d3214e2 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 45959169..cd086dc5 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 6b8aaa31..5f524980 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.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/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Actions/P/index.html index cc7156f7..f52967ae 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ 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 afc863ed..133019dc 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 6d331f27..c9a5edc2 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,4 +1,23 @@ -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 35b9c587..1f570a44 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_shallow : store -> ( t -> unit ) -> t -> unit
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 775b3ee0..eb53f112 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 7b92d777..500d5e7f 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 447569aa..2b4f21dc 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,10 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Actions)

Module CC.Actions

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

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 43198348..401e39c2 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 402c7ed8..a476eb93 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

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

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> 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 034b7ede..a9bac896 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 dc57e327..ba111470 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,4 +1,23 @@ -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 336f7e9e..9856c790 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_shallow : store -> ( t -> unit ) -> t -> unit
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 8c637817..4e26e355 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 09748db0..3398511a 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 339afc60..305646f2 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/N/index.html index a27d09d1..9f2e176d 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,3 @@ -N (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Step_vec/index.html index f3852fe5..7b3bcf7e 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 1c0a2388..56a34fd8 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..1a6c6ae5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,4 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = + Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Resolved_expl.t = + {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
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/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/CC/T/Fun/index.html index 003dd9bc..c648eec4 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 e1e50cf0..0be95acf 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,4 +1,23 @@ -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 41f67652..18050006 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_shallow : store -> ( t -> unit ) -> t -> unit
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 fa6fe6b6..07b12756 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 42641828..29807168 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 aafba962..82c24134 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,4 +1,13 @@ -CC (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
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 proof : t -> proof
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 * proof_step) -> 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 -> proof -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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 788e193f..a9841cd5 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 61291e09..50e52b0c 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,4 +1,23 @@ -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 fc2f6647..f8a3adcb 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_shallow : store -> ( t -> unit ) -> t -> unit
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 431fa494..af4767d2 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 f74bb27d..6f130630 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 301ee08e..ae02df47 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P.Step_vec)

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 6b3803bc..6986902b 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..7ed5f1f8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,3 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/Simplify/index.html index 90efd7b0..825a7f10 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

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

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ 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 520fb6dc..3c3751c4 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 3439e995..47131441 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,4 +1,23 @@ -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 939de19e..147c531d 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_shallow : store -> ( t -> unit ) -> t -> unit
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 a71ed7b5..186843ad 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 3d56e356..8693e348 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 aca21691..0634731c 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,37 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index a566a14b..b2fc1fa4 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit
val mk_lit : ?sign:bool -> term -> lit * proof_step option
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_data.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_data/A/S/T/Fun/index.html index 5171a4ae..f4c971ca 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

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

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 df054ff2..cc5e2da1 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,4 +1,23 @@ -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 f6c2da23..ed94e55e 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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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 5e1e0b51..3c4a4b14 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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 6af1c4ee..6c4bc7ff 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 7f15379e..fcb1d063 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

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

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 6e9c9e1d..97b4534f 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,5 +1,28 @@ -S (sidekick-base.Sidekick_base_solver.Th_data.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.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 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 proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : ?on_exit:(unit -> unit) list -> ?check:bool -> ?on_progress:(t -> unit) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = Sidekick_smt_solver.Make(Solver_arg).propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_data.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = + Sidekick_smt_solver.Make(Solver_arg).propagation_result = +
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
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 31a2f60c..8968b096 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 13f7df00..16f5b9e3 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,10 @@ -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 mk_sel : S.T.Term.store -> Cstor.t -> int -> 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
module P : sig ... end
\ 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.t, S.T.Ty.t ) Sidekick_th_data.data_ty_view
val mk_sel : S.T.Term.store -> Cstor.t -> int -> 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
module P : sig ... end
\ 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 39846a19..882dbab8 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_lia/A/LRA_solver/A/Gensym/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Gensym/index.html new file mode 100644 index 00000000..d995757c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.Gensym)

Module A.Gensym

type t = Gensym.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_lia/A/LRA_solver/A/Q/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Q/index.html new file mode 100644 index 00000000..9f30dc56 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.Q)

Module A.Q

type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> 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 infinity : t
val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool
val is_int : t -> bool
val as_int : t -> bigint option
val floor : t -> bigint
val ceil : 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_lia/A/LRA_solver/A/S/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Fun/index.html new file mode 100644 index 00000000..ec376d3c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..a1a606df --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/index.html new file mode 100644 index 00000000..9aca718f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Ty/index.html new file mode 100644 index 00000000..49cac7a6 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/index.html new file mode 100644 index 00000000..798d8c47 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/index.html new file mode 100644 index 00000000..23d0e6e7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Lit)

Module S.Lit

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

Module S.Model

type t = S.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_lia/A/LRA_solver/A/S/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/Step_vec/index.html new file mode 100644 index 00000000..eab432d2 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/index.html new file mode 100644 index 00000000..aca9682b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Registry/index.html new file mode 100644 index 00000000..9651a966 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Registry)

Module S.Registry

type t = S.Registry.t
type 'a key = 'a S.Registry.key
val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html new file mode 100644 index 00000000..e789ac2e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..0b789d60 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html new file mode 100644 index 00000000..fca92c9e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html new file mode 100644 index 00000000..7027f651 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/index.html new file mode 100644 index 00000000..d82c5b01 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/index.html new file mode 100644 index 00000000..d7316d86 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..18c78e11 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Fun/index.html new file mode 100644 index 00000000..92809332 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html new file mode 100644 index 00000000..4a2d16c0 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/index.html new file mode 100644 index 00000000..c6a7b7e4 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Ty/index.html new file mode 100644 index 00000000..86135aa9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/index.html new file mode 100644 index 00000000..78d126cf --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..ca3b3e1b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,10 @@ + +Actions (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Debug_/index.html new file mode 100644 index 00000000..9035580d --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Debug_/index.html @@ -0,0 +1,2 @@ + +Debug_ (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..167d3610 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Expl)

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Fun/index.html new file mode 100644 index 00000000..4b1766b8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..f7a3c20d --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/index.html new file mode 100644 index 00000000..d336f9ec --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Ty/index.html new file mode 100644 index 00000000..e974c622 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/index.html new file mode 100644 index 00000000..ba57c836 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/index.html new file mode 100644 index 00000000..bd0d06f5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Lit)

Module CC.Lit

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

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/Step_vec/index.html new file mode 100644 index 00000000..ab9ad4ae --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..194989f9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..8a732ae8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = S.Solver_internal.CC.Resolved_expl.t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Fun/index.html new file mode 100644 index 00000000..d3bf1ae9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/Tbl/index.html new file mode 100644 index 00000000..f1d8f5d4 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/index.html new file mode 100644 index 00000000..d38fe42c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Ty/index.html new file mode 100644 index 00000000..0b35acdc --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/index.html new file mode 100644 index 00000000..d1cfd028 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..128931a7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/CC/index.html @@ -0,0 +1,13 @@ + +CC (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Fun/index.html new file mode 100644 index 00000000..6c2efc7c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..358063e6 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/index.html new file mode 100644 index 00000000..c0526880 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Ty/index.html new file mode 100644 index 00000000..939aead6 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/index.html new file mode 100644 index 00000000..f1b30a29 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/index.html new file mode 100644 index 00000000..eab1a039 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/P/index.html new file mode 100644 index 00000000..adef1255 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..4599a3f4 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..be4361f5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Fun/index.html new file mode 100644 index 00000000..35d2c55a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/Tbl/index.html new file mode 100644 index 00000000..f4f08d89 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/index.html new file mode 100644 index 00000000..cda69752 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Ty/index.html new file mode 100644 index 00000000..fe7b6387 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/index.html new file mode 100644 index 00000000..449fb0c1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/index.html new file mode 100644 index 00000000..624ee9a5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/index.html @@ -0,0 +1,35 @@ + +Solver_internal (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type theory_actions = S.Solver_internal.theory_actions
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..6782aada --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Fun/index.html new file mode 100644 index 00000000..d7e2305a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.T.Fun)

Module T.Fun

type t = S.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_lia/A/LRA_solver/A/S/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/Tbl/index.html new file mode 100644 index 00000000..32b575cd --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.T.Term.Tbl)

Module Term.Tbl

type key = t
type !'a t = 'a S.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_lia/A/LRA_solver/A/S/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/index.html new file mode 100644 index 00000000..34945563 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.T.Term)

Module T.Term

type t = S.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 = S.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/LRA_solver/A/S/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Ty/index.html new file mode 100644 index 00000000..fdb576f1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.T.Ty)

Module T.Ty

type t = S.T.Ty.t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store = S.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_lia/A/LRA_solver/A/S/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/index.html new file mode 100644 index 00000000..6ccefc8b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/S/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Unknown/index.html new file mode 100644 index 00000000..520c7dd1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S.Unknown)

Module S.Unknown

type t = S.Unknown.t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/index.html new file mode 100644 index 00000000..08a421c5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/index.html @@ -0,0 +1,26 @@ + +S (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = S.proof
type proof_step = S.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type t = S.t
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = S.res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = S.propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..d34b5e00 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.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_lia/A/LRA_solver/A/Z/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Z/index.html new file mode 100644 index 00000000..1bee469c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A.Z)

Module A.Z

type t = Z.t
val zero : t
val one : t
val minus_one : t
val abs : t -> 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
val succ : t -> t
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/index.html new file mode 100644 index 00000000..6f1c33f3 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/A/index.html @@ -0,0 +1,5 @@ + +A (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.A)

Module LRA_solver.A

module S : sig ... end
module Z : sig ... end
module Q : sig ... end
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) Sidekick_arith_lra.lra_view
val mk_bool : S.T.Term.store -> bool -> term
val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_real : term -> bool
val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Constraint/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..6ed12364 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.Constraint)

Module SimpSolver.Constraint

type t = Th_lra.SimpSolver.Constraint.t = {
op : op;
lhs : V.t;
rhs : num;
}
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-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Q/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Q/index.html new file mode 100644 index 00000000..23eec654 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.Q)

Module SimpSolver.Q

val zero : t
val one : t
val minus_one : t
val abs : t -> 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 infinity : t
val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool
val is_int : t -> bool
val as_int : t -> bigint option
val floor : t -> bigint
val ceil : 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_lia/A/LRA_solver/SimpSolver/Subst/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Subst/index.html new file mode 100644 index 00000000..97b06d00 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Unsat_cert/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..10889561 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.Unsat_cert)

Module SimpSolver.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-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V/index.html new file mode 100644 index 00000000..5fb5a134 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.V)

Module SimpSolver.V

val compare : t -> t -> int
val pp : t Sidekick_util.Fmt.printer
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-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V_map/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V_map/index.html new file mode 100644 index 00000000..694bb10f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/V_map/index.html @@ -0,0 +1,32 @@ + +V_map (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.V_map)

Module SimpSolver.V_map

type key = V.t
type !'a t = 'a Th_lra.SimpSolver.V_map.t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : + ( key -> 'a option -> 'b option -> 'c option ) -> + 'a t -> + 'b t -> + 'c t
val union : ( key -> 'a -> 'a -> 'a option ) -> 'a t -> 'a t -> 'a t
val compare : ( 'a -> 'a -> int ) -> 'a t -> 'a t -> int
val equal : ( 'a -> 'a -> bool ) -> 'a t -> 'a t -> bool
val iter : ( key -> 'a -> unit ) -> 'a t -> unit
val fold : ( key -> 'a -> 'b -> 'b ) -> 'a t -> 'b -> 'b
val for_all : ( key -> 'a -> bool ) -> 'a t -> bool
val exists : ( key -> 'a -> bool ) -> 'a t -> bool
val filter : ( key -> 'a -> bool ) -> 'a t -> 'a t
val filter_map : ( key -> 'a -> 'b option ) -> 'a t -> 'b t
val partition : ( key -> 'a -> bool ) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_last : ( key -> bool ) -> 'a t -> key * 'a
val find_last_opt : ( key -> bool ) -> 'a t -> (key * 'a) option
val map : ( 'a -> 'b ) -> 'a t -> 'b t
val mapi : ( key -> 'a -> 'b ) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val get : key -> 'a t -> 'a option
val get_or : key -> 'a t -> default:'a -> 'a
val update : key -> ( 'a option -> 'a option ) -> 'a t -> 'a t
val choose_opt : 'a t -> (key * 'a) option
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding_opt : 'a t -> (key * 'a) option
val find_opt : key -> 'a t -> 'a option
val find_first : ( key -> bool ) -> 'a t -> key * 'a
val find_first_opt : ( key -> bool ) -> 'a t -> (key * 'a) option
val merge_safe : + f:( key -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option ) -> + 'a t -> + 'b t -> + 'c t
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> 'a t
val add_seq_with : + f:( key -> 'a -> 'a -> 'a ) -> + 'a t -> + (key * 'a) Stdlib.Seq.t -> + '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 : 'a t -> (key * 'a) CCMap.iter -> 'a t
val add_iter_with : + f:( key -> 'a -> 'a -> 'a ) -> + 'a t -> + (key * 'a) CCMap.iter -> + 'a t
val of_iter : (key * 'a) CCMap.iter -> 'a t
val of_iter_with : f:( key -> 'a -> 'a -> 'a ) -> (key * 'a) CCMap.iter -> 'a t
val to_iter : 'a t -> (key * 'a) CCMap.iter
val of_list : (key * 'a) list -> 'a t
val of_list_with : f:( key -> 'a -> 'a -> 'a ) -> (key * 'a) list -> 'a t
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_with : + f:( key -> 'a -> 'a -> 'a ) -> + 'a t -> + (key * 'a) list -> + 'a t
val keys : 'a t -> key CCMap.iter
val values : 'a t -> 'a CCMap.iter
val to_list : 'a t -> (key * 'a) list
val pp : + ?pp_start:unit CCMap.printer -> + ?pp_stop:unit CCMap.printer -> + ?pp_arrow:unit CCMap.printer -> + ?pp_sep:unit CCMap.printer -> + key CCMap.printer -> + 'a CCMap.printer -> + 'a t CCMap.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Z/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Z/index.html new file mode 100644 index 00000000..a64d8663 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver.Z)

Module SimpSolver.Z

val zero : t
val one : t
val minus_one : t
val abs : t -> 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
val succ : t -> t
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/index.html new file mode 100644 index 00000000..95b46c7b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver.SimpSolver)

Module LRA_solver.SimpSolver

module V : sig ... end
module V_map : sig ... end
module Z : sig ... end
module Q : sig ... end
type num = Q.t
module Constraint : sig ... end
module Subst : sig ... end
val create : ?stat:Sidekick_util.Stat.t -> unit -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
val define : ?is_int:bool -> t -> V.t -> (num * V.t) list -> unit
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 : ?is_int:bool -> t -> V.t -> unit
val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit
val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit
val check_exn : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + t -> + unit
type result = Th_lra.SimpSolver.result =
| Sat of Subst.t
| Unsat of Unsat_cert.t
val check : on_propagate:( V.lit -> reason:V.lit list -> unit ) -> t -> result
val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option
val n_vars : t -> int
val n_rows : t -> int
val _check_invariants : t -> unit
val _check_cert : unsat_cert -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/index.html new file mode 100644 index 00000000..e1c69380 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/LRA_solver/index.html @@ -0,0 +1,2 @@ + +LRA_solver (sidekick-base.Sidekick_base_solver.Th_lia.A.LRA_solver)

Module A.LRA_solver

module A : sig ... end
module SimpSolver : sig ... end
type state = Th_lra.state
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Q/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Q/index.html new file mode 100644 index 00000000..5b0754ac --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick-base.Sidekick_base_solver.Th_lia.A.Q)

Module A.Q

type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> 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 infinity : t
val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool
val is_int : t -> bool
val as_int : t -> bigint option
val floor : t -> bigint
val ceil : 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_lia/A/S/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Fun/index.html new file mode 100644 index 00000000..98daec25 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..c21ef9aa --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/index.html new file mode 100644 index 00000000..f8c0b52d --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Ty/index.html new file mode 100644 index 00000000..c3e33e5d --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/index.html new file mode 100644 index 00000000..63f6e38a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/index.html new file mode 100644 index 00000000..36714626 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Lit)

Module S.Lit

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

Module S.Model

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_lia/A/S/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/Step_vec/index.html new file mode 100644 index 00000000..544fc5c2 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick-base.Sidekick_base_solver.Th_lia.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/index.html new file mode 100644 index 00000000..1a827dcd --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Registry/index.html new file mode 100644 index 00000000..fae42224 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Registry)

Module S.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html new file mode 100644 index 00000000..47094b48 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..45741c21 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html new file mode 100644 index 00000000..0088975a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html new file mode 100644 index 00000000..85c639de --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/index.html new file mode 100644 index 00000000..98bacbef --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/index.html new file mode 100644 index 00000000..cff6aea8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..5a718769 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Fun/index.html new file mode 100644 index 00000000..42af2922 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html new file mode 100644 index 00000000..8b6d50e5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/index.html new file mode 100644 index 00000000..73b62006 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/CC/Actions/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Ty/index.html new file mode 100644 index 00000000..0ad30c5c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/index.html new file mode 100644 index 00000000..85a17832 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..7b9c13c5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,10 @@ + +Actions (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Debug_/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Debug_/index.html new file mode 100644 index 00000000..3f5ceac3 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Debug_/index.html @@ -0,0 +1,2 @@ + +Debug_ (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..5dbe1c2c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Expl)

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Fun/index.html new file mode 100644 index 00000000..76aea95b --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..39d37bff --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/index.html new file mode 100644 index 00000000..7052665e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/CC/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Ty/index.html new file mode 100644 index 00000000..b90f0e09 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/index.html new file mode 100644 index 00000000..0d072163 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/index.html new file mode 100644 index 00000000..1608d6d7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Lit)

Module CC.Lit

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

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/Step_vec/index.html new file mode 100644 index 00000000..782bd0b9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..356467c7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..a102c160 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,4 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = + Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Resolved_expl.t = + {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Fun/index.html new file mode 100644 index 00000000..fd6a0dc0 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/Tbl/index.html new file mode 100644 index 00000000..f1612e00 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/index.html new file mode 100644 index 00000000..6984e2c9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/CC/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Ty/index.html new file mode 100644 index 00000000..f7f1d30a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/index.html new file mode 100644 index 00000000..5e89f70e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/CC/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..d91d8905 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/CC/index.html @@ -0,0 +1,13 @@ + +CC (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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_lia/A/S/Solver_internal/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Fun/index.html new file mode 100644 index 00000000..271d55bd --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/Lit/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/Tbl/index.html new file mode 100644 index 00000000..5d21a001 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/Lit/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/index.html new file mode 100644 index 00000000..2319dba9 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/Lit/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Ty/index.html new file mode 100644 index 00000000..6f5ef329 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/Lit/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/index.html new file mode 100644 index 00000000..302fb4e0 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/Lit/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/index.html new file mode 100644 index 00000000..02b763d0 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/P/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/P/index.html new file mode 100644 index 00000000..86183ffa --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/P/index.html @@ -0,0 +1,6 @@ + +P (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..b711745e --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,3 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..17ce6d94 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Fun/index.html new file mode 100644 index 00000000..b8dc1db3 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/Tbl/index.html new file mode 100644 index 00000000..f8a00c18 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/index.html new file mode 100644 index 00000000..4b776ba2 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/Solver_internal/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Ty/index.html new file mode 100644 index 00000000..e394b1ef --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/index.html new file mode 100644 index 00000000..5be725b1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Solver_internal/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/index.html new file mode 100644 index 00000000..934797c1 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/index.html @@ -0,0 +1,37 @@ + +Solver_internal (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..1cccbeb8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Fun/index.html new file mode 100644 index 00000000..391716bd --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick-base.Sidekick_base_solver.Th_lia.A.S.T.Fun)

Module T.Fun

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_lia/A/S/T/Term/Tbl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/Tbl/index.html new file mode 100644 index 00000000..41d82a49 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/Tbl/index.html @@ -0,0 +1,23 @@ + +Tbl (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/T/Term/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/index.html new file mode 100644 index 00000000..84c64fd5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Term/index.html @@ -0,0 +1,2 @@ + +Term (sidekick-base.Sidekick_base_solver.Th_lia.A.S.T.Term)

Module T.Term

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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_lia/A/S/T/Ty/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Ty/index.html new file mode 100644 index 00000000..2069e6b4 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick-base.Sidekick_base_solver.Th_lia.A.S.T.Ty)

Module T.Ty

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_lia/A/S/T/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/index.html new file mode 100644 index 00000000..f8c22cd7 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/S/Unknown/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Unknown/index.html new file mode 100644 index 00000000..c40d1b97 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick-base.Sidekick_base_solver.Th_lia.A.S.Unknown)

Module S.Unknown

val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/index.html new file mode 100644 index 00000000..c5f155a5 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/index.html @@ -0,0 +1,28 @@ + +S (sidekick-base.Sidekick_base_solver.Th_lia.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = + Sidekick_smt_solver.Make(Solver_arg).propagation_result = +
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/module-type-THEORY/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..327bf13d --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick-base.Sidekick_base_solver.Th_lia.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_lia/A/Z/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Z/index.html new file mode 100644 index 00000000..f1d99e1a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick-base.Sidekick_base_solver.Th_lia.A.Z)

Module A.Z

type t = Z.t
val zero : t
val one : t
val minus_one : t
val abs : t -> 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
val succ : t -> t
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/index.html new file mode 100644 index 00000000..34be155c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/A/index.html @@ -0,0 +1,5 @@ + +A (sidekick-base.Sidekick_base_solver.Th_lia.A)

Module Th_lia.A

module S : sig ... end
module Z : sig ... end
module Q : sig ... end
module LRA_solver : sig ... end
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lia : term -> ( Z.t, Q.t, term ) Sidekick_arith_lia.lia_view
val mk_bool : S.T.Term.store -> bool -> term
val mk_to_real : S.T.Term.store -> term -> term
val ty_int : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_int : term -> bool
val lemma_lia : S.Lit.t Iter.t -> S.P.proof_rule
val lemma_relax_to_lra : S.Lit.t Iter.t -> S.P.proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lia/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lia/index.html new file mode 100644 index 00000000..20f8644a --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lia/index.html @@ -0,0 +1,2 @@ + +Th_lia (sidekick-base.Sidekick_base_solver.Th_lia)

Module Sidekick_base_solver.Th_lia

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 04b3d14d..7abfe89e 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 = Gensym.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 0e01653d..26d7d0df 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 infinity : t
val minus_infinity : t
val is_real : t -> bool
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 abs : t -> 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 infinity : t
val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool
val is_int : t -> bool
val as_int : t -> bigint option
val floor : t -> bigint
val ceil : 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/Lit/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Lit/T/Fun/index.html index e28e2c2e..8b3fb9a1 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 9b087d9f..aeaf5266 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,4 +1,23 @@ -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 c5abfee8..9b9c8d31 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_shallow : store -> ( t -> unit ) -> t -> unit
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 1c845481..936ad74d 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 19f2c74c..5c93b27d 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 906fb1c0..0ae2e052 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
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Lit)

Module S.Lit

module T : sig ... end
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Model/index.html index 1d664bc9..5bf6f68a 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

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

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/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Step_vec/index.html index 647508a6..c3442198 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 11f1d9ed..5552c208 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.P)

Module S.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Registry/index.html new file mode 100644 index 00000000..c8870f2f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Registry)

Module S.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 3189723d..29e70752 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 9299a20f..44c5ac05 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,4 +1,23 @@ -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 8eaaeea1..36db59a5 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_shallow : store -> ( t -> unit ) -> t -> unit
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 f21bae07..2ea76a40 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 705e9c0d..5dd97649 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 517e4179..45203f7e 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.Lit)

Module Actions.Lit

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

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.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/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Actions/P/index.html index 6ee5cb17..2cab683d 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ 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 dfa9af77..462ddd17 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 c142da88..9bf744cb 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,4 +1,23 @@ -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 60b2d915..e95ccb9e 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_shallow : store -> ( t -> unit ) -> t -> unit
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 26ef7ff4..d640d6db 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 182dac8c..400b61ce 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 648cc121..df86df3e 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,10 @@ -Actions (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Actions)

Module CC.Actions

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

Module CC.Actions

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
val proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> 'a
val raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a
val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 d9f96226..d9e8f3fa 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 6012187a..88aabe89 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

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

Module CC.Expl

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_same_value : N.t -> N.t -> t
val mk_list : t list -> t
val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> 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 13a26362..d3fcb756 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 e3d6caf3..d03943ea 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,4 +1,23 @@ -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 9e1bacd4..c0964edb 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_shallow : store -> ( t -> unit ) -> t -> unit
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 a8edf5d5..842fe361 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 4a5445e4..342fd7e6 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 f1a606c0..1d07c32d 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Lit)

Module CC.Lit

module T : sig ... end
type t = Lit.t
val term : t -> T.Term.t
val sign : t -> bool
val neg : t -> t
val abs : t -> t
val signed_term : t -> T.Term.t * bool
val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/N/index.html index c99eb31e..16180215 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,3 @@ -N (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file +N (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.N)

Module CC.N

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
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Step_vec/index.html index e34b9aca..1086edc2 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

type elt = proof_step
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 05bf4491..cc7d6c5a 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof
type proof_step = proof_step
type lit = lit
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..8c47cfe3 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,4 @@ + +Resolved_expl (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

type t = + Sidekick_smt_solver.Make(Solver_arg).Solver_internal.CC.Resolved_expl.t = + {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool
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/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/CC/T/Fun/index.html index 824db12c..7e052f83 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 775786ce..68a942de 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,4 +1,23 @@ -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 7b28775c..24f5bbbc 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_shallow : store -> ( t -> unit ) -> t -> unit
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 a0e8e785..21dc3d2e 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 28ec2367..c7de4cfa 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 13778819..bf7b559d 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,4 +1,13 @@ -CC (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
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 proof : t -> proof
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 * proof_step) -> 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 -> proof -> t
val allocate_bitfield : descr:string -> t -> N.bitfield
val get_bitfield : t -> N.bitfield -> N.t -> bool
val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit
val on_pre_merge : t -> ev_on_pre_merge -> unit
val on_post_merge : t -> ev_on_post_merge -> unit
val on_new_term : t -> ev_on_new_term -> unit
val on_conflict : t -> ev_on_conflict -> unit
val on_propagate : t -> ev_on_propagate -> unit
val on_is_subterm : t -> ev_on_is_subterm -> unit
val set_as_lit : t -> N.t -> lit -> unit
val find_t : t -> term -> repr
val add_seq : t -> term Iter.t -> unit
val all_classes : t -> repr Iter.t
val assert_lit : t -> lit -> unit
val assert_lits : t -> lit Iter.t -> unit
val explain_eq : t -> N.t -> N.t -> lit list
val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a
val n_true : t -> N.t
val n_false : t -> N.t
val n_bool : t -> bool -> N.t
val merge : t -> N.t -> N.t -> Expl.t -> unit
val merge_t : t -> term -> term -> Expl.t -> unit
val check : t -> actions -> unit
val new_merges : t -> bool
val push_level : t -> unit
val pop_levels : t -> int -> unit
val get_model : t -> N.t Iter.t Iter.t
module Debug_ : sig ... end
\ No newline at end of file +CC (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.CC)

Module Solver_internal.CC

module T : sig ... end
module Lit : sig ... end
type proof = proof
type proof_step = proof_step
module P : sig ... end
module Actions : sig ... end
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
module N : sig ... end
module Expl : sig ... end
module Resolved_expl : sig ... end
type node = N.t
type repr = N.t
type explanation = Expl.t
val term_store : t -> term_store
val proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t
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 set_model_value : t -> term -> value -> unit
val with_model_mode : t -> ( unit -> 'a ) -> 'a
val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t
val check : t -> actions -> unit
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 9b768384..2864e7ba 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 ea8c65c4..a66bb92e 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,4 +1,23 @@ -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 8b65322d..960bafed 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_shallow : store -> ( t -> unit ) -> t -> unit
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 66b70b6a..73cf614d 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 be4bb026..29ff7438 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 f7fe68f5..e9e9d292 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 atom : ?sign:bool -> T.Term.store -> T.Term.t -> t
val norm_sign : t -> t * bool
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Lit)

Module Solver_internal.Lit

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

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P.Step_vec)

Module P.Step_vec

type elt = proof_step
type t = P.Step_vec.t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit
val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 3e5402d7..796fc1c1 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,6 @@ -P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule
\ No newline at end of file +P (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.P)

Module Solver_internal.P

type t = proof
type proof_step = proof_step
type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
module Step_vec : sig ... end
val enabled : t -> bool
val emit_input_clause : lit Iter.t -> proof_rule
val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule
val emit_unsat_core : lit Iter.t -> proof_rule
val emit_unsat : proof_step -> t -> unit
val del_clause : proof_step -> lit Iter.t -> t -> unit
val lemma_cc : lit Iter.t -> proof_rule
val define_term : term -> term -> proof_rule
val proof_p1 : proof_step -> proof_step -> proof_rule
val proof_r1 : proof_step -> proof_step -> proof_rule
val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule
val with_defs : proof_step -> proof_step Iter.t -> proof_rule
val lemma_true : term -> proof_rule
val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule
val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Registry/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..4356034c --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,3 @@ + +Registry (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

val create_key : unit -> 'a key
val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/Simplify/index.html index d9401f91..b8a343e3 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

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

Module Solver_internal.Simplify

val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit
val proof : t -> proof
type hook = t -> term -> (term * proof_step Iter.t) option
val normalize : t -> term -> (term * proof_step) option
val normalize_t : t -> term -> term * proof_step option
\ 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 509886ee..d0daeb4e 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 37eb71e8..ad8c6933 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,4 +1,23 @@ -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 178056b7..7bebabbd 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_shallow : store -> ( t -> unit ) -> t -> unit
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 0ae3599c..64ac8859 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 4d4c59a7..1510a18f 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 da59d99f..93f0d501 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,37 @@ -Solver_internal (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option
val on_preprocess : t -> preprocess_hook -> unit
val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit
val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit
val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit
val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit
val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit
val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit
val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit
type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option
val on_model_gen : t -> model_hook -> unit
\ No newline at end of file +Solver_internal (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal)

Module S.Solver_internal

module T : sig ... end
module Lit : sig ... end
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type proof = proof
type proof_step = proof_step
module P : sig ... end
type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof
module Registry : sig ... end
val registry : t -> Registry.t
type lit = Lit.t
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 simplify_t : t -> term -> (term * proof_step) option
val simp_t : t -> term -> term * proof_step option
module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)
type preprocess_hook = t -> preprocess_actions -> term -> unit
val on_preprocess : t -> preprocess_hook -> unit
val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a
val push_decision : t -> theory_actions -> lit -> unit
val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit
val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit
val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit
val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit
val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit
val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit
val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit
val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a
val cc_find : t -> CC.N.t -> CC.N.t
val cc_are_equal : t -> term -> term -> bool
val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit
val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit
val cc_add_term : t -> term -> CC.N.t
val cc_mem_term : t -> term -> bool
val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit
val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit
val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit
val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit
val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit
val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit
val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit
val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit
val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit
val declare_pb_is_incomplete : t -> unit
type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option
type model_completion_hook = t -> add:( term -> term -> unit ) -> unit
val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index c17bd50a..e9b5896d 100644 --- a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit
val mk_lit : ?sign:bool -> term -> lit * proof_step option
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file +PREPROCESS_ACTS (sidekick-base.Sidekick_base_solver.Th_lra.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit
val add_clause : lit list -> proof_step -> unit
val add_lit : ?default_pol:bool -> lit -> unit
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/S/T/Fun/index.html index 09ae2e92..5b9eb7d4 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

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

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 71482a0c..2b6481b0 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,4 +1,23 @@ -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 fe998d07..d0fb2c20 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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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_shallow : store -> ( t -> unit ) -> t -> unit
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 c91b2f40..c9abc589 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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 ae1da364..e37fb767 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 a12756f7..f42cc6db 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

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

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 45f89e99..d47464e8 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,5 +1,28 @@ -S (sidekick-base.Sidekick_base_solver.Th_lra.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.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 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 proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Small | `Tiny ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : ?on_exit:(unit -> unit) list -> ?check:bool -> ?on_progress:(t -> unit) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = Sidekick_smt_solver.Make(Solver_arg).propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result
val pp_stats : t CCFormat.printer
\ No newline at end of file +S (sidekick-base.Sidekick_base_solver.Th_lra.A.S)

Module A.S

module T : sig ... end
module Lit : sig ... end
type proof = Solver_arg.proof
type proof_step = Solver_arg.proof_step
module P : sig ... end
module Solver_internal : sig ... end
type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module Registry : sig ... end
val registry : t -> Registry.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 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 proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Small | `Tiny ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t
val add_theory : t -> theory -> unit
val add_theory_p : t -> 'a theory_p -> 'a
val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit
val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit
val add_clause_l : t -> lit list -> proof_step -> unit
val assert_terms : t -> term list -> unit
val assert_term : t -> term -> unit
type res = Sidekick_smt_solver.Make(Solver_arg).res =
| Sat of Model.t
| Unsat of {
unsat_core : unit -> lit Iter.t;
unsat_proof_step : unit -> proof_step option;
}
| Unknown of Unknown.t
val solve : + ?on_exit:( unit -> unit ) list -> + ?check:bool -> + ?on_progress:( t -> unit ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res
val last_res : t -> res option
val push_assumption : t -> lit -> unit
val pop_assumptions : t -> int -> unit
type propagation_result = + Sidekick_smt_solver.Make(Solver_arg).propagation_result = +
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result
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 ff1e3f0e..268cacf9 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/Z/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Z/index.html new file mode 100644 index 00000000..057aa8da --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick-base.Sidekick_base_solver.Th_lra.A.Z)

Module A.Z

type t = Z.t
val zero : t
val one : t
val minus_one : t
val abs : t -> 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
val succ : t -> t
val pred : t -> t
val gcd : t -> t -> t
\ 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 1005957c..16e484ec 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,5 @@ -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 ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_real : term -> bool
val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
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 Z : sig ... end
module Q : sig ... end
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) Sidekick_arith_lra.lra_view
val mk_bool : S.T.Term.store -> bool -> term
val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term
val has_ty_real : term -> bool
val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Constraint/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..c61e9f85 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.Constraint)

Module SimpSolver.Constraint

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-base/Sidekick_base_solver/Th_lra/SimpSolver/Q/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Q/index.html new file mode 100644 index 00000000..e248fea3 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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-base/Sidekick_base_solver/Th_lra/SimpSolver/Subst/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Subst/index.html new file mode 100644 index 00000000..9c99f5ec --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.t
val pp : t Sidekick_util.Fmt.printer
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Unsat_cert/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..2784225f --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.Unsat_cert)

Module SimpSolver.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/Linear_expr/module-type-VAR/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/V/index.html similarity index 69% rename from dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html rename to dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/V/index.html index bcd77ec2..06dae0ff 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-VAR/index.html +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/V/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 +V (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.V)

Module SimpSolver.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-base/Sidekick_base_solver/Th_lra/SimpSolver/Z/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Z/index.html new file mode 100644 index 00000000..bf2152c8 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/index.html b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/index.html new file mode 100644 index 00000000..5483b814 --- /dev/null +++ b/dev/sidekick-base/Sidekick_base_solver/Th_lra/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick-base.Sidekick_base_solver.Th_lra.SimpSolver)

Module Th_lra.SimpSolver

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ 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 e9074b80..b4c289ac 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 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 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 0c0f9e05..d1523ffb 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_smt_solver

module Th_data : sig ... end

Theory of datatypes

module Th_bool : sig ... end

Reducing boolean formulas to clauses

module Th_lra : sig ... end

Theory of Linear Rational Arithmetic

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

Module Sidekick_base_solver

SMT Solver and Theories for Sidekick_base.

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

module Solver_arg : sig ... end

Argument to the SMT solver

module Solver : sig ... end

SMT solver, obtained from Sidekick_smt_solver

module Th_data : sig ... end

Theory of datatypes

module Th_bool : sig ... end

Reducing boolean formulas to clauses

module Gensym : sig ... end
module Th_lra : sig ... end

Theory of Linear Rational Arithmetic

module Th_lia : sig ... end
val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
val th_lia : Solver.theory
\ No newline at end of file diff --git a/dev/sidekick-base/index.html b/dev/sidekick-base/index.html index 3c23e835..2c562fef 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.proof-trace

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

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.proof-trace

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

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-base/Sidekick_base__CCHet/.dune-keep b/dev/sidekick-bin/Sidekick_bin_lib/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__CCHet/.dune-keep rename to dev/sidekick-bin/Sidekick_bin_lib/.dummy diff --git a/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html index d5706ea6..1a11026c 100644 --- a/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html +++ b/dev/sidekick-bin/Sidekick_bin_lib/Dimacs_lexer/index.html @@ -1,2 +1,2 @@ -Dimacs_lexer (sidekick-bin.Sidekick_bin_lib.Dimacs_lexer)

Module Sidekick_bin_lib.Dimacs_lexer

type token =
| EOF
| P
| CNF
| ZERO
| LIT of int
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file +Dimacs_lexer (sidekick-bin.Sidekick_bin_lib.Dimacs_lexer)

Module Sidekick_bin_lib.Dimacs_lexer

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

Module Sidekick_bin_lib.Dimacs_parser

DIMACS parser

type t
val create : Stdlib.in_channel -> t
val parse_header : t -> int * int
val next_clause : t -> int list option
val iter : t -> int list Iter.t
\ No newline at end of file +Dimacs_parser (sidekick-bin.Sidekick_bin_lib.Dimacs_parser)

Module Sidekick_bin_lib.Dimacs_parser

DIMACS parser

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

Module Sidekick_bin_lib.Drup_lexer

type token =
| EOF
| ZERO
| LIT of int
| D
| R
| I
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val token : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_token_rec : Stdlib.Lexing.lexbuf -> int -> token
val comment : Stdlib.Lexing.lexbuf -> token
val __ocaml_lex_comment_rec : Stdlib.Lexing.lexbuf -> int -> token
\ No newline at end of file +Drup_lexer (sidekick-bin.Sidekick_bin_lib.Drup_lexer)

Module Sidekick_bin_lib.Drup_lexer

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

Module Sidekick_bin_lib.Drup_parser

DRUP parser

type t
type event =
| Input of int list
| Add of int list
| Delete of int list
val create_chan : Stdlib.in_channel -> t
val create_string : string -> t
val next : t -> event option
val iter : t -> event Iter.t
\ No newline at end of file +Drup_parser (sidekick-bin.Sidekick_bin_lib.Drup_parser)

Module Sidekick_bin_lib.Drup_parser

DRUP parser

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

Module Sidekick_bin_lib

Library for the Sidekick executables

module Dimacs_lexer : sig ... end
module Dimacs_parser : sig ... end
module Drup_lexer : sig ... end
module Drup_parser : sig ... end
\ No newline at end of file +Sidekick_bin_lib (sidekick-bin.Sidekick_bin_lib)

Module Sidekick_bin_lib

Library for the Sidekick executables

module Dimacs_lexer : sig ... end
module Dimacs_parser : sig ... end
module Drup_lexer : sig ... end
module Drup_parser : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__/index.html b/dev/sidekick-bin/Sidekick_bin_lib__/index.html deleted file mode 100644 index 7cf47d6e..00000000 --- a/dev/sidekick-bin/Sidekick_bin_lib__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_bin_lib__ (sidekick-bin.Sidekick_bin_lib__)

Module Sidekick_bin_lib__

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

Module Sidekick_bin_lib__Dimacs_lexer

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

Module Sidekick_bin_lib__Dimacs_parser

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

Module Sidekick_bin_lib__Drup_lexer

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

Module Sidekick_bin_lib__Drup_parser

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Config/.dune-keep b/dev/sidekick-bin/Sidekick_smtlib/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Config/.dune-keep rename to dev/sidekick-bin/Sidekick_smtlib/.dummy 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 8dbe58ef..e603240d 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/Lit/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Lit/index.html index 01527309..55a1b549 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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

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

Module Solver.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Model/index.html index 04094114..4e7ecbd7 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/Step_vec/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Step_vec/index.html index 53931fd3..c76f527b 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Step_vec/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 dfc292e2..13c92f0a 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,10 @@ -P (sidekick-bin.Sidekick_smtlib.Process.Solver.P)

Module Solver.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

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

Module Solver.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

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

Module Solver.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/Step_vec/index.html index 49a2472f..34645ecd 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html index c028e65f..cea35fc0 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

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

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 bf6a0ca5..ef52cfb8 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,15 @@ -Actions (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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-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 22cd91bb..a288222b 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 831edae4..ccf774e8 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 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 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/P/Step_vec/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/Step_vec/index.html index 8786a56b..64c695bf 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html index 0a7e44e5..55717438 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

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

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

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

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ 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 f5bbcb69..b3940877 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,4 +1,25 @@ -CC (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Registry/index.html new file mode 100644 index 00000000..35636ba4 --- /dev/null +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 126136d7..3f16bee5 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

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

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

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 038fbaef..a1384222 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,3 +1,43 @@ -Solver_internal (sidekick-bin.Sidekick_smtlib.Process.Solver.Solver_internal)

Module Solver.Solver_internal

Internal solver, available to theories.

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

Main type for a solver

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

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

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

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

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

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

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

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

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

Model production

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

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

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

val on_model_gen : t -> model_hook -> unit

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

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

Module Solver.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

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

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

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

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

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

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

Create a literal. This automatically preprocesses the term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

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

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

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

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

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

Module type Solver_internal.PREPROCESS_ACTS

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

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/T/Fun/index.html index 9cf5b016..1ca403b6 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 3a36002f..c4160e50 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,8 +1,8 @@ -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.

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer

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.

val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer

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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 2691ca6d..1d605186 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.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
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 b639bac4..d1d96841 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

Types

module Term : sig ... end

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

Types

module Term : sig ... end

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 6218f7a6..d2a8c3bd 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 cbec5d68..aab98db3 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/Solver/index.html @@ -1,5 +1,42 @@ -Solver (sidekick-bin.Sidekick_smtlib.Process.Solver)

Module Process.Solver

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

Internal solver, available to theories.

type t

The solver's state.

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

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

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

Module Process.Solver

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

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 6c1a054a..1cdda4d5 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 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 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 08d9b030..49b3746d 100644 --- a/dev/sidekick-bin/Sidekick_smtlib/Process/index.html +++ b/dev/sidekick-bin/Sidekick_smtlib/Process/index.html @@ -1,4 +1,20 @@ -Process (sidekick-bin.Sidekick_smtlib.Process)

Module Sidekick_smtlib.Process

Process Statements

val th_bool : Solver.theory
val th_data : Solver.theory
val th_lra : Solver.theory
type 'a or_error = ('a, string) CCResult.t
module Check_cc : sig ... end
val process_stmt : ?gc:bool -> ?restarts:bool -> ?pp_cnf:bool -> ?proof_file:string --> ?pp_model:bool -> ?check:bool -> ?time:float -> ?memory:float -> ?progress:bool -> -Solver.t -> Sidekick_base.Statement.t -> unit or_error
\ No newline at end of file +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
val th_lia : Solver.theory
type 'a or_error = ( 'a, string ) CCResult.t
module Check_cc : sig ... end
val process_stmt : + ?gc:bool -> + ?restarts:bool -> + ?pp_cnf:bool -> + ?proof_file:string -> + ?pp_model:bool -> + ?check:bool -> + ?time:float -> + ?memory:float -> + ?progress:bool -> + Solver.t -> + Sidekick_base.Statement.t -> + unit or_error
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/index.html b/dev/sidekick-bin/Sidekick_smtlib/index.html index 9076989f..ce98fb1a 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

This library provides a parser, a type-checker, and a solver interface for processing SMTLib-2 problems.

type 'a or_error = ('a, string) CCResult.t
module Term = Sidekick_base.Term
module Process : sig ... end
module Solver = Process.Solver
module Proof = Sidekick_base.Proof
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

This library provides a parser, a type-checker, and a solver interface for processing SMTLib-2 problems.

type 'a or_error = ( 'a, string ) CCResult.t
module Term = Sidekick_base.Term
module Process : sig ... end
module Solver = Process.Solver
module Proof = Sidekick_base.Proof
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__/.dune-keep b/dev/sidekick-bin/Sidekick_smtlib__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick-bin/Sidekick_smtlib__/index.html b/dev/sidekick-bin/Sidekick_smtlib__/index.html deleted file mode 100644 index 5641a387..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__ (sidekick-bin.Sidekick_smtlib__)

Module Sidekick_smtlib__

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/.dune-keep b/dev/sidekick-bin/Sidekick_smtlib__Process/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html b/dev/sidekick-bin/Sidekick_smtlib__Process/index.html deleted file mode 100644 index 103ccf20..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Process/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Process (sidekick-bin.Sidekick_smtlib__Process)

Module Sidekick_smtlib__Process

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/.dune-keep b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html b/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html deleted file mode 100644 index 5b4e3ca2..00000000 --- a/dev/sidekick-bin/Sidekick_smtlib__Typecheck/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_smtlib__Typecheck (sidekick-bin.Sidekick_smtlib__Typecheck)

Module Sidekick_smtlib__Typecheck

\ No newline at end of file diff --git a/dev/sidekick-bin/index.html b/dev/sidekick-bin/index.html index 881208f5..fb86a6dc 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.lib

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

Library sidekick-bin.smtlib

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

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

sidekick-bin index

Library sidekick-bin.lib

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

Library sidekick-bin.smtlib

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

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Form/.dune-keep b/dev/sidekick/Sidekick_arith/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Form/.dune-keep rename to dev/sidekick/Sidekick_arith/.dummy diff --git a/dev/sidekick/Sidekick_arith/.dune-keep b/dev/sidekick/Sidekick_arith/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith/index.html b/dev/sidekick/Sidekick_arith/index.html index 9cffc59b..28fa851f 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
module type INT_FULL = 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 ca453636..62aec8a7 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith/module-type-INT_FULL/index.html b/dev/sidekick/Sidekick_arith/module-type-INT_FULL/index.html new file mode 100644 index 00000000..aa00498e --- /dev/null +++ b/dev/sidekick/Sidekick_arith/module-type-INT_FULL/index.html @@ -0,0 +1,2 @@ + +INT_FULL (sidekick.Sidekick_arith.INT_FULL)

Module type Sidekick_arith.INT_FULL

include INT
include NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
val sqrt : t -> t
val divexact : t -> t -> t
val (/) : t -> t -> t
val ediv : t -> t -> t

Euclidian division

val rem : t -> t -> t
val probab_prime : t -> bool
val pow : t -> int -> 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 2c9d6d49..7a51a23b 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 13a40332..63706eb5 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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-base/Sidekick_base__Hashcons/.dune-keep b/dev/sidekick/Sidekick_arith_lia/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Hashcons/.dune-keep rename to dev/sidekick/Sidekick_arith_lia/.dummy diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Gensym/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Gensym/index.html new file mode 100644 index 00000000..a831aaac --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.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_lia/Make/argument-1-A/LRA_solver/A/Q/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Q/index.html new file mode 100644 index 00000000..6b344216 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.A.Q)

Module A.Q

include Sidekick_arith.NUM with type t = Q.t
type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/Make/argument-1-A/LRA_solver/A/Z/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Z/index.html new file mode 100644 index 00000000..b6f5cb02 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.A.Z)

Module A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/index.html new file mode 100644 index 00000000..f7c51918 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/A/index.html @@ -0,0 +1,5 @@ + +A (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.A)

Module LRA_solver.A

module S = S
module Q : Sidekick_arith_lra.RATIONAL with type bigint = Z.t with type t = Q.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) Sidekick_arith_lra.lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Constraint/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..ee7f2c2f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.Constraint)

Module SimpSolver.Constraint

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_lia/Make/argument-1-A/LRA_solver/SimpSolver/Q/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Q/index.html new file mode 100644 index 00000000..3fd92f4a --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/Make/argument-1-A/LRA_solver/SimpSolver/Subst/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Subst/index.html new file mode 100644 index 00000000..fb9880b0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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_lia/Make/argument-1-A/LRA_solver/SimpSolver/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..77e1ff9f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.Unsat_cert)

Module SimpSolver.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_lia/Make/argument-1-A/LRA_solver/SimpSolver/V/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/V/index.html new file mode 100644 index 00000000..571d7c57 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.V)

Module SimpSolver.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_lia/Make/argument-1-A/LRA_solver/SimpSolver/Z/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Z/index.html new file mode 100644 index 00000000..17640f1e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/index.html new file mode 100644 index 00000000..34096e4e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver.SimpSolver)

Module LRA_solver.SimpSolver

Simplexe

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/index.html new file mode 100644 index 00000000..13f3f8c0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/LRA_solver/index.html @@ -0,0 +1,2 @@ + +LRA_solver (sidekick.Sidekick_arith_lia.Make.1-A.LRA_solver)

Module 1-A.LRA_solver

module A : Sidekick_arith_lra.ARG with type Q.t = Q.t with module S = S
type state

Key to access the state from outside, available when the theory has been setup

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Q/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Q/index.html new file mode 100644 index 00000000..9bede7fd --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/Make/argument-1-A/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Lit/index.html new file mode 100644 index 00000000..c78df551 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_arith_lia.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Model/index.html new file mode 100644 index 00000000..e5f431cb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_arith_lia.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_lia/Make/argument-1-A/S/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/Step_vec/index.html new file mode 100644 index 00000000..94050bd2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/index.html new file mode 100644 index 00000000..5acbe804 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.Make.1-A.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Registry/index.html new file mode 100644 index 00000000..ee528a4e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.Make.1-A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html new file mode 100644 index 00000000..fe9945a9 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..5b69903c --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..1cdac9aa --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,15 @@ + +Actions (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..5622b259 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_arith_lia.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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..b02107b0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_arith_lia.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 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_lia/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html new file mode 100644 index 00000000..954f6ea7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..1ac0e9f7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..68298a0f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..dcb649f7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/CC/index.html @@ -0,0 +1,25 @@ + +CC (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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_lia/Make/argument-1-A/S/Solver_internal/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..1550abe5 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..6707bdbc --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/index.html new file mode 100644 index 00000000..904b61cb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/index.html @@ -0,0 +1,43 @@ + +Solver_internal (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

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

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

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

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

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

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

Create a literal. This automatically preprocesses the term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

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

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..3b442f06 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lia.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

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

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Fun/index.html new file mode 100644 index 00000000..fd073028 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_arith_lia.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_lia/Make/argument-1-A/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Term/index.html new file mode 100644 index 00000000..d13968eb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_arith_lia.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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Ty/index.html new file mode 100644 index 00000000..5cde388d --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_arith_lia.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_lia/Make/argument-1-A/S/T/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/index.html new file mode 100644 index 00000000..53794bbf --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_arith_lia.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_lia/Make/argument-1-A/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Unknown/index.html new file mode 100644 index 00000000..adc95a82 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_arith_lia.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_lia/Make/argument-1-A/S/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/index.html new file mode 100644 index 00000000..86d698f8 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/index.html @@ -0,0 +1,37 @@ + +S (sidekick.Sidekick_arith_lia.Make.1-A.S)

Module 1-A.S

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

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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_lia/Make/argument-1-A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..be4e9169 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_arith_lia.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 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_lia/Make/argument-1-A/Z/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Z/index.html new file mode 100644 index 00000000..a5bc0274 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.Make.1-A.Z)

Module 1-A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/index.html new file mode 100644 index 00000000..4667c930 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/argument-1-A/index.html @@ -0,0 +1,3 @@ + +A (sidekick.Sidekick_arith_lia.Make.1-A)

Parameter Make.1-A

module Z : INT
module Q : RATIONAL with type bigint = Z.t
module LRA_solver : + Sidekick_arith_lra.S with type A.Q.t = Q.t and module A.S = S
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lia : term -> ( Z.t, Q.t, term ) lia_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_to_real : S.T.Term.store -> term -> term

Wrap term into a to_real projector to rationals

val mk_lia : S.T.Term.store -> ( Z.t, Q.t, term ) lia_view -> term

Make a term from the given theory view

val ty_int : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_int : term -> bool

Does this term have the type Int

val lemma_lia : S.Lit.t Iter.t -> S.P.proof_rule
val lemma_relax_to_lra : S.Lit.t Iter.t -> S.P.proof_rule
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/Make/index.html b/dev/sidekick/Sidekick_arith_lia/Make/index.html new file mode 100644 index 00000000..f49d76dd --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_arith_lia.Make)

Module Sidekick_arith_lia.Make

Parameters

module A : ARG

Signature

module A = A
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/index.html b/dev/sidekick/Sidekick_arith_lia/index.html new file mode 100644 index 00000000..4974676f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/index.html @@ -0,0 +1,5 @@ + +Sidekick_arith_lia (sidekick.Sidekick_arith_lia)

Module Sidekick_arith_lia

Linear Rational Arithmetic

module type RATIONAL = Sidekick_arith.RATIONAL
module type INT = Sidekick_arith.INT
module S_op = Sidekick_simplex.Op
type pred = Sidekick_simplex.Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op = Sidekick_simplex.Binary_op.t =
| Plus
| Minus
type ('num, 'real, 'a) lia_view =
| LIA_pred of pred * 'a * 'a
| LIA_op of op * 'a * 'a
| LIA_mult of 'num * 'a
| LIA_const of 'num
| LIA_other of 'a
val map_view : + ( 'a -> 'b ) -> + ( 'c, 'd, 'a ) lia_view -> + ( 'c, 'e, 'b ) lia_view
module type ARG = sig ... end
module type S = sig ... end
module Make (A : ARG) : S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Gensym/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Gensym/index.html new file mode 100644 index 00000000..4533fdeb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick.Sidekick_arith_lia.ARG.LRA_solver.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_lia/module-type-ARG/LRA_solver/A/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Q/index.html new file mode 100644 index 00000000..67f4fc5e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.ARG.LRA_solver.A.Q)

Module A.Q

include Sidekick_arith.NUM with type t = Q.t
type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-ARG/LRA_solver/A/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Z/index.html new file mode 100644 index 00000000..20cf01cb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.ARG.LRA_solver.A.Z)

Module A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/index.html new file mode 100644 index 00000000..a0720fe3 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/A/index.html @@ -0,0 +1,5 @@ + +A (sidekick.Sidekick_arith_lia.ARG.LRA_solver.A)

Module LRA_solver.A

module S = S
module Q : Sidekick_arith_lra.RATIONAL with type bigint = Z.t with type t = Q.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) Sidekick_arith_lra.lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Constraint/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..8f473670 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.Constraint)

Module SimpSolver.Constraint

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_lia/module-type-ARG/LRA_solver/SimpSolver/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Q/index.html new file mode 100644 index 00000000..55e8eb18 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-ARG/LRA_solver/SimpSolver/Subst/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Subst/index.html new file mode 100644 index 00000000..c5e3d9a3 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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_lia/module-type-ARG/LRA_solver/SimpSolver/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..adb47df2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.Unsat_cert)

Module SimpSolver.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_lia/module-type-ARG/LRA_solver/SimpSolver/V/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/V/index.html new file mode 100644 index 00000000..d26e96f1 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.V)

Module SimpSolver.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_lia/module-type-ARG/LRA_solver/SimpSolver/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Z/index.html new file mode 100644 index 00000000..ce6236b9 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/index.html new file mode 100644 index 00000000..810fd60f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick.Sidekick_arith_lia.ARG.LRA_solver.SimpSolver)

Module LRA_solver.SimpSolver

Simplexe

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/index.html new file mode 100644 index 00000000..59dae44f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/LRA_solver/index.html @@ -0,0 +1,2 @@ + +LRA_solver (sidekick.Sidekick_arith_lia.ARG.LRA_solver)

Module ARG.LRA_solver

module A : Sidekick_arith_lra.ARG with type Q.t = Q.t with module S = S
type state

Key to access the state from outside, available when the theory has been setup

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/Q/index.html new file mode 100644 index 00000000..4cd14844 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.ARG.Q)

Module ARG.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-ARG/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Lit/index.html new file mode 100644 index 00000000..bbefc4c4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_arith_lia.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Model/index.html new file mode 100644 index 00000000..637e2668 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_arith_lia.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_lia/module-type-ARG/S/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/Step_vec/index.html new file mode 100644 index 00000000..6b508426 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/index.html new file mode 100644 index 00000000..169a1307 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.ARG.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Registry/index.html new file mode 100644 index 00000000..521b758c --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.ARG.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html new file mode 100644 index 00000000..c16c8bfb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..26c1f875 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..2e6bf03e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,15 @@ + +Actions (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_arith_lia/module-type-ARG/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..1e2025bf --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_arith_lia.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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..e58d05af --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_arith_lia.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 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_lia/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html new file mode 100644 index 00000000..4782a0c6 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..7263856e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..8cbfd93f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..76515caf --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/CC/index.html @@ -0,0 +1,25 @@ + +CC (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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_lia/module-type-ARG/S/Solver_internal/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..f927ccf9 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..857a4a60 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/index.html new file mode 100644 index 00000000..2b0eaf3b --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/index.html @@ -0,0 +1,43 @@ + +Solver_internal (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

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

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

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

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

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

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

Create a literal. This automatically preprocesses the term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

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

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..826ea7eb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lia.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

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

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Fun/index.html new file mode 100644 index 00000000..39e813a2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_arith_lia.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_lia/module-type-ARG/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Term/index.html new file mode 100644 index 00000000..0609e004 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_arith_lia.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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Ty/index.html new file mode 100644 index 00000000..174b3ea7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_arith_lia.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_lia/module-type-ARG/S/T/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/index.html new file mode 100644 index 00000000..835f0198 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_arith_lia.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_lia/module-type-ARG/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Unknown/index.html new file mode 100644 index 00000000..38191872 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_arith_lia.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_lia/module-type-ARG/S/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/index.html new file mode 100644 index 00000000..1b165886 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/index.html @@ -0,0 +1,37 @@ + +S (sidekick.Sidekick_arith_lia.ARG.S)

Module ARG.S

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

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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_lia/module-type-ARG/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/module-type-THEORY/index.html new file mode 100644 index 00000000..951fbc29 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_arith_lia.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 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_lia/module-type-ARG/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/Z/index.html new file mode 100644 index 00000000..c570658e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.ARG.Z)

Module ARG.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-ARG/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/index.html new file mode 100644 index 00000000..d87b7ab9 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-ARG/index.html @@ -0,0 +1,3 @@ + +ARG (sidekick.Sidekick_arith_lia.ARG)

Module type Sidekick_arith_lia.ARG

module Z : INT
module Q : RATIONAL with type bigint = Z.t
module LRA_solver : + Sidekick_arith_lra.S with type A.Q.t = Q.t and module A.S = S
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lia : term -> ( Z.t, Q.t, term ) lia_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_to_real : S.T.Term.store -> term -> term

Wrap term into a to_real projector to rationals

val mk_lia : S.T.Term.store -> ( Z.t, Q.t, term ) lia_view -> term

Make a term from the given theory view

val ty_int : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_int : term -> bool

Does this term have the type Int

val lemma_lia : S.Lit.t Iter.t -> S.P.proof_rule
val lemma_relax_to_lra : S.Lit.t Iter.t -> S.P.proof_rule
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Gensym/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Gensym/index.html new file mode 100644 index 00000000..20302cb8 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Gensym/index.html @@ -0,0 +1,2 @@ + +Gensym (sidekick.Sidekick_arith_lia.S.A.LRA_solver.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_lia/module-type-S/A/LRA_solver/A/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Q/index.html new file mode 100644 index 00000000..4567ea0d --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.S.A.LRA_solver.A.Q)

Module A.Q

include Sidekick_arith.NUM with type t = Q.t
type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-S/A/LRA_solver/A/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Z/index.html new file mode 100644 index 00000000..d54b7b5f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.S.A.LRA_solver.A.Z)

Module A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/index.html new file mode 100644 index 00000000..e7c6dc7f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/A/index.html @@ -0,0 +1,5 @@ + +A (sidekick.Sidekick_arith_lia.S.A.LRA_solver.A)

Module LRA_solver.A

module S = S
module Q : Sidekick_arith_lra.RATIONAL with type bigint = Z.t with type t = Q.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) Sidekick_arith_lra.lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Constraint/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..f6514d39 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.Constraint)

Module SimpSolver.Constraint

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_lia/module-type-S/A/LRA_solver/SimpSolver/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Q/index.html new file mode 100644 index 00000000..eabd8975 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-S/A/LRA_solver/SimpSolver/Subst/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Subst/index.html new file mode 100644 index 00000000..d91e0bbf --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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_lia/module-type-S/A/LRA_solver/SimpSolver/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..0c1b0811 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.Unsat_cert)

Module SimpSolver.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_lia/module-type-S/A/LRA_solver/SimpSolver/V/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/V/index.html new file mode 100644 index 00000000..c49b8bd0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.V)

Module SimpSolver.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_lia/module-type-S/A/LRA_solver/SimpSolver/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Z/index.html new file mode 100644 index 00000000..0df2694f --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/index.html new file mode 100644 index 00000000..da506670 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick.Sidekick_arith_lia.S.A.LRA_solver.SimpSolver)

Module LRA_solver.SimpSolver

Simplexe

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/index.html new file mode 100644 index 00000000..7c0c32a4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/LRA_solver/index.html @@ -0,0 +1,2 @@ + +LRA_solver (sidekick.Sidekick_arith_lia.S.A.LRA_solver)

Module A.LRA_solver

module A : Sidekick_arith_lra.ARG with type Q.t = Q.t with module S = S
type state

Key to access the state from outside, available when the theory has been setup

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/Q/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/Q/index.html new file mode 100644 index 00000000..cd35b1a4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lia.S.A.Q)

Module A.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_lia/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Lit/index.html new file mode 100644 index 00000000..be9a24dd --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Lit/index.html @@ -0,0 +1,2 @@ + +Lit (sidekick.Sidekick_arith_lia.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Model/index.html new file mode 100644 index 00000000..34b43f7b --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_arith_lia.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_lia/module-type-S/A/S/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/Step_vec/index.html new file mode 100644 index 00000000..615eb808 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/index.html new file mode 100644 index 00000000..6c0e8438 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.S.A.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Registry/index.html new file mode 100644 index 00000000..75144380 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.S.A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html new file mode 100644 index 00000000..0fbfaf63 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html new file mode 100644 index 00000000..b1916fc7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/index.html new file mode 100644 index 00000000..aa152101 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Actions/index.html @@ -0,0 +1,15 @@ + +Actions (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_arith_lia/module-type-S/A/S/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Expl/index.html new file mode 100644 index 00000000..63005105 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Expl/index.html @@ -0,0 +1,2 @@ + +Expl (sidekick.Sidekick_arith_lia.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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/N/index.html new file mode 100644 index 00000000..cdf3860e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/N/index.html @@ -0,0 +1,2 @@ + +N (sidekick.Sidekick_arith_lia.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 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_lia/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html new file mode 100644 index 00000000..ec479c03 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -0,0 +1,2 @@ + +Step_vec (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/index.html new file mode 100644 index 00000000..dbda9244 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -0,0 +1,10 @@ + +P (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..756cb973 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/index.html new file mode 100644 index 00000000..3c7b2aa7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/CC/index.html @@ -0,0 +1,25 @@ + +CC (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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_lia/module-type-S/A/S/Solver_internal/Registry/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..545672c8 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Simplify/index.html new file mode 100644 index 00000000..af4fbf1e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/Simplify/index.html @@ -0,0 +1,2 @@ + +Simplify (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/index.html new file mode 100644 index 00000000..f0dae0dc --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/index.html @@ -0,0 +1,43 @@ + +Solver_internal (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

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

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

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

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

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

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

Create a literal. This automatically preprocesses the term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

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

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html new file mode 100644 index 00000000..75c1098c --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -0,0 +1,2 @@ + +PREPROCESS_ACTS (sidekick.Sidekick_arith_lia.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

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

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Fun/index.html new file mode 100644 index 00000000..5b0e668a --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (sidekick.Sidekick_arith_lia.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_lia/module-type-S/A/S/T/Term/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Term/index.html new file mode 100644 index 00000000..becdb62b --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Term/index.html @@ -0,0 +1,8 @@ + +Term (sidekick.Sidekick_arith_lia.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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

n1: 2
+n2: f n1 n1
+n3: g n2 n1
+n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Ty/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Ty/index.html new file mode 100644 index 00000000..44d37ef0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/Ty/index.html @@ -0,0 +1,2 @@ + +Ty (sidekick.Sidekick_arith_lia.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_lia/module-type-S/A/S/T/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/index.html new file mode 100644 index 00000000..24c51303 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/T/index.html @@ -0,0 +1,2 @@ + +T (sidekick.Sidekick_arith_lia.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_lia/module-type-S/A/S/Unknown/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Unknown/index.html new file mode 100644 index 00000000..7b546ec1 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/Unknown/index.html @@ -0,0 +1,2 @@ + +Unknown (sidekick.Sidekick_arith_lia.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_lia/module-type-S/A/S/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/index.html new file mode 100644 index 00000000..61214000 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/index.html @@ -0,0 +1,37 @@ + +S (sidekick.Sidekick_arith_lia.S.A.S)

Module A.S

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

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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_lia/module-type-S/A/S/module-type-THEORY/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/module-type-THEORY/index.html new file mode 100644 index 00000000..fb4017fc --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/S/module-type-THEORY/index.html @@ -0,0 +1,2 @@ + +THEORY (sidekick.Sidekick_arith_lia.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 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_lia/module-type-S/A/Z/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/Z/index.html new file mode 100644 index 00000000..ff1a4430 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lia.S.A.Z)

Module A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/A/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/index.html new file mode 100644 index 00000000..29faecf7 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/A/index.html @@ -0,0 +1,3 @@ + +A (sidekick.Sidekick_arith_lia.S.A)

Module S.A

module Z : INT
module Q : RATIONAL with type bigint = Z.t
module LRA_solver : + Sidekick_arith_lra.S with type A.Q.t = Q.t and module A.S = S
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lia : term -> ( Z.t, Q.t, term ) lia_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_to_real : S.T.Term.store -> term -> term

Wrap term into a to_real projector to rationals

val mk_lia : S.T.Term.store -> ( Z.t, Q.t, term ) lia_view -> term

Make a term from the given theory view

val ty_int : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_int : term -> bool

Does this term have the type Int

val lemma_lia : S.Lit.t Iter.t -> S.P.proof_rule
val lemma_relax_to_lra : S.Lit.t Iter.t -> S.P.proof_rule
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lia/module-type-S/index.html b/dev/sidekick/Sidekick_arith_lia/module-type-S/index.html new file mode 100644 index 00000000..001875d5 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lia/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_arith_lia.S)

Module type Sidekick_arith_lia.S

module A : ARG
val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__ID/.dune-keep b/dev/sidekick/Sidekick_arith_lra/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__ID/.dune-keep rename to dev/sidekick/Sidekick_arith_lra/.dummy diff --git a/dev/sidekick/Sidekick_arith_lra/.dune-keep b/dev/sidekick/Sidekick_arith_lra/.dune-keep deleted file mode 100644 index e69de29b..00000000 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 deleted file mode 100644 index da32f5dd..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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

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.

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 deleted file mode 100644 index c128c606..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Constr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Constr (sidekick.Sidekick_arith_lra.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Predicate.t

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 -> Predicate.t -> t
val make : Comb.t -> Predicate.t -> 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 -> Predicate.t
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Predicate.t * 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/index.html b/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html deleted file mode 100644 index 1a13b566..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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

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.

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 deleted file mode 100644 index 54b9d6e9..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-1-C/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 3b5c9f31..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/argument-2-Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 3ff154ad..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_arith_lra.Linear_expr.Make)

Module Linear_expr.Make

Parameters

module C : COEFF
module Var : VAR

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 deleted file mode 100644 index fbe23639..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Linear_expr (sidekick.Sidekick_arith_lra.Linear_expr)

Module Sidekick_arith_lra.Linear_expr

Arithmetic expressions

module type COEFF = sig ... end
module type VAR = sig ... end
module type S = sig ... end
type nonrec bool_op = Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make (C : COEFF) (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 deleted file mode 100644 index f49ca3d9..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-COEFF/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index d54f6d4b..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/C/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 5baf1f6c..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/Infix/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 12ee2f75..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Comb/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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

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.

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 deleted file mode 100644 index 57e765cc..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Constr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Constr (sidekick.Sidekick_arith_lra.Linear_expr.S.Constr)

Module S.Constr

Linear constraints.

Represents constraints on linear expressions.

type op = Predicate.t

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 -> Predicate.t -> t
val make : Comb.t -> Predicate.t -> 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 -> Predicate.t
val expr : t -> Expr.t

Extract the given part from a constraint.

val split : t -> Comb.t * Predicate.t * 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 deleted file mode 100644 index 70c0ea2f..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/Infix/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 53e34804..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Expr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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

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.

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 deleted file mode 100644 index 8a296bfc..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 19140864..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_arith_lra.Linear_expr.S)

Module type Linear_expr.S

module C : sig ... end

Coeficients used. Can be integers as well as rationals.

module Var : sig ... end

Variables used in expressions.

type var = Var.t

The type of variables appearing in expressions.

module Var_map : CCMap.S with type 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/Make/SimpSolver/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..2fb59ff3 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_arith_lra.Make.SimpSolver.Constraint)

Module SimpSolver.Constraint

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/Make/SimpSolver/Q/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Q/index.html new file mode 100644 index 00000000..93401e3c --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lra.Make.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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/SimpSolver/Subst/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Subst/index.html new file mode 100644 index 00000000..001c2811 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_arith_lra.Make.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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/Make/SimpSolver/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..b974e3b2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_arith_lra.Make.SimpSolver.Unsat_cert)

Module SimpSolver.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/Make/SimpSolver/V/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/V/index.html new file mode 100644 index 00000000..3621c23e --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_arith_lra.Make.SimpSolver.V)

Module SimpSolver.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/Make/SimpSolver/Z/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Z/index.html new file mode 100644 index 00000000..492bafe0 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lra.Make.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/index.html b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/index.html new file mode 100644 index 00000000..35bde8e2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick.Sidekick_arith_lra.Make.SimpSolver)

Module Make.SimpSolver

Simplexe

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ 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 28992caf..f8e90d2a 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 dcf3f304..8f9cf484 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Lit/index.html index 9417317a..b8a1583a 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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Model/index.html index aa2be0bb..3b6d246a 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/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Step_vec/index.html index 1f7ce35c..217c4769 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 2a1e8b44..3a07e1cf 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,10 @@ -P (sidekick.Sidekick_arith_lra.Make.1-A.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.Make.1-A.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Registry/index.html new file mode 100644 index 00000000..733242c8 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.Make.1-A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 019b8412..e549c9fe 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html index cb52faf6..93ff9545 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 c56ff8b7..248cbf53 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,15 @@ -Actions (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_arith_lra.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 d10b5321..166e50da 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 d2081437..16ebf9f1 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html index 757a5d66..79f186e7 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html index 691bb5aa..f2beab15 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..202885cd --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/CC/index.html index 82240863..42faf41a 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,4 +1,25 @@ -CC (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..0f4d0c12 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 157ea91f..02ab7966 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

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

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 87674ba4..f5b4d4c2 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

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

Main type for a solver

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

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

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

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

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

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

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

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

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

Model production

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

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

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

val on_model_gen : t -> model_hook -> unit

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

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

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

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

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

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

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

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

Create a literal. This automatically preprocesses the term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

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

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

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

val cc_mem_term : t -> term -> bool

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

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

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

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

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

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

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

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

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

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

Callback called on every CC conflict

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

Callback called on every CC propagation

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

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

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

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

Register callback to be called during the final check.

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

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

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

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index cf3c9aee..614fca2a 100644 --- a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

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

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

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

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

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/S/T/Fun/index.html index dd75d288..bda36a7b 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 8fe33360..8c07a830 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

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

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

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

For example, in:

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

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 6f19e7e9..f96a08dd 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 f3baa0dd..e5515aca 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 b96ac61a..93fa5c1e 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 bd8918af..cc813db8 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,5 +1,37 @@ -S (sidekick.Sidekick_arith_lra.Make.1-A.S)

Module 1-A.S

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

Internal solver, available to theories.

type t

The solver's state.

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

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

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

Module 1-A.S

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

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

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

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

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

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

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

Create a new solver.

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

  • parameter store_proof

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

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 7d8c3d37..ab81500f 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 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 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/Z/index.html b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Z/index.html new file mode 100644 index 00000000..53429953 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/Make/argument-1-A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lra.Make.1-A.Z)

Module 1-A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ 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 642626f5..b455e1ed 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 @@ -A (sidekick.Sidekick_arith_lra.Make.1-A)

Parameter Make.1-A

module Q : RATIONAL
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> (Q.tterm) lra_view

Project the term into the theory view

val mk_bool : S.T.Term.store -> bool -> term
val mk_lra : S.T.Term.store -> (Q.tterm) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file +A (sidekick.Sidekick_arith_lra.Make.1-A)

Parameter Make.1-A

module Z : INT
module Q : RATIONAL with type bigint = Z.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) 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.t, term ) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
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 022d5ec0..c18b4b6f 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

module A : ARG

Signature

module A = A
type state
val theory : A.S.theory
\ No newline at end of file +Make (sidekick.Sidekick_arith_lra.Make)

Module Sidekick_arith_lra.Make

Parameters

module A : ARG

Signature

module A = A
type state

Key to access the state from outside, available when the theory has been setup

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 deleted file mode 100644 index bfdec209..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Predicate/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 849e5666..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Constraint/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index f0fa4551..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Subst/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index c32d0ea2..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/Unsat_cert/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index a461fc77..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-1-Q/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 deleted file mode 100644 index 156f10af..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/argument-2-Var/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 243af23d..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Make/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Make (sidekick.Sidekick_arith_lra.Simplex2.Make)

Module Simplex2.Make

Parameters

module Q : RATIONAL
module Var : VAR

Signature

module V = Var
module V_map : CCMap.S with type 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 deleted file mode 100644 index 163d56cb..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/Op/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 84d2a479..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 type RATIONAL = Sidekick_arith.RATIONAL
module type VAR = sig ... end
module Op : sig ... end
module type S = sig ... end
module Make (Q : RATIONAL) (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-S/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html deleted file mode 100644 index bc1242b8..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Constraint/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index 2ab16776..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Q/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 deleted file mode 100644 index 7e61d3a9..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Subst/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index dc9bb91b..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/Unsat_cert/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index b53427da..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/V/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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 deleted file mode 100644 index e343c3db..00000000 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -S (sidekick.Sidekick_arith_lra.Simplex2.S)

Module type Simplex2.S

module V : VAR
module V_map : CCMap.S with type 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/index.html b/dev/sidekick/Sidekick_arith_lra/index.html index cfd9dbb1..003350ce 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 type RATIONAL = Sidekick_arith.RATIONAL
module S_op = Simplex2.Op
type pred = Predicate.t =
| 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 (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 Predicate = Sidekick_simplex.Predicate
module Linear_expr = Sidekick_simplex.Linear_expr
module Linear_expr_intf = Sidekick_simplex.Linear_expr_intf
module type INT = Sidekick_arith.INT
module type RATIONAL = Sidekick_arith.RATIONAL
module S_op = Sidekick_simplex.Op
type pred = Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op = Linear_expr_intf.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_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 (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 b285de26..69ce7cfa 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 d4b83c5e..82b1ff5b 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Lit/index.html index 27687783..814ff149 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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

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

val abs : t -> t

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

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

Return the atom and the sign

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

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

  • parameter sign

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

val norm_sign : t -> t * bool

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

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Model/index.html index dafa506c..97df61fb 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/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Step_vec/index.html index 033a13c9..1584854f 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 7cfac8a9..f769a191 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,10 @@ -P (sidekick.Sidekick_arith_lra.ARG.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.ARG.S.P)

Module S.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Registry/index.html new file mode 100644 index 00000000..3a32c194 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.ARG.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 8ab0465e..64c80a84 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html index d344cd2a..43a24dfe 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 88814618..19229b27 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,15 @@ -Actions (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_arith_lra.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 23b67e7d..6cb5d61c 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 6424045d..d1ec5357 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html index f274fe6d..b990a4fc 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html index c5dd5e06..7bf54172 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

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

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

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

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

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

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

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

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..e4ad3d45 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/CC/index.html index 1c1b425d..8c252d6f 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,4 +1,25 @@ -CC (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

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

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

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..7bfd7af2 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 17fa5863..43e7fcfb 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

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

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

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

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 cd9d15c0..19af406d 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

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

Main type for a solver

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

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

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

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

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

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

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

val simp_t : t -> term -> term * proof_step option

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

Preprocessors

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

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

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

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

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

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

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

Give a conflict clause to the solver

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

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

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

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

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

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

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

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

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

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

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

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

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

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

  • parameter default_pol

    default polarity for the corresponding atom

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

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

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

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

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

Find representative of the node

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

Are these two terms equal in the congruence closure?

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

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

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

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index c7aa8f84..8ed3ae0f 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/S/T/Fun/index.html index 18e9d5b5..63442aba 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 65094329..90988811 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 77e46923..82b6258a 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 f5787bf9..53e3a3b4 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 30bcdd2c..83f7344e 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 3819d9a3..811836b3 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,5 +1,37 @@ -S (sidekick.Sidekick_arith_lra.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 58c91cd5..9d1da5ee 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 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 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/Z/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Z/index.html new file mode 100644 index 00000000..3b0cc051 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-ARG/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lra.ARG.Z)

Module ARG.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ 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 b300d7a3..978c5d81 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 lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file +ARG (sidekick.Sidekick_arith_lra.ARG)

Module type Sidekick_arith_lra.ARG

module Z : INT
module Q : RATIONAL with type bigint = Z.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) 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.t, term ) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ 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 9a9bb5c1..55922e23 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 c31c6495..9d43aaf6 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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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/Lit/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Lit/index.html index 4881c442..b6bbd1c3 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_arith_lra.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Model/index.html index 86c349b9..61df4015 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/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Step_vec/index.html index 91404c5a..b1d49c63 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 adbe9fae..88f22799 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,10 @@ -P (sidekick.Sidekick_arith_lra.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Registry/index.html new file mode 100644 index 00000000..591c3bfe --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.S.A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 21c09eff..89cca458 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html index e95f3c72..e9c80dff 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 8b48815c..7c0811ef 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,15 @@ -Actions (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_arith_lra.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 e1f60f36..a426bd69 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 c5d30b5c..c5f88d41 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html index 7d0d791d..51b4365d 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html index 13b34708..20ac8fd8 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..938d6d38 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/CC/index.html index a8197fcb..5af1cdf4 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,4 +1,25 @@ -CC (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..3f1e83c1 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 3939a4e7..554df20a 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 30d54c07..57595c4d 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index df8eea8e..29e00594 100644 --- a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_arith_lra.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/S/T/Fun/index.html index 7523cacd..ca919642 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 561bfa9f..ec6e1648 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 6e2ba824..b8e6a2ae 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 7dbd2c1a..b7e3d551 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 00c5581a..acc47ee5 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 462be9e5..80660851 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,5 +1,37 @@ -S (sidekick.Sidekick_arith_lra.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_arith_lra.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 ce046857..e96b40c1 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 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 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/Z/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Z/index.html new file mode 100644 index 00000000..36463048 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lra.S.A.Z)

Module A.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ 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 807ca8cb..0162a763 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 lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file +A (sidekick.Sidekick_arith_lra.S.A)

Module S.A

module Z : INT
module Q : RATIONAL with type bigint = Z.t
type term = S.T.Term.t
type ty = S.T.Ty.t
val view_as_lra : term -> ( Q.t, term ) 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.t, term ) lra_view -> term

Make a term from the given theory view

val ty_lra : S.T.Term.store -> ty
val mk_eq : S.T.Term.store -> term -> term -> term

syntactic equality

val has_ty_real : term -> bool

Does this term have the type Real

val lemma_lra : S.Lit.t Iter.t -> S.P.proof_rule
module Gensym : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Constraint/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Constraint/index.html new file mode 100644 index 00000000..53642583 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_arith_lra.S.SimpSolver.Constraint)

Module SimpSolver.Constraint

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/module-type-S/SimpSolver/Q/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Q/index.html new file mode 100644 index 00000000..f5dccdbb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_arith_lra.S.SimpSolver.Q)

Module SimpSolver.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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/SimpSolver/Subst/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Subst/index.html new file mode 100644 index 00000000..bfa715eb --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_arith_lra.S.SimpSolver.Subst)

Module SimpSolver.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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/module-type-S/SimpSolver/Unsat_cert/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Unsat_cert/index.html new file mode 100644 index 00000000..bcac2bc4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_arith_lra.S.SimpSolver.Unsat_cert)

Module SimpSolver.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/module-type-S/SimpSolver/V/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/V/index.html new file mode 100644 index 00000000..89c6a4f4 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_arith_lra.S.SimpSolver.V)

Module SimpSolver.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/module-type-S/SimpSolver/Z/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Z/index.html new file mode 100644 index 00000000..5fee9084 --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_arith_lra.S.SimpSolver.Z)

Module SimpSolver.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/index.html b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/index.html new file mode 100644 index 00000000..6f2a1acc --- /dev/null +++ b/dev/sidekick/Sidekick_arith_lra/module-type-S/SimpSolver/index.html @@ -0,0 +1,16 @@ + +SimpSolver (sidekick.Sidekick_arith_lra.S.SimpSolver)

Module S.SimpSolver

Simplexe

module V_map : CCMap.S with type key = V.t
module Q : Sidekick_simplex.RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ 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 e08c8405..a1a36555 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 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

Key to access the state from outside, available when the theory has been setup

val theory : A.S.theory
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__/.dune-keep b/dev/sidekick/Sidekick_arith_lra__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__/index.html b/dev/sidekick/Sidekick_arith_lra__/index.html deleted file mode 100644 index a92cf81f..00000000 --- a/dev/sidekick/Sidekick_arith_lra__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__ (sidekick.Sidekick_arith_lra__)

Module Sidekick_arith_lra__

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/.dune-keep b/dev/sidekick/Sidekick_arith_lra__Linear_expr/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html deleted file mode 100644 index 449373af..00000000 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__Linear_expr (sidekick.Sidekick_arith_lra__Linear_expr)

Module Sidekick_arith_lra__Linear_expr

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/.dune-keep b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html b/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html deleted file mode 100644 index 39d7a4e3..00000000 --- a/dev/sidekick/Sidekick_arith_lra__Linear_expr_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__Linear_expr_intf (sidekick.Sidekick_arith_lra__Linear_expr_intf)

Module Sidekick_arith_lra__Linear_expr_intf

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Predicate/.dune-keep b/dev/sidekick/Sidekick_arith_lra__Predicate/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__Predicate/index.html b/dev/sidekick/Sidekick_arith_lra__Predicate/index.html deleted file mode 100644 index 06c78b61..00000000 --- a/dev/sidekick/Sidekick_arith_lra__Predicate/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__Predicate (sidekick.Sidekick_arith_lra__Predicate)

Module Sidekick_arith_lra__Predicate

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/.dune-keep b/dev/sidekick/Sidekick_arith_lra__Simplex2/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html deleted file mode 100644 index e9c897cb..00000000 --- a/dev/sidekick/Sidekick_arith_lra__Simplex2/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__Simplex2 (sidekick.Sidekick_arith_lra__Simplex2)

Module Sidekick_arith_lra__Simplex2

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/.dune-keep b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html b/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html deleted file mode 100644 index c67faacc..00000000 --- a/dev/sidekick/Sidekick_arith_lra__Simplex_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_arith_lra__Simplex_intf (sidekick.Sidekick_arith_lra__Simplex_intf)

Module Sidekick_arith_lra__Simplex_intf

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Lit/.dune-keep b/dev/sidekick/Sidekick_cc/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Lit/.dune-keep rename to dev/sidekick/Sidekick_cc/.dummy diff --git a/dev/sidekick/Sidekick_cc/.dune-keep b/dev/sidekick/Sidekick_cc/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_cc/Make/Expl/index.html b/dev/sidekick/Sidekick_cc/Make/Expl/index.html index 98609a81..f02e9cb0 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 197f8fa6..330d765d 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_cc/Make/P/Step_vec/index.html index a62f0b4d..6fb3047c 100644 --- a/dev/sidekick/Sidekick_cc/Make/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_cc/Make/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_cc.Make.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_cc.Make.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/P/index.html b/dev/sidekick/Sidekick_cc/Make/P/index.html index f15dde1e..3d11e850 100644 --- a/dev/sidekick/Sidekick_cc/Make/P/index.html +++ b/dev/sidekick/Sidekick_cc/Make/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_cc.Make.P)

Module Make.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_cc.Make.P)

Module Make.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/Resolved_expl/index.html b/dev/sidekick/Sidekick_cc/Make/Resolved_expl/index.html new file mode 100644 index 00000000..18869ba7 --- /dev/null +++ b/dev/sidekick/Sidekick_cc/Make/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_cc.Make.Resolved_expl)

Module Make.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/Step_vec/index.html index 895da6c1..18106c33 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_cc.Make.1-A.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_cc.Make.1-A.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html index 67fb0fb1..371eb3fd 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_cc.Make.1-A.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_cc.Make.1-A.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 717c663c..78aebc4d 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,15 @@ -Actions (sidekick.Sidekick_cc.Make.1-A.Actions)

Module 1-A.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_cc.Make.1-A.Actions)

Module 1-A.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_cc/Make/argument-1-A/Lit/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/Lit/index.html index 84b7ffbf..e5cc5fc3 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_cc.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Step_vec/index.html b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Step_vec/index.html index 91d40ea8..245d92dc 100644 --- a/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_cc/Make/argument-1-A/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_cc.Make.1-A.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_cc.Make.1-A.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 1f7250de..968ce1ab 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,10 @@ -P (sidekick.Sidekick_cc.Make.1-A.P)

Module 1-A.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_cc.Make.1-A.P)

Module 1-A.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 a2405752..1f3e0d3c 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 21086f43..c7aba01e 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 090fb8ae..d08d868a 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 f3889116..1b94b5f0 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 533c48f9..482c3021 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,14 @@ -A (sidekick.Sidekick_cc.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step

View the term through the lens of the congruence closure

val mk_lit_eq : ?sign:bool -> T.Term.store -> T.Term.t -> T.Term.t -> Lit.t

mk_lit_eq store t u makes the literal t=u

\ No newline at end of file +A (sidekick.Sidekick_cc.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step
val cc_view : + T.Term.t -> + ( T.Fun.t, T.Term.t, T.Term.t Iter.t ) Sidekick_core.CC_view.t

View the term through the lens of the congruence closure

val mk_lit_eq : ?sign:bool -> T.Term.store -> T.Term.t -> T.Term.t -> Lit.t

mk_lit_eq store t u makes the literal t=u

\ 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 b9682e4d..d856fba7 100644 --- a/dev/sidekick/Sidekick_cc/Make/index.html +++ b/dev/sidekick/Sidekick_cc/Make/index.html @@ -1,4 +1,17 @@ -Make (sidekick.Sidekick_cc.Make)

Module Sidekick_cc.Make

first, some aliases.

Parameters

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
type proof_step = A.proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step
module Actions = A.Actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

Parameters

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
type proof_step = A.proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step
module Actions = A.Actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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 81c32225..2a05130a 100644 --- a/dev/sidekick/Sidekick_cc/index.html +++ b/dev/sidekick/Sidekick_cc/index.html @@ -1,3 +1,9 @@ -Sidekick_cc (sidekick.Sidekick_cc)

Module Sidekick_cc

Congruence Closure

module type S = Sidekick_core.CC_S
module Make (A : Sidekick_core.CC_ARG) : S with module T = A.T and module Lit = A.Lit and type proof = A.proof and type proof_step = A.proof_step and module -Actions = A.Actions

first, some aliases.

\ 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 + (A : Sidekick_core.CC_ARG) : + S + with module T = A.T + and module Lit = A.Lit + and type proof = A.proof + and type proof_step = A.proof_step + and module Actions = A.Actions

first, some aliases.

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Model/.dune-keep b/dev/sidekick/Sidekick_core/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Model/.dune-keep rename to dev/sidekick/Sidekick_core/.dummy diff --git a/dev/sidekick/Sidekick_core/.dune-keep b/dev/sidekick/Sidekick_core/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_core/CC_view/index.html b/dev/sidekick/Sidekick_core/CC_view/index.html index b0ac2b20..d6268a16 100644 --- a/dev/sidekick/Sidekick_core/CC_view/index.html +++ b/dev/sidekick/Sidekick_core/CC_view/index.html @@ -1,4 +1,12 @@ -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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/Step_vec/index.html index 3379c80f..c2e3620e 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html index 8bca07e3..ba27737d 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 1c26fb50..887771b2 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,15 @@ -Actions (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 3bbc7c95..59290ab0 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 b3a58537..07ca3344 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/Step_vec/index.html index 075d5628..126a283d 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html index 109e1315..91bcc6e6 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Resolved_expl/index.html new file mode 100644 index 00000000..1a845ed0 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/CC/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/CC/index.html index 2d56caeb..40ceddea 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,4 +1,25 @@ -CC (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.CC)

Module SI.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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 d5d8631b..dc245d63 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

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Lit)

Module SI.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Step_vec/index.html index b5ea404a..6a007c1c 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 0e2df459..5e2323c8 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,10 @@ -P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Registry/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Registry/index.html new file mode 100644 index 00000000..1df34a83 --- /dev/null +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Registry)

Module SI.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 6e0b4f1f..72dc4938 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 5c0475fa..7d664a78 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 5a43e326..b0c36607 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 c4e42d5e..68033af6 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 c528a41e..35a6e922 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 9fe15647..cb6bd654 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,3 +1,48 @@ -SI (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI)

Module 1-M.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type term = term and type t = proof and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SI (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI)

Module 1-M.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type term = term + and type t = proof + and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html index ea28f048..9ddefe28 100644 --- a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/SI/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_core.Monoid_of_repr.1-M.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html b/dev/sidekick/Sidekick_core/Monoid_of_repr/argument-1-M/index.html index 3d27e748..ddbbd0b9 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,13 @@ -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 +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 -> + ( t, SI.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 47743c5d..f4293c6b 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

module M : MONOID_ARG

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

module M : MONOID_ARG

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 n_levels : t -> int
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 ba65f856..cd2033ee 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:

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 SAT_PROOF = sig ... end

Signature for SAT-solver proof emission.

module type PROOF = sig ... end

Proofs of unsatisfiability.

module type LIT = sig ... end

Literals

module type CC_ACTIONS = sig ... end

Actions provided to the congruence closure.

module type CC_ARG = sig ... end

Arguments to a congruence closure's implementation

module type CC_S = sig ... end

Main congruence closure signature.

module type SOLVER_INTERNAL = sig ... end

A view of the solver from a theory's point of view.

module type SOLVER = sig ... end

User facing view of the solver.

module type MONOID_ARG = sig ... end

Helper for the congruence closure

module Monoid_of_repr (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:

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 SAT_PROOF = sig ... end

Signature for SAT-solver proof emission.

module type PROOF = sig ... end

Proofs of unsatisfiability.

module type LIT = sig ... end

Literals

module type CC_ACTIONS = sig ... end

Actions provided to the congruence closure.

module type CC_ARG = sig ... end

Arguments to a congruence closure's implementation

module type CC_S = sig ... end

Main congruence closure signature.

module type REGISTRY = sig ... end

Registry to extract values

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 (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 456276ca..42d36969 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_ACTIONS.Lit)

Module CC_ACTIONS.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Step_vec/index.html index 715adcae..2138e1f4 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ACTIONS/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.CC_ACTIONS.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.CC_ACTIONS.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 05b4b01e..aaf31ab8 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,10 @@ -P (sidekick.Sidekick_core.CC_ACTIONS.P)

Module CC_ACTIONS.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.CC_ACTIONS.P)

Module CC_ACTIONS.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 a935c5b8..3144a4f7 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 dae3f1b1..d3e4ee02 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 99901ce9..e73339c9 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 a2a92bd4..b0f1c5f8 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 38f40aa4..e07361c9 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,15 @@ -CC_ACTIONS (sidekick.Sidekick_core.CC_ACTIONS)

Module type Sidekick_core.CC_ACTIONS

Actions provided to the congruence closure.

The congruence closure must be able to propagate literals when it detects that they are true or false; it must also be able to create conflicts when the set of (dis)equalities is inconsistent

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +CC_ACTIONS (sidekick.Sidekick_core.CC_ACTIONS)

Module type Sidekick_core.CC_ACTIONS

Actions provided to the congruence closure.

The congruence closure must be able to propagate literals when it detects that they are true or false; it must also be able to create conflicts when the set of (dis)equalities is inconsistent

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/Step_vec/index.html index 7735d6c9..5fbda6ae 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.CC_ARG.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.CC_ARG.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html index 30b4d0a5..ae1ae903 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.CC_ARG.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.CC_ARG.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 9b645a93..395f8733 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,15 @@ -Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.CC_ARG.Actions)

Module CC_ARG.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 8279a1a3..35ed2db0 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_ARG.Lit)

Module CC_ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Step_vec/index.html index b7fa8482..1e30c715 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_ARG/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.CC_ARG.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.CC_ARG.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 241fd90e..4319028d 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,10 @@ -P (sidekick.Sidekick_core.CC_ARG.P)

Module CC_ARG.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.CC_ARG.P)

Module CC_ARG.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 7d11914f..5e8f4e79 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 f82e4705..868cd445 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 a2c9e8d1..1391f1dc 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 3a383798..8703203b 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 dc35b2c3..0c309780 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,12 @@ -CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

Arguments to a congruence closure's implementation

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step
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

val mk_lit_eq : ?sign:bool -> T.Term.store -> T.Term.t -> T.Term.t -> Lit.t

mk_lit_eq store t u makes the literal t=u

\ No newline at end of file +CC_ARG (sidekick.Sidekick_core.CC_ARG)

Module type Sidekick_core.CC_ARG

Arguments to a congruence closure's implementation

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step
val cc_view : T.Term.t -> ( T.Fun.t, T.Term.t, T.Term.t Iter.t ) CC_view.t

View the term through the lens of the congruence closure

val mk_lit_eq : ?sign:bool -> T.Term.store -> T.Term.t -> T.Term.t -> Lit.t

mk_lit_eq store t u makes the literal t=u

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/Step_vec/index.html index 2293b6e8..fb0b8690 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.CC_S.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.CC_S.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html index 862421ad..fbd3286a 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.CC_S.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.CC_S.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 f1ce5c35..dda75ba1 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,15 @@ -Actions (sidekick.Sidekick_core.CC_S.Actions)

Module CC_S.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.CC_S.Actions)

Module CC_S.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step
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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 2279adfd..ecfbfd06 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 d462b962..0fa0ffc8 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.CC_S.Lit)

Module CC_S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/N/index.html index 79bee81e..2df7ed6f 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/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/P/Step_vec/index.html index 79bae91d..b0169d5d 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.CC_S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.CC_S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 31266846..67ad95b6 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,10 @@ -P (sidekick.Sidekick_core.CC_S.P)

Module CC_S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.CC_S.P)

Module CC_S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-CC_S/Resolved_expl/index.html b/dev/sidekick/Sidekick_core/module-type-CC_S/Resolved_expl/index.html new file mode 100644 index 00000000..09717d2f --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_core.CC_S.Resolved_expl)

Module CC_S.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Fmt.printer
\ 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 1f060ba0..ae201f07 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 5a7ebee9..8e5dc122 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 62e118c8..d9837e3d 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 52f44940..d1091e97 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 85cb558b..4680862d 100644 --- a/dev/sidekick/Sidekick_core/module-type-CC_S/index.html +++ b/dev/sidekick/Sidekick_core/module-type-CC_S/index.html @@ -1,4 +1,22 @@ -CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

Main congruence closure signature.

The congruence closure handles the theory QF_UF (uninterpreted function symbols). It is also responsible for theory combination, and provides a general framework for equality reasoning that other theories piggyback on.

For example, the theory of datatypes relies on the congruence closure to do most of the work, and "only" adds injectivity/disjointness/acyclicity lemmas when needed.

Similarly, a theory of arrays would hook into the congruence closure and assert (dis)equalities as needed.

first, some aliases.

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> t

Create a new congruence closure.

  • parameter term_store

    used to be able to create new terms. All terms interacting with this congruence closure must belong in this term state as well.

val allocate_bitfield : descr:string -> t -> N.bitfield

Allocate a new node field (see N.bitfield).

This field descriptor is henceforth reserved for all nodes in this congruence closure, and can be set using set_bitfield for each node individually. This can be used to efficiently store some metadata on nodes (e.g. "is there a numeric value in the class" or "is there a constructor term in the class").

There may be restrictions on how many distinct fields are allocated for a given congruence closure (e.g. at most Sys.int_size fields).

val get_bitfield : t -> N.bitfield -> N.t -> bool

Access the bit field of the given node

val set_bitfield : t -> N.bitfield -> bool -> N.t -> unit

Set the bitfield for the node. This will be backtracked. See N.bitfield.

val on_pre_merge : t -> ev_on_pre_merge -> unit

Add a function to be called when two classes are merged

val on_post_merge : t -> ev_on_post_merge -> unit

Add a function to be called when two classes are merged

val on_new_term : t -> ev_on_new_term -> unit

Add a function to be called when a new node is created

val on_conflict : t -> ev_on_conflict -> unit

Called when the congruence closure finds a conflict

val on_propagate : t -> ev_on_propagate -> unit

Called when the congruence closure propagates a literal

val on_is_subterm : t -> ev_on_is_subterm -> unit

Called on terms that are subterms of function symbols

val set_as_lit : t -> N.t -> lit -> unit

map the given node to a literal.

val find_t : t -> term -> repr

Current representative of the term.

  • raises Not_found

    if the term is not already add-ed.

val add_seq : t -> term Iter.t -> unit

Add a sequence of terms to the congruence closure

val all_classes : t -> repr Iter.t

All current classes. This is costly, only use if there is no other solution

val assert_lit : t -> lit -> unit

Given a literal, assume it in the congruence closure and propagate its consequences. Will be backtracked.

Useful for the theory combination or the SAT solver's functor

val assert_lits : t -> lit Iter.t -> unit

Addition of many literals

val explain_eq : t -> N.t -> N.t -> lit list

Explain why the two nodes are equal. Fails if they are not, in an unspecified way

val raise_conflict_from_expl : t -> actions -> Expl.t -> 'a

Raise a conflict with the given explanation it must be a theory tautology that expl ==> absurd. To be used in theories.

val n_true : t -> N.t

Node for true

val n_false : t -> N.t

Node for false

val n_bool : t -> bool -> N.t

Node for either true or false

val merge : t -> N.t -> N.t -> Expl.t -> unit

Merge these two nodes given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val merge_t : t -> term -> term -> Expl.t -> unit

Shortcut for adding + merging

val check : t -> actions -> unit

Perform all pending operations done via assert_eq, assert_lit, etc. Will use the actions to propagate literals, declare conflicts, etc.

val new_merges : t -> bool

Called after check, returns true if some pairs of classes were merged.

val push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file +CC_S (sidekick.Sidekick_core.CC_S)

Module type Sidekick_core.CC_S

Main congruence closure signature.

The congruence closure handles the theory QF_UF (uninterpreted function symbols). It is also responsible for theory combination, and provides a general framework for equality reasoning that other theories piggyback on.

For example, the theory of datatypes relies on the congruence closure to do most of the work, and "only" adds injectivity/disjointness/acyclicity lemmas when needed.

Similarly, a theory of arrays would hook into the congruence closure and assert (dis)equalities as needed.

first, some aliases.

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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 20b1ad33..2b687886 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 75591d1a..361165a7 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 2260a33b..d1690716 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 967c3b1a..4f41c313 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 5ce3a9a1..7c1ca615 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +LIT (sidekick.Sidekick_core.LIT)

Module type Sidekick_core.LIT

Literals

Literals are a pair of a boolean-sorted term, and a sign. Positive literals are the same as their term, and negative literals are the negation of their term.

The SAT solver deals only in literals and clauses (sets of literals). Everything else belongs in the SMT solver.

module T : TERM

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/Step_vec/index.html index cd715950..d9fe4b24 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html index 474a1758..447971eb 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 3e2d08a3..b6e13d52 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,15 @@ -Actions (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 7d2f2b62..59e09750 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 1d336203..e73b4946 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/Step_vec/index.html index e79d3ba5..56c170fb 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html index bbe2863f..f4b3d8f6 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.MONOID_ARG.SI.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Resolved_expl/index.html new file mode 100644 index 00000000..3b69bccf --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_core.MONOID_ARG.SI.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Fmt.printer
\ 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 da88c0e6..3ba675ff 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,4 +1,25 @@ -CC (sidekick.Sidekick_core.MONOID_ARG.SI.CC)

Module SI.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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 8319e871..0402a314 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

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.MONOID_ARG.SI.Lit)

Module SI.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Step_vec/index.html index 5841792a..f07d1488 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.MONOID_ARG.SI.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 56379d8c..9e202142 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,10 @@ -P (sidekick.Sidekick_core.MONOID_ARG.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.MONOID_ARG.SI.P)

Module SI.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Registry/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Registry/index.html new file mode 100644 index 00000000..3fd53023 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_core.MONOID_ARG.SI.Registry)

Module SI.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 4662f35f..2461c7f6 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.MONOID_ARG.SI.Simplify)

Module SI.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 7e70e7e7..c6bf2e18 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 5eda59bc..0819a82a 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 7db58cb8..c1ed9662 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 e5082b9c..840bb95e 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 69cf9cf3..f4debc05 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,3 +1,48 @@ -SI (sidekick.Sidekick_core.MONOID_ARG.SI)

Module MONOID_ARG.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type term = term and type t = proof and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SI (sidekick.Sidekick_core.MONOID_ARG.SI)

Module MONOID_ARG.SI

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type term = term + and type t = proof + and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html index f7319475..6bb666d7 100644 --- a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/SI/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_core.MONOID_ARG.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_core.MONOID_ARG.SI.PREPROCESS_ACTS)

Module type SI.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html b/dev/sidekick/Sidekick_core/module-type-MONOID_ARG/index.html index 29f11f38..ae2e3ce2 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,13 @@ -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 -> + ( t, SI.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/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-PROOF/Step_vec/index.html index 342c5f8c..2c1a326c 100644 --- a/dev/sidekick/Sidekick_core/module-type-PROOF/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-PROOF/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.PROOF.Step_vec)

Module PROOF.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.PROOF.Step_vec)

Module PROOF.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 5336499a..0c57a254 100644 --- a/dev/sidekick/Sidekick_core/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_core/module-type-PROOF/index.html @@ -1,2 +1,10 @@ -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 proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-REGISTRY/index.html b/dev/sidekick/Sidekick_core/module-type-REGISTRY/index.html new file mode 100644 index 00000000..19ee5628 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-REGISTRY/index.html @@ -0,0 +1,2 @@ + +REGISTRY (sidekick.Sidekick_core.REGISTRY)

Module type Sidekick_core.REGISTRY

Registry to extract values

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/Step_vec/index.html index c1fafdcb..74e49fb8 100644 --- a/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SAT_PROOF.Step_vec)

Module SAT_PROOF.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SAT_PROOF.Step_vec)

Module SAT_PROOF.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html index aa6f2cee..da7b1d7d 100644 --- a/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SAT_PROOF/index.html @@ -1,2 +1,2 @@ -SAT_PROOF (sidekick.Sidekick_core.SAT_PROOF)

Module type Sidekick_core.SAT_PROOF

Signature for SAT-solver proof emission.

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step

identifier for a proof

A vector of steps

type lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +SAT_PROOF (sidekick.Sidekick_core.SAT_PROOF)

Module type Sidekick_core.SAT_PROOF

Signature for SAT-solver proof emission.

type t

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step

identifier for a proof

A vector of steps

type lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Lit/index.html index 5eb5817f..343d7307 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.SOLVER.Lit)

Module SOLVER.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Model/index.html index 1238dfbd..46c8716f 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/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Step_vec/index.html index 0f9223b6..32ee6a5d 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 cefd3192..fd419eac 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,10 @@ -P (sidekick.Sidekick_core.SOLVER.P)

Module SOLVER.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER.P)

Module SOLVER.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Registry/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Registry/index.html new file mode 100644 index 00000000..1cbb9d4b --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_core.SOLVER.Registry)

Module SOLVER.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/Step_vec/index.html index 97c417c7..0c813bbf 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html index 497f6f90..f7b8e0b4 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 599a1b76..3428a7e9 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,15 @@ -Actions (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 4fba800a..37f8790e 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 fca4d725..cbff8b24 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/Step_vec/index.html index 2637e857..ee29f2e0 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html index 2c0901ce..aee85e3c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..a6124066 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_core.SOLVER.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Fmt.printer
\ 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 15ada424..33f8662a 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,4 +1,25 @@ -CC (sidekick.Sidekick_core.SOLVER.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Registry/index.html new file mode 100644 index 00000000..160db995 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_core.SOLVER.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 9f2d507e..6b4b550d 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 e37c806f..674f2d57 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_core.SOLVER.Solver_internal)

Module SOLVER.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html index edec460f..303394a4 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER/T/Fun/index.html index 5025f74c..601208c6 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 ad6e97e9..c6895f44 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 e20264b6..06ff6d98 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 ecc99e8d..c9a44789 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 c7eced4b..17fd8fc8 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 8f2158b9..d5ad80a4 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER/index.html @@ -1,5 +1,37 @@ -SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

User facing view of the solver.

This is the solver a user of sidekick can see, after instantiating everything. The user can add some theories, clauses, etc. and asks the solver to check satisfiability.

Theory implementors will mostly interact with SOLVER_INTERNAL.

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +SOLVER (sidekick.Sidekick_core.SOLVER)

Module type Sidekick_core.SOLVER

User facing view of the solver.

This is the solver a user of sidekick can see, after instantiating everything. The user can add some theories, clauses, etc. and asks the solver to check satisfiability.

Theory implementors will mostly interact with SOLVER_INTERNAL.

module T : TERM
module Lit : LIT with module T = T
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 cb16590c..e15e9996 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/Step_vec/index.html index c797fd21..c8ac7502 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html index e50cb7ca..ae21c8d7 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 bf98514f..9c4c26d8 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,15 @@ -Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> unit

propagate acts lit ~reason pr declares that reason() => lit is a tautology.

  • reason() should return a list of literals that are currently true.
  • lit should be a literal of interest (see CC_S.set_as_lit).

This function might never be called, a congruence closure has the right to not propagate and only trigger conflicts.

\ No newline at end of file +Actions (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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 8f2b6ba2..ec88bb31 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 3dd451a1..41167f71 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/Step_vec/index.html index 66e0781c..8863ad9e 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html index 3d85c526..6bfd8a3c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Resolved_expl/index.html new file mode 100644 index 00000000..4f8a2380 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_core.SOLVER_INTERNAL.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Fmt.printer
\ 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 73f88747..618ab3f3 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,4 +1,25 @@ -CC (sidekick.Sidekick_core.SOLVER_INTERNAL.CC)

Module SOLVER_INTERNAL.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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 e00bb9b9..25bb8c6e 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

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_core.SOLVER_INTERNAL.Lit)

Module SOLVER_INTERNAL.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Step_vec/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Step_vec/index.html index 69471338..a0aca58c 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_core.SOLVER_INTERNAL.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 2e0c84c9..12a763ff 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,10 @@ -P (sidekick.Sidekick_core.SOLVER_INTERNAL.P)

Module SOLVER_INTERNAL.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_core.SOLVER_INTERNAL.P)

Module SOLVER_INTERNAL.P

Proofs

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = term
type lit = Lit.t
type proof_rule = t -> proof_step
include SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Registry/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Registry/index.html new file mode 100644 index 00000000..d5511e93 --- /dev/null +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_core.SOLVER_INTERNAL.Registry)

Module SOLVER_INTERNAL.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 b26b0bd3..dc3bb217 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_core.SOLVER_INTERNAL.Simplify)

Module SOLVER_INTERNAL.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 47b828da..cc2899ae 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 78e0f554..1010e358 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 b3f77124..600973e6 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 a4073a44..bae1cb58 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 47432ea5..9cc1caf5 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/index.html @@ -1,3 +1,48 @@ -SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view.

Theories should interact with the solver via this module, to assert new lemmas, propagate literals, access the congruence closure, etc.

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : PROOF with type lit = Lit.t and type term = term and type t = proof and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +SOLVER_INTERNAL (sidekick.Sidekick_core.SOLVER_INTERNAL)

Module type Sidekick_core.SOLVER_INTERNAL

A view of the solver from a theory's point of view.

Theories should interact with the solver via this module, to assert new lemmas, propagate literals, access the congruence closure, etc.

module T : TERM
module Lit : LIT with module T = T
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof
type proof_step
module P : + PROOF + with type lit = Lit.t + and type term = term + and type t = proof + and type proof_step = proof_step
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html index a94989ce..9b3c840b 100644 --- a/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_core/module-type-SOLVER_INTERNAL/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER_INTERNAL.PREPROCESS_ACTS)

Module type SOLVER_INTERNAL.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_core.SOLVER_INTERNAL.PREPROCESS_ACTS)

Module type SOLVER_INTERNAL.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html b/dev/sidekick/Sidekick_core/module-type-TERM/Fun/index.html index bf61e5d0..369f6a1e 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 8ddc8dbf..fee04ecb 100644 --- a/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html +++ b/dev/sidekick/Sidekick_core/module-type-TERM/Term/index.html @@ -1,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 7b521e7a..a34eb434 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 b329caf5..46f1dd83 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-base/Sidekick_base__Proof/.dune-keep b/dev/sidekick/Sidekick_drup/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Proof/.dune-keep rename to dev/sidekick/Sidekick_drup/.dummy diff --git a/dev/sidekick/Sidekick_drup/.dune-keep b/dev/sidekick/Sidekick_drup/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_drup/Make/Atom/index.html b/dev/sidekick/Sidekick_drup/Make/Atom/index.html index 879d4612..c496b440 100644 --- a/dev/sidekick/Sidekick_drup/Make/Atom/index.html +++ b/dev/sidekick/Sidekick_drup/Make/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_drup.Make.Atom)

Module Make.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

  • raises Invalid_argument

    if the argument is 0

\ No newline at end of file +Atom (sidekick.Sidekick_drup.Make.Atom)

Module Make.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

  • raises Invalid_argument

    if the argument is 0

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/Checker/index.html b/dev/sidekick/Sidekick_drup/Make/Checker/index.html index 7a07d444..89960743 100644 --- a/dev/sidekick/Sidekick_drup/Make/Checker/index.html +++ b/dev/sidekick/Sidekick_drup/Make/Checker/index.html @@ -1,2 +1,2 @@ -Checker (sidekick.Sidekick_drup.Make.Checker)

Module Make.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file +Checker (sidekick.Sidekick_drup.Make.Checker)

Module Make.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/Clause/index.html b/dev/sidekick/Sidekick_drup/Make/Clause/index.html index ef706655..ae68a6e7 100644 --- a/dev/sidekick/Sidekick_drup/Make/Clause/index.html +++ b/dev/sidekick/Sidekick_drup/Make/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_drup.Make.Clause)

Module Make.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:(atom -> unit) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file +Clause (sidekick.Sidekick_drup.Make.Clause)

Module Make.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:( atom -> unit ) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/Make/index.html b/dev/sidekick/Sidekick_drup/Make/index.html index 461b9b55..8a1b090a 100644 --- a/dev/sidekick/Sidekick_drup/Make/index.html +++ b/dev/sidekick/Sidekick_drup/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_drup.Make)

Module Sidekick_drup.Make

Parameters

Signature

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file +Make (sidekick.Sidekick_drup.Make)

Module Sidekick_drup.Make

Parameters

Signature

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/index.html b/dev/sidekick/Sidekick_drup/index.html index e6f368ef..174707e6 100644 --- a/dev/sidekick/Sidekick_drup/index.html +++ b/dev/sidekick/Sidekick_drup/index.html @@ -1,2 +1,2 @@ -Sidekick_drup (sidekick.Sidekick_drup)

Module Sidekick_drup

DRUP trace checker.

This module provides a checker for DRUP traces, including proof_rule-by-proof_rule checking for traces that interleave DRUP steps with other kinds of steps.

module Fmt = CCFormat
module VecSmallInt = Sidekick_util.VecSmallInt
module type S = sig ... end

An instance of the checker

module Make () : S
\ No newline at end of file +Sidekick_drup (sidekick.Sidekick_drup)

Module Sidekick_drup

DRUP trace checker.

This module provides a checker for DRUP traces, including proof_rule-by-proof_rule checking for traces that interleave DRUP steps with other kinds of steps.

module Fmt = CCFormat
module VecSmallInt = Sidekick_util.VecSmallInt
module type S = sig ... end

An instance of the checker

module Make () : S
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html index c5bd50f1..665ebb14 100644 --- a/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html +++ b/dev/sidekick/Sidekick_drup/module-type-S/Atom/index.html @@ -1,2 +1,2 @@ -Atom (sidekick.Sidekick_drup.S.Atom)

Module S.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

  • raises Invalid_argument

    if the argument is 0

\ No newline at end of file +Atom (sidekick.Sidekick_drup.S.Atom)

Module S.Atom

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val neg : t -> t
val sign : t -> bool
val pp : t Fmt.printer
type atom = t
val of_int_dimacs : int -> t

Turn a signed integer into an atom. Positive integers are positive atoms, and -i is neg (of_int i).

  • raises Invalid_argument

    if the argument is 0

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html index a8423503..a644b856 100644 --- a/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html +++ b/dev/sidekick/Sidekick_drup/module-type-S/Checker/index.html @@ -1,2 +1,2 @@ -Checker (sidekick.Sidekick_drup.S.Checker)

Module S.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file +Checker (sidekick.Sidekick_drup.S.Checker)

Module S.Checker

type t
val create : Clause.store -> t
val add_clause : t -> Clause.t -> unit
val is_valid_drup : t -> Clause.t -> bool
val del_clause : t -> Clause.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html index 8cf53bc8..6e2530a5 100644 --- a/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_drup/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_drup.S.Clause)

Module S.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:(atom -> unit) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file +Clause (sidekick.Sidekick_drup.S.Clause)

Module S.Clause

type store
val create : unit -> store
type t
val size : t -> int
val get : t -> int -> atom
val iter : f:( atom -> unit ) -> t -> unit
val pp : t Fmt.printer
val of_list : store -> atom list -> t
val of_iter : store -> atom Iter.t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_drup/module-type-S/index.html b/dev/sidekick/Sidekick_drup/module-type-S/index.html index fb2e4485..8f02fd4a 100644 --- a/dev/sidekick/Sidekick_drup/module-type-S/index.html +++ b/dev/sidekick/Sidekick_drup/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_drup.S)

Module type Sidekick_drup.S

An instance of the checker

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file +S (sidekick.Sidekick_drup.S)

Module type Sidekick_drup.S

An instance of the checker

module Atom : sig ... end
type atom = Atom.t
module Clause : sig ... end
type clause = Clause.t
module Checker : sig ... end
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Proof_dummy/.dune-keep b/dev/sidekick/Sidekick_intsolver/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Proof_dummy/.dune-keep rename to dev/sidekick/Sidekick_intsolver/.dummy diff --git a/dev/sidekick/Sidekick_intsolver/Make/Cert/index.html b/dev/sidekick/Sidekick_intsolver/Make/Cert/index.html new file mode 100644 index 00000000..b6a5393d --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/Cert/index.html @@ -0,0 +1,2 @@ + +Cert (sidekick.Sidekick_intsolver.Make.Cert)

Module Make.Cert

type t
val pp : t Sidekick_util.Fmt.printer
val lits : t -> A.lit Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/Make/Model/index.html b/dev/sidekick/Sidekick_intsolver/Make/Model/index.html new file mode 100644 index 00000000..e9dbebe0 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_intsolver.Make.Model)

Module Make.Model

type t
val pp : t Sidekick_util.Fmt.printer
val eval : t -> A.term -> A.Z.t option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/Make/Op/index.html b/dev/sidekick/Sidekick_intsolver/Make/Op/index.html new file mode 100644 index 00000000..c40eacc6 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick.Sidekick_intsolver.Make.Op)

Module Make.Op

type t =
| Leq
| Lt
| Eq
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/Z/index.html b/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/Z/index.html new file mode 100644 index 00000000..597cdfb5 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_intsolver.Make.1-A.Z)

Module 1-A.Z

include Sidekick_arith.INT
include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
val sqrt : t -> t
val divexact : t -> t -> t
val (/) : t -> t -> t
val ediv : t -> t -> t

Euclidian division

val rem : t -> t -> t
val probab_prime : t -> bool
val pow : t -> int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/index.html new file mode 100644 index 00000000..4d5bb5ff --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/argument-1-A/index.html @@ -0,0 +1,2 @@ + +A (sidekick.Sidekick_intsolver.Make.1-A)

Parameter Make.1-A

type term
type lit
val pp_term : term Sidekick_util.Fmt.printer
val pp_lit : lit Sidekick_util.Fmt.printer
module T_map : CCMap.S with type key = term
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/Make/index.html b/dev/sidekick/Sidekick_intsolver/Make/index.html new file mode 100644 index 00000000..5c05728f --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_intsolver.Make)

Module Sidekick_intsolver.Make

Parameters

module A : ARG

Signature

module A = A
module Op : sig ... end
type t
val create : unit -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
val assert_ : t -> (A.Z.t * A.term) list -> Op.t -> A.Z.t -> lit:A.lit -> unit
val define : t -> A.term -> (A.Z.t * A.term) list -> unit
module Cert : sig ... end
module Model : sig ... end
type result =
| Sat of Model.t
| Unsat of Cert.t
val pp_result : result Sidekick_util.Fmt.printer
val check : t -> result
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/index.html b/dev/sidekick/Sidekick_intsolver/index.html new file mode 100644 index 00000000..bc80ca56 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/index.html @@ -0,0 +1,2 @@ + +Sidekick_intsolver (sidekick.Sidekick_intsolver)

Module Sidekick_intsolver

module type ARG = sig ... end
module type S = sig ... end
module Make (A : ARG) : S with module A = A
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-ARG/Z/index.html b/dev/sidekick/Sidekick_intsolver/module-type-ARG/Z/index.html new file mode 100644 index 00000000..524feb0b --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-ARG/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_intsolver.ARG.Z)

Module ARG.Z

include Sidekick_arith.INT
include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
val sqrt : t -> t
val divexact : t -> t -> t
val (/) : t -> t -> t
val ediv : t -> t -> t

Euclidian division

val rem : t -> t -> t
val probab_prime : t -> bool
val pow : t -> int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-ARG/index.html b/dev/sidekick/Sidekick_intsolver/module-type-ARG/index.html new file mode 100644 index 00000000..81bddd6e --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_intsolver.ARG)

Module type Sidekick_intsolver.ARG

type term
type lit
val pp_term : term Sidekick_util.Fmt.printer
val pp_lit : lit Sidekick_util.Fmt.printer
module T_map : CCMap.S with type key = term
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/A/Z/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/A/Z/index.html new file mode 100644 index 00000000..1c759435 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/A/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_intsolver.S.A.Z)

Module A.Z

include Sidekick_arith.INT
include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
val sqrt : t -> t
val divexact : t -> t -> t
val (/) : t -> t -> t
val ediv : t -> t -> t

Euclidian division

val rem : t -> t -> t
val probab_prime : t -> bool
val pow : t -> int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/A/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/A/index.html new file mode 100644 index 00000000..f5583407 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/A/index.html @@ -0,0 +1,2 @@ + +A (sidekick.Sidekick_intsolver.S.A)

Module S.A

type term
type lit
val pp_term : term Sidekick_util.Fmt.printer
val pp_lit : lit Sidekick_util.Fmt.printer
module T_map : CCMap.S with type key = term
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/Cert/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/Cert/index.html new file mode 100644 index 00000000..e052f156 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/Cert/index.html @@ -0,0 +1,2 @@ + +Cert (sidekick.Sidekick_intsolver.S.Cert)

Module S.Cert

type t
val pp : t Sidekick_util.Fmt.printer
val lits : t -> A.lit Iter.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/Model/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/Model/index.html new file mode 100644 index 00000000..7c394701 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/Model/index.html @@ -0,0 +1,2 @@ + +Model (sidekick.Sidekick_intsolver.S.Model)

Module S.Model

type t
val pp : t Sidekick_util.Fmt.printer
val eval : t -> A.term -> A.Z.t option
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/Op/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/Op/index.html new file mode 100644 index 00000000..0777b82f --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick.Sidekick_intsolver.S.Op)

Module S.Op

type t =
| Leq
| Lt
| Eq
val pp : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_intsolver/module-type-S/index.html b/dev/sidekick/Sidekick_intsolver/module-type-S/index.html new file mode 100644 index 00000000..e5a149e8 --- /dev/null +++ b/dev/sidekick/Sidekick_intsolver/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_intsolver.S)

Module type Sidekick_intsolver.S

module A : ARG
module Op : sig ... end
type t
val create : unit -> t
val push_level : t -> unit
val pop_levels : t -> int -> unit
val assert_ : t -> (A.Z.t * A.term) list -> Op.t -> A.Z.t -> lit:A.lit -> unit
val define : t -> A.term -> (A.Z.t * A.term) list -> unit
module Cert : sig ... end
module Model : sig ... end
type result =
| Sat of Model.t
| Unsat of Cert.t
val pp_result : result Sidekick_util.Fmt.printer
val check : t -> result
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Proof_quip/.dune-keep b/dev/sidekick/Sidekick_lit/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Proof_quip/.dune-keep rename to dev/sidekick/Sidekick_lit/.dummy diff --git a/dev/sidekick/Sidekick_lit/.dune-keep b/dev/sidekick/Sidekick_lit/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html index 53bfaf69..1cb0e2fe 100644 --- a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_lit.Make.1-T.Fun)

Module 1-T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_lit.Make.1-T.Fun)

Module 1-T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html index 38111c56..eb0f6e36 100644 --- a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Term/index.html @@ -1,8 +1,8 @@ -Term (sidekick.Sidekick_lit.Make.1-T.Term)

Module 1-T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+Term (sidekick.Sidekick_lit.Make.1-T.Term)

Module 1-T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> ( t -> t ) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html index 0ec51672..eb9adb53 100644 --- a/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick.Sidekick_lit.Make.1-T.Ty)

Module 1-T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_lit.Make.1-T.Ty)

Module 1-T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html b/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html index a4f7a377..49adaeb2 100644 --- a/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html +++ b/dev/sidekick/Sidekick_lit/Make/argument-1-T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_lit.Make.1-T)

Parameter Make.1-T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file +T (sidekick.Sidekick_lit.Make.1-T)

Parameter Make.1-T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/Make/index.html b/dev/sidekick/Sidekick_lit/Make/index.html index 8f7fc809..ce7bb35f 100644 --- a/dev/sidekick/Sidekick_lit/Make/index.html +++ b/dev/sidekick/Sidekick_lit/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_lit.Make)

Module Sidekick_lit.Make

Parameters

Signature

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Make (sidekick.Sidekick_lit.Make)

Module Sidekick_lit.Make

Parameters

Signature

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_lit/index.html b/dev/sidekick/Sidekick_lit/index.html index 426b2706..ed319557 100644 --- a/dev/sidekick/Sidekick_lit/index.html +++ b/dev/sidekick/Sidekick_lit/index.html @@ -1,2 +1,2 @@ -Sidekick_lit (sidekick.Sidekick_lit)

Module Sidekick_lit

Implementation of literals from terms

module Make (T : Sidekick_core.TERM) : Sidekick_core.LIT with module T = T
\ No newline at end of file +Sidekick_lit (sidekick.Sidekick_lit)

Module Sidekick_lit

Implementation of literals from terms

module Make (T : Sidekick_core.TERM) : Sidekick_core.LIT with module T = T
\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base__Solver_arg/.dune-keep b/dev/sidekick/Sidekick_memtrace/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base__Solver_arg/.dune-keep rename to dev/sidekick/Sidekick_memtrace/.dummy diff --git a/dev/sidekick/Sidekick_memtrace/.dune-keep b/dev/sidekick/Sidekick_memtrace/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_memtrace/index.html b/dev/sidekick/Sidekick_memtrace/index.html index 6c86028a..3ac112c9 100644 --- a/dev/sidekick/Sidekick_memtrace/index.html +++ b/dev/sidekick/Sidekick_memtrace/index.html @@ -1,2 +1,6 @@ -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 +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-base/Sidekick_base_proof_trace/.dune-keep b/dev/sidekick/Sidekick_mini_cc/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base_proof_trace/.dune-keep rename to dev/sidekick/Sidekick_mini_cc/.dummy diff --git a/dev/sidekick/Sidekick_mini_cc/.dune-keep b/dev/sidekick/Sidekick_mini_cc/.dune-keep deleted file mode 100644 index e69de29b..00000000 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 17d9a85e..d034d059 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 ee1fab62..8e6eaa2d 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 4243a41b..7e5b8fc6 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 729a9740..db8e7fe6 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 08f14cc5..4a9fa4cf 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 @@ -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 +A (sidekick.Sidekick_mini_cc.Make.1-A)

Parameter Make.1-A

val cc_view : T.Term.t -> ( T.Fun.t, T.Term.t, T.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 1f17f541..d78f9d4b 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

module A : ARG

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

module A : ARG

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 68bec242..6f89621f 100644 --- a/dev/sidekick/Sidekick_mini_cc/index.html +++ b/dev/sidekick/Sidekick_mini_cc/index.html @@ -1,2 +1,7 @@ -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 (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 + (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 59876586..71bf03f9 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 4f1f1bff..9cfb1829 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 f2132157..9be8985d 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 8304069f..f016da87 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 6276d574..ccb8dc9d 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.t, T.Term.t, T.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 d75687e1..881bb750 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-base/Sidekick_base_proof_trace__/.dune-keep b/dev/sidekick/Sidekick_quip/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base_proof_trace__/.dune-keep rename to dev/sidekick/Sidekick_quip/.dummy diff --git a/dev/sidekick/Sidekick_quip/.dune-keep b/dev/sidekick/Sidekick_quip/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_quip/Proof/Fun/index.html b/dev/sidekick/Sidekick_quip/Proof/Fun/index.html index c7e71194..afd29ceb 100644 --- a/dev/sidekick/Sidekick_quip/Proof/Fun/index.html +++ b/dev/sidekick/Sidekick_quip/Proof/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_quip.Proof.Fun)

Module Proof.Fun

type t = string
val pp : Sidekick_util.Fmt.t -> t -> unit
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file +Fun (sidekick.Sidekick_quip.Proof.Fun)

Module Proof.Fun

type t = string
val pp : Sidekick_util.Fmt.t -> t -> unit
val equal : t -> t -> bool
val hash : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip/Proof/Lit/index.html b/dev/sidekick/Sidekick_quip/Proof/Lit/index.html index ceafd24b..b2a95394 100644 --- a/dev/sidekick/Sidekick_quip/Proof/Lit/index.html +++ b/dev/sidekick/Sidekick_quip/Proof/Lit/index.html @@ -1,2 +1,6 @@ -Lit (sidekick.Sidekick_quip.Proof.Lit)

Module Proof.Lit

type t =
| L_eq of term * term
| L_a of bool * term
val pp_with : pp_t:(Sidekick_util.Fmt.t -> term -> unit) -> Sidekick_util.Fmt.t -> t -> unit
val pp : Sidekick_util.Fmt.t -> t -> unit
val eq : term -> term -> t
val mk : bool -> term -> t
\ No newline at end of file +Lit (sidekick.Sidekick_quip.Proof.Lit)

Module Proof.Lit

type t =
| L_eq of term * term
| L_a of bool * term
val pp_with : + pp_t:( Sidekick_util.Fmt.t -> term -> unit ) -> + Sidekick_util.Fmt.t -> + t -> + unit
val pp : Sidekick_util.Fmt.t -> t -> unit
val eq : term -> term -> t
val mk : bool -> term -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip/Proof/T/index.html b/dev/sidekick/Sidekick_quip/Proof/T/index.html index 25529ebc..8f7d8d4e 100644 --- a/dev/sidekick/Sidekick_quip/Proof/T/index.html +++ b/dev/sidekick/Sidekick_quip/Proof/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_quip.Proof.T)

Module Proof.T

Representation of terms, with explicit sharing

type t =
| Bool of bool
| App_fun of Fun.t * t array
| App_ho of t * t
| Is_a of Fun.t * t
| Ite of t * t * t
| Not of t
| Eq of t * t
| Ref of string
val view : t -> t
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val bool : bool -> t
val not_ : t -> t
val eq : t -> t -> t
val ref : string -> t
val app_fun : Fun.t -> t array -> t
val const : Fun.t -> t
val app_ho : t -> t -> t
val ite : t -> t -> t -> t
val is_a : Fun.t -> t -> t
\ No newline at end of file +T (sidekick.Sidekick_quip.Proof.T)

Module Proof.T

Representation of terms, with explicit sharing

type t =
| Bool of bool
| App_fun of Fun.t * t array
| App_ho of t * t
| Is_a of Fun.t * t
| Ite of t * t * t
| Not of t
| Eq of t * t
| Ref of string
val view : t -> t
val equal : t -> t -> bool
val hash : t -> int
val true_ : t
val false_ : t
val bool : bool -> t
val not_ : t -> t
val eq : t -> t -> t
val ref : string -> t
val app_fun : Fun.t -> t array -> t
val const : Fun.t -> t
val app_ho : t -> t -> t
val ite : t -> t -> t -> t
val is_a : Fun.t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip/Proof/Ty/index.html b/dev/sidekick/Sidekick_quip/Proof/Ty/index.html index 8b56fa05..11236e62 100644 --- a/dev/sidekick/Sidekick_quip/Proof/Ty/index.html +++ b/dev/sidekick/Sidekick_quip/Proof/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick.Sidekick_quip.Proof.Ty)

Module Proof.Ty

Representation of types

type t =
| Bool
| Arrow of t array * t
| App of string * t array
| Ref of string
val equal : t -> t -> bool
val hash : t -> int
val view : t -> t
\ No newline at end of file +Ty (sidekick.Sidekick_quip.Proof.Ty)

Module Proof.Ty

Representation of types

type t =
| Bool
| Arrow of t array * t
| App of string * t array
| Ref of string
val equal : t -> t -> bool
val hash : t -> int
val view : t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip/Proof/index.html b/dev/sidekick/Sidekick_quip/Proof/index.html index 41dc8c0c..fe6a55c7 100644 --- a/dev/sidekick/Sidekick_quip/Proof/index.html +++ b/dev/sidekick/Sidekick_quip/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_quip.Proof)

Module Sidekick_quip.Proof

type id = int

A reference to a previously defined object in the proof

module Ty : sig ... end

Representation of types

module Fun : sig ... end
module Cstor = Fun
module T : sig ... end

Representation of terms, with explicit sharing

type term = T.t
type ty = Ty.t
module Lit : sig ... end
type clause = Lit.t list
type t =
| Unspecified
| Sorry
| Sorry_c of clause
| Named of string
| Refl of term
| CC_lemma_imply of t list * term * term
| CC_lemma of clause
| Assertion of term
| Assertion_c of clause
| Hres of t * hres_step list
| Res of term * t * t
| Res1 of t * t
| Paramod1 of t * t
| Rup of clause * t list
| Clause_rw of {
res : clause;
c0 : t;
using : t list;(*

the rewriting equations/atoms

*)
}
| DT_isa_split of ty * term list
| DT_isa_disj of ty * term * term
| DT_cstor_inj of Cstor.t * int * term list * term list
| Bool_true_is_true
| Bool_true_neq_false
| Bool_eq of term * term
| Bool_c of bool_c_name * term list
| Ite_true of term
| Ite_false of term
| LRA of clause
| Composite of {
assumptions : (string * Lit.t) list;
steps : composite_step array;
}
and bool_c_name = string
and composite_step =
| S_step_c of {
name : string;
res : clause;
proof : t;
}
(*

A named step in Composite, with the expected result. This decouples the checking of the sub-proof, from its use in the rest of the proof, as we can use res even if checking proof failed.

*)
| S_step_anon of {
name : string;
proof : t;
}
(*

A named intermediate proof, to be reused in subsequent proofs. Unlike S_step_c we do not specify the expected result so if this fails, any proof downstream will also fail.

*)
| S_define_t of term * term
| S_define_t_name of string * term
and hres_step =
| R of {
pivot : term;
p : t;
}
| R1 of t
| P of {
lhs : term;
rhs : term;
p : t;
}
| P1 of t
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
val stepc : name:string -> clause -> t -> composite_step
val step_anon : name:string -> t -> composite_step
val deft : term -> term -> composite_step
val deft_name : string -> term -> composite_step
val is_trivial_refl : t -> bool
val default : t
val sorry_c : Lit.t Iter.t -> t
val sorry_c_l : clause -> t
val sorry : t
val refl : term -> t
val ref_by_name : string -> t
val cc_lemma : clause -> t
val cc_imply_l : t list -> term -> term -> t
val cc_imply2 : t -> t -> term -> term -> t
val assertion : term -> t
val assertion_c : Lit.t Iter.t -> t
val assertion_c_l : clause -> t
val rup : clause -> t list -> t
val clause_rw : t -> res:clause -> using:t list -> t
val composite_a : ?assms:(string * Lit.t) list -> composite_step array -> t
val composite_l : ?assms:(string * Lit.t) list -> composite_step list -> t
val composite_iter : ?assms:(string * Lit.t) list -> composite_step Iter.t -> t
val isa_split : ty -> term Iter.t -> t
val isa_disj : ty -> term -> term -> t
val cstor_inj : Cstor.t -> int -> term list -> term list -> t
val ite_true : term -> t
val ite_false : term -> t
val true_is_true : t
val true_neq_false : t
val bool_eq : term -> term -> t
val bool_c : bool_c_name -> term list -> t
val hres_l : t -> hres_step list -> t
val hres_iter : t -> hres_step Iter.t -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val paramod1 : t -> t -> t
val lra_l : clause -> t
val lra : Lit.t Iter.t -> t
\ No newline at end of file +Proof (sidekick.Sidekick_quip.Proof)

Module Sidekick_quip.Proof

type id = int

A reference to a previously defined object in the proof

module Ty : sig ... end

Representation of types

module Fun : sig ... end
module Cstor = Fun
module T : sig ... end

Representation of terms, with explicit sharing

type term = T.t
type ty = Ty.t
module Lit : sig ... end
type clause = Lit.t list
type t =
| Unspecified
| Sorry
| Sorry_c of clause
| Named of string
| Refl of term
| CC_lemma_imply of t list * term * term
| CC_lemma of clause
| Assertion of term
| Assertion_c of clause
| Hres of t * hres_step list
| Res of term * t * t
| Res1 of t * t
| Paramod1 of t * t
| Rup of clause * t list
| Clause_rw of {
res : clause;
c0 : t;
using : t list;(*

the rewriting equations/atoms

*)
}
| DT_isa_split of ty * term list
| DT_isa_disj of ty * term * term
| DT_cstor_inj of Cstor.t * int * term list * term list
| Bool_true_is_true
| Bool_true_neq_false
| Bool_eq of term * term
| Bool_c of bool_c_name * term list
| Ite_true of term
| Ite_false of term
| LRA of clause
| Composite of {
assumptions : (string * Lit.t) list;
steps : composite_step array;
}
and bool_c_name = string
and composite_step =
| S_step_c of {
name : string;
res : clause;
proof : t;
}
(*

A named step in Composite, with the expected result. This decouples the checking of the sub-proof, from its use in the rest of the proof, as we can use res even if checking proof failed.

*)
| S_step_anon of {
name : string;
proof : t;
}
(*

A named intermediate proof, to be reused in subsequent proofs. Unlike S_step_c we do not specify the expected result so if this fails, any proof downstream will also fail.

*)
| S_define_t of term * term
| S_define_t_name of string * term
and hres_step =
| R of {
pivot : term;
p : t;
}
| R1 of t
| P of {
lhs : term;
rhs : term;
p : t;
}
| P1 of t
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
val stepc : name:string -> clause -> t -> composite_step
val step_anon : name:string -> t -> composite_step
val deft : term -> term -> composite_step
val deft_name : string -> term -> composite_step
val is_trivial_refl : t -> bool
val default : t
val sorry_c : Lit.t Iter.t -> t
val sorry_c_l : clause -> t
val sorry : t
val refl : term -> t
val ref_by_name : string -> t
val cc_lemma : clause -> t
val cc_imply_l : t list -> term -> term -> t
val cc_imply2 : t -> t -> term -> term -> t
val assertion : term -> t
val assertion_c : Lit.t Iter.t -> t
val assertion_c_l : clause -> t
val rup : clause -> t list -> t
val clause_rw : t -> res:clause -> using:t list -> t
val composite_a : ?assms:(string * Lit.t) list -> composite_step array -> t
val composite_l : ?assms:(string * Lit.t) list -> composite_step list -> t
val composite_iter : ?assms:(string * Lit.t) list -> composite_step Iter.t -> t
val isa_split : ty -> term Iter.t -> t
val isa_disj : ty -> term -> term -> t
val cstor_inj : Cstor.t -> int -> term list -> term list -> t
val ite_true : term -> t
val ite_false : term -> t
val true_is_true : t
val true_neq_false : t
val bool_eq : term -> term -> t
val bool_c : bool_c_name -> term list -> t
val hres_l : t -> hres_step list -> t
val hres_iter : t -> hres_step Iter.t -> t
val res : pivot:term -> t -> t -> t
val res1 : t -> t -> t
val paramod1 : t -> t -> t
val lra_l : clause -> t
val lra : Lit.t Iter.t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip/index.html b/dev/sidekick/Sidekick_quip/index.html index 7cc107dc..dcc8faf5 100644 --- a/dev/sidekick/Sidekick_quip/index.html +++ b/dev/sidekick/Sidekick_quip/index.html @@ -1,2 +1,2 @@ -Sidekick_quip (sidekick.Sidekick_quip)

Module Sidekick_quip

Proofs of unsatisfiability in the Quip proof format..

This targets Quip as an experimental proof backend.

module Proof : sig ... end
type t = Proof.t

The state holding the whole proof.

type out_format =
| Sexp(*

S-expressions

*)
| CSexp(*

Canonical S-expressions

*)

What format to use to serialize the proof?

val pp_out_format : out_format Sidekick_util.Fmt.printer
val output : ?fmt:out_format -> Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_util.Fmt.printer
\ No newline at end of file +Sidekick_quip (sidekick.Sidekick_quip)

Module Sidekick_quip

Proofs of unsatisfiability in the Quip proof format..

This targets Quip as an experimental proof backend.

module Proof : sig ... end
type t = Proof.t

The state holding the whole proof.

type out_format =
| Sexp(*

S-expressions

*)
| CSexp(*

Canonical S-expressions

*)

What format to use to serialize the proof?

val pp_out_format : out_format Sidekick_util.Fmt.printer
val output : ?fmt:out_format -> Stdlib.out_channel -> t -> unit
val pp_debug : t Sidekick_util.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip__/.dune-keep b/dev/sidekick/Sidekick_quip__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_quip__/index.html b/dev/sidekick/Sidekick_quip__/index.html deleted file mode 100644 index 5110bf05..00000000 --- a/dev/sidekick/Sidekick_quip__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_quip__ (sidekick.Sidekick_quip__)

Module Sidekick_quip__

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_quip__Proof/.dune-keep b/dev/sidekick/Sidekick_quip__Proof/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_quip__Proof/index.html b/dev/sidekick/Sidekick_quip__Proof/index.html deleted file mode 100644 index 4fc8779a..00000000 --- a/dev/sidekick/Sidekick_quip__Proof/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_quip__Proof (sidekick.Sidekick_quip__Proof)

Module Sidekick_quip__Proof

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace__Proof_ser/.dune-keep b/dev/sidekick/Sidekick_sat/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base_proof_trace__Proof_ser/.dune-keep rename to dev/sidekick/Sidekick_sat/.dummy diff --git a/dev/sidekick/Sidekick_sat/.dune-keep b/dev/sidekick/Sidekick_sat/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/Step_vec/index.html index ba92c1e1..5e3e6a2b 100644 --- a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Proof_dummy.Make.Step_vec)

Module Make.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Proof_dummy.Make.Step_vec)

Module Make.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/argument-1-Lit/index.html b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/argument-1-Lit/index.html index 821210b6..e2106bd1 100644 --- a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/argument-1-Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/argument-1-Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Proof_dummy.Make.1-Lit)

Parameter Make.1-Lit

type t
\ No newline at end of file +Lit (sidekick.Sidekick_sat.Proof_dummy.Make.1-Lit)

Parameter Make.1-Lit

type t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/index.html b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/index.html index 6399deb5..ee7acca8 100644 --- a/dev/sidekick/Sidekick_sat/Proof_dummy/Make/index.html +++ b/dev/sidekick/Sidekick_sat/Proof_dummy/Make/index.html @@ -1,2 +1,5 @@ -Make (sidekick.Sidekick_sat.Proof_dummy.Make)

Module Proof_dummy.Make

Parameters

module Lit : sig ... end

Signature

include Solver_intf.PROOF with type lit = Lit.t and type t = unit and type proof_step = unit
type t = unit

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = unit

identifier for a proof

A vector of steps

type lit = Lit.t

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Make (sidekick.Sidekick_sat.Proof_dummy.Make)

Module Proof_dummy.Make

Parameters

module Lit : sig ... end

Signature

include Solver_intf.PROOF + with type lit = Lit.t + and type t = unit + and type proof_step = unit
type t = unit

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = unit

identifier for a proof

A vector of steps

type lit = Lit.t

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Proof_dummy/index.html b/dev/sidekick/Sidekick_sat/Proof_dummy/index.html index 1d547843..5f5976dd 100644 --- a/dev/sidekick/Sidekick_sat/Proof_dummy/index.html +++ b/dev/sidekick/Sidekick_sat/Proof_dummy/index.html @@ -1,2 +1,2 @@ -Proof_dummy (sidekick.Sidekick_sat.Proof_dummy)

Module Sidekick_sat.Proof_dummy

Module for dummy proofs based on unit

Dummy proof module that does nothing.

module Make (Lit : sig ... end) : sig ... end
\ No newline at end of file +Proof_dummy (sidekick.Sidekick_sat.Proof_dummy)

Module Sidekick_sat.Proof_dummy

Module for dummy proofs based on unit

Dummy proof module that does nothing.

module Make (Lit : sig ... end) : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html index 1060da70..290a2d7c 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver.Make_cdcl_t.Clause)

Module Make_cdcl_t.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html index 9b00e6cd..a343301a 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Lit)

Module 1-Th.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +Lit (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Lit)

Module 1-Th.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/Step_vec/index.html index 616b96a3..2ee70a31 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html index d7141888..e85c48b0 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html index ab86cb5f..c7cd9396 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/argument-1-Th/index.html @@ -1,2 +1,6 @@ -Th (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type lit
module Lit : Solver_intf.LIT with type t = lit

lits

type proof

Proof storage/recording

type proof_step

Identifier for a clause precendently added/proved

module Proof : Solver_intf.PROOF with type t = proof and type lit = lit and type proof_step = proof_step
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 -> (litproofproof_step) Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproofproof_step) 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 +Th (sidekick.Sidekick_sat.Solver.Make_cdcl_t.1-Th)

Parameter Make_cdcl_t.1-Th

type t

The plugin state itself

type lit
module Lit : Solver_intf.LIT with type t = lit

lits

type proof

Proof storage/recording

type proof_step

Identifier for a clause precendently added/proved

module Proof : + Solver_intf.PROOF + with type t = proof + and type lit = lit + and type proof_step = proof_step
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 -> ( lit, proof, proof_step ) Solver_intf.acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> ( lit, proof, proof_step ) Solver_intf.acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html index 543a3a95..d5495056 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_cdcl_t/index.html @@ -1,4 +1,28 @@ -Make_cdcl_t (sidekick.Sidekick_sat.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory = Th.t
type proof = Th.proof

A representation of a full proof

type proof_step = Th.proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : ?on_conflict:(t -> Clause.t -> unit) -> ?on_decision:(t -> lit -> unit) -> -?on_learnt:(t -> Clause.t -> unit) -> ?on_gc:(t -> lit array -> unit) -> ?stat:Sidekick_util.Stat.t -> -?size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : descr:string -> size:int -> t -> clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit Solver_intf.sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of (litclauseproof_step) Solver_intf.unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : t -> pool:clause_pool_id -> lit list -> proof_step -> unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : t -> pool:clause_pool_id -> lit array -> proof_step -> unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:(unit -> unit) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of (litclauseproof_step) Solver_intf.unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : ?assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file +Make_cdcl_t (sidekick.Sidekick_sat.Solver.Make_cdcl_t)

Module Solver.Make_cdcl_t

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory = Th.t
type proof = Th.proof

A representation of a full proof

type proof_step = Th.proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : + ?on_conflict:( t -> Clause.t -> unit ) -> + ?on_decision:( t -> lit -> unit ) -> + ?on_learnt:( t -> Clause.t -> unit ) -> + ?on_gc:( t -> lit array -> unit ) -> + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Tiny | `Small | `Big ] -> + proof:Proof.t -> + theory -> + t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : + descr:string -> + size:int -> + t -> + clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit Solver_intf.sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of ( lit, clause, proof_step ) Solver_intf.unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : + t -> + pool:clause_pool_id -> + lit list -> + proof_step -> + unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : + t -> + pool:clause_pool_id -> + lit array -> + proof_step -> + unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:( unit -> unit ) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving. Can raise Resource_exhausted to stop solving.

  • raises Resource_exhausted

    if the on_progress handler raised it to stop

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of ( lit, clause, proof_step ) Solver_intf.unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : + ?assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html index fcf71d64..9b2ad5a2 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver.Make_pure_sat.Clause)

Module Make_pure_sat.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html index cae968ac..c284c7b4 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Lit)

Module 1-Th.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +Lit (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Lit)

Module 1-Th.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * Solver_intf.same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/Step_vec/index.html index 959b7702..5bad28f7 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html index cf126184..d0a2b531 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th.Proof)

Module 1-Th.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html index c0073ac7..a3f88959 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/argument-1-Th/index.html @@ -1,2 +1,6 @@ -Th (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type lit
module Lit : Solver_intf.LIT with type t = lit

lits

type proof
type proof_step
module Proof : Solver_intf.PROOF with type t = proof and type lit = lit and type proof_step = proof_step
\ No newline at end of file +Th (sidekick.Sidekick_sat.Solver.Make_pure_sat.1-Th)

Parameter Make_pure_sat.1-Th

type lit
module Lit : Solver_intf.LIT with type t = lit

lits

type proof
type proof_step
module Proof : + Solver_intf.PROOF + with type t = proof + and type lit = lit + and type proof_step = proof_step
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html index 5ee44b17..2754e785 100644 --- a/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/Make_pure_sat/index.html @@ -1,4 +1,28 @@ -Make_pure_sat (sidekick.Sidekick_sat.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory = unit
type proof = Th.proof

A representation of a full proof

type proof_step = Th.proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : ?on_conflict:(t -> Clause.t -> unit) -> ?on_decision:(t -> lit -> unit) -> -?on_learnt:(t -> Clause.t -> unit) -> ?on_gc:(t -> lit array -> unit) -> ?stat:Sidekick_util.Stat.t -> -?size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : descr:string -> size:int -> t -> clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit Solver_intf.sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of (litclauseproof_step) Solver_intf.unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : t -> pool:clause_pool_id -> lit list -> proof_step -> unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : t -> pool:clause_pool_id -> lit array -> proof_step -> unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:(unit -> unit) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of (litclauseproof_step) Solver_intf.unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : ?assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file +Make_pure_sat (sidekick.Sidekick_sat.Solver.Make_pure_sat)

Module Solver.Make_pure_sat

Parameters

Signature

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit = Th.lit

literals

module Lit = Th.Lit
type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory = unit
type proof = Th.proof

A representation of a full proof

type proof_step = Th.proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof = Th.Proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : + ?on_conflict:( t -> Clause.t -> unit ) -> + ?on_decision:( t -> lit -> unit ) -> + ?on_learnt:( t -> Clause.t -> unit ) -> + ?on_gc:( t -> lit array -> unit ) -> + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Tiny | `Small | `Big ] -> + proof:Proof.t -> + theory -> + t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : + descr:string -> + size:int -> + t -> + clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit Solver_intf.sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of ( lit, clause, proof_step ) Solver_intf.unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : + t -> + pool:clause_pool_id -> + lit list -> + proof_step -> + unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : + t -> + pool:clause_pool_id -> + lit array -> + proof_step -> + unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:( unit -> unit ) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving. Can raise Resource_exhausted to stop solving.

  • raises Resource_exhausted

    if the on_progress handler raised it to stop

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> Solver_intf.lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of ( lit, clause, proof_step ) Solver_intf.unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : + ?assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver/index.html b/dev/sidekick/Sidekick_sat/Solver/index.html index 5f9fda3e..a40901bb 100644 --- a/dev/sidekick/Sidekick_sat/Solver/index.html +++ b/dev/sidekick/Sidekick_sat/Solver/index.html @@ -1,4 +1,18 @@ -Solver (sidekick.Sidekick_sat.Solver)

Module Sidekick_sat.Solver

module type S = Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat (Th : Solver_intf.PLUGIN_SAT) : S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and type proof_step = Th.proof_step and module Proof -= Th.Proof and type theory = unit
module Make_cdcl_t (Th : Solver_intf.PLUGIN_CDCL_T) : S with type lit = Th.lit and module Lit = Th.Lit and type proof = Th.proof and type proof_step = Th.proof_step and module Proof -= Th.Proof and type theory = Th.t
\ No newline at end of file +Solver (sidekick.Sidekick_sat.Solver)

Module Sidekick_sat.Solver

module type S = Solver_intf.S

Safe external interface of solvers.

module Make_pure_sat + (Th : Solver_intf.PLUGIN_SAT) : + S + with type lit = Th.lit + and module Lit = Th.Lit + and type proof = Th.proof + and type proof_step = Th.proof_step + and module Proof = Th.Proof + and type theory = unit
module Make_cdcl_t + (Th : Solver_intf.PLUGIN_CDCL_T) : + S + with type lit = Th.lit + and module Lit = Th.Lit + and type proof = Th.proof + and type proof_step = Th.proof_step + and module Proof = Th.Proof + and type theory = Th.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/Clause_pool_id/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/Clause_pool_id/index.html index 7c538ed0..efdc816e 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/Clause_pool_id/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/Clause_pool_id/index.html @@ -1,2 +1,2 @@ -Clause_pool_id (sidekick.Sidekick_sat.Solver_intf.Clause_pool_id)

Module Solver_intf.Clause_pool_id

type t = private int
val _unsafe_of_int : int -> t
\ No newline at end of file +Clause_pool_id (sidekick.Sidekick_sat.Solver_intf.Clause_pool_id)

Module Solver_intf.Clause_pool_id

type t = private int
val _unsafe_of_int : int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/index.html index 53f6b8b8..dc77ec33 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/index.html @@ -1,2 +1,10 @@ -Solver_intf (sidekick.Sidekick_sat.Solver_intf)

Module Sidekick_sat.Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type lit = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('lit, 'clause, 'proof) unsat_state = (module UNSAT_STATE with type clause = 'clause and type lit = 'lit and type proof = 'proof)

The type of values returned when the solver reaches an UNSAT state.

type same_sign = bool

This type is used during the normalisation of lits. true means the literal stayed the same, false that its sign was flipped.

type ('lit, 'proof) reason =
| Consequence of unit -> 'lit list * 'proof

The type of reasons for propagations of a lit f.

Consequence (l, p) means that the lits in l imply the propagated lit f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined(*

Valuation of an atom

*)
module Clause_pool_id : sig ... end
module type ACTS = sig ... end

Actions available to the Plugin

type ('lit, 'proof, 'proof_step) acts = (module ACTS with type lit = 'lit and type proof = 'proof and type proof_step = 'proof_step)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type LIT = sig ... end

lits

module type PROOF = Sidekick_core.SAT_PROOF
module type PLUGIN_CDCL_T = sig ... end

Signature for theories to be given to the CDCL(T) solver

module type PLUGIN_SAT = sig ... end

Signature for pure SAT solvers

module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file +Solver_intf (sidekick.Sidekick_sat.Solver_intf)

Module Sidekick_sat.Solver_intf

Interface for Solvers

This modules defines the safe external interface for solvers. Solvers that implements this interface can be obtained using the Make functor in Solver or Mcsolver.

type 'a printer = Stdlib.Format.formatter -> 'a -> unit
module type SAT_STATE = sig ... end
type 'form sat_state = (module SAT_STATE with type lit = 'form)

The type of values returned when the solver reaches a SAT state.

module type UNSAT_STATE = sig ... end
type ('lit, 'clause, 'proof) unsat_state = + (module UNSAT_STATE + with type clause = 'clause + and type lit = 'lit + and type proof = 'proof)

The type of values returned when the solver reaches an UNSAT state.

type same_sign = bool

This type is used during the normalisation of lits. true means the literal stayed the same, false that its sign was flipped.

type ('lit, 'proof) reason =
| Consequence of unit -> 'lit list * 'proof

The type of reasons for propagations of a lit f.

Consequence (l, p) means that the lits in l imply the propagated lit f. The proof should be a proof of the clause "l implies f".

invariant: in Consequence (fun () -> l,p), all elements of l must be true in the current trail.

note on lazyiness: the justification is suspended (using unit -> …) to avoid potentially costly computations that might never be used if this literal is backtracked without participating in a conflict. Therefore the function that produces (l,p) needs only be safe in trails (partial models) that are conservative extensions of the current trail. If the theory isn't robust w.r.t. extensions of the trail (e.g. if its internal state undergoes significant changes), it can be easier to produce the explanation eagerly when propagating, and then use Consequence (fun () -> expl, proof) with the already produced (expl,proof) tuple.

type lbool =
| L_true
| L_false
| L_undefined(*

Valuation of an atom

*)
module Clause_pool_id : sig ... end
module type ACTS = sig ... end

Actions available to the Plugin

type ('lit, 'proof, 'proof_step) acts = + (module ACTS + with type lit = 'lit + and type proof = 'proof + and type proof_step = 'proof_step)

The type for a slice of assertions to assume/propagate in the theory.

exception No_proof
module type LIT = sig ... end

lits

module type PROOF = Sidekick_core.SAT_PROOF
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

exception Resource_exhausted

Can be raised in a progress handler

module type S = sig ... end

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html index 883d24e3..b58bd64c 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-ACTS/index.html @@ -1,2 +1,2 @@ -ACTS (sidekick.Sidekick_sat.Solver_intf.ACTS)

Module type Solver_intf.ACTS

Actions available to the Plugin

The plugin provides callbacks for the SAT solver to use. These callbacks are provided with a (module ACTS) so they can modify the SAT solver by adding new lemmas, raise conflicts, etc.

type lit
type proof
type proof_step
type clause_pool_id = Clause_pool_id.t
val proof : proof
val iter_assumptions : (lit -> unit) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> lbool

Obtain current value of the given literal

val add_lit : ?default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?keep:bool -> lit list -> proof_step -> 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.

    • C_use_allocator alloc puts the clause in the given allocator.
val add_clause_in_pool : pool:clause_pool_id -> lit list -> proof_step -> unit

Like add_clause but uses a custom clause pool for the clause, with its own lifetime.

val raise_conflict : lit list -> proof_step -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> (litproof_step) reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file +ACTS (sidekick.Sidekick_sat.Solver_intf.ACTS)

Module type Solver_intf.ACTS

Actions available to the Plugin

The plugin provides callbacks for the SAT solver to use. These callbacks are provided with a (module ACTS) so they can modify the SAT solver by adding new lemmas, raise conflicts, etc.

type lit
type proof
type proof_step
type clause_pool_id = Clause_pool_id.t
val proof : proof
val iter_assumptions : ( lit -> unit ) -> unit

Traverse the new assumptions on the boolean trail.

val eval_lit : lit -> lbool

Obtain current value of the given literal

val add_lit : ?default_pol:bool -> lit -> unit

Map the given lit to an internal atom, which will be decided by the SAT solver.

val add_clause : ?keep:bool -> lit list -> proof_step -> 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.

    • C_use_allocator alloc puts the clause in the given allocator.
val add_clause_in_pool : pool:clause_pool_id -> lit list -> proof_step -> unit

Like add_clause but uses a custom clause pool for the clause, with its own lifetime.

val raise_conflict : lit list -> proof_step -> 'b

Raise a conflict, yielding control back to the solver. The list of atoms must be a valid theory lemma that is false in the current trail.

val propagate : lit -> ( lit, proof_step ) reason -> unit

Propagate a lit, i.e. the theory can evaluate the lit to be true (see the definition of eval_res

val add_decision_lit : lit -> bool -> unit

Ask the SAT solver to decide on the given lit with given sign before it can answer SAT. The order of decisions is still unspecified. Useful for theory combination. This will be undone on backtracking.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html index 55d9c3e0..db25f6c3 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-LIT/index.html @@ -1,2 +1,2 @@ -LIT (sidekick.Sidekick_sat.Solver_intf.LIT)

Module type Solver_intf.LIT

lits

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +LIT (sidekick.Sidekick_sat.Solver_intf.LIT)

Module type Solver_intf.LIT

lits

type t

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html index 5d020d7e..c1ef23fe 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Lit)

Module PLUGIN_CDCL_T.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/Step_vec/index.html index 26c83513..17f857f5 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html index e6e7c4a2..390dc0d7 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T.Proof)

Module PLUGIN_CDCL_T.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html index 8e5eb351..32d1f967 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_CDCL_T/index.html @@ -1,2 +1,3 @@ -PLUGIN_CDCL_T (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

type lit
module Lit : LIT with type t = lit

lits

type proof

Proof storage/recording

type proof_step

Identifier for a clause precendently added/proved

module Proof : PROOF with type t = proof and type lit = lit and type proof_step = proof_step
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 -> (litproofproof_step) acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> (litproofproof_step) acts -> unit

Called at the end of the search in case a model has been found. If no new clause is pushed, then proof search ends and "sat" is returned; if lemmas are added, search is resumed; if a conflict clause is added, search backtracks and then resumes.

\ No newline at end of file +PLUGIN_CDCL_T (sidekick.Sidekick_sat.Solver_intf.PLUGIN_CDCL_T)

Module type Solver_intf.PLUGIN_CDCL_T

Signature for theories to be given to the CDCL(T) solver

type t

The plugin state itself

type lit
module Lit : LIT with type t = lit

lits

type proof

Proof storage/recording

type proof_step

Identifier for a clause precendently added/proved

module Proof : + PROOF with type t = proof and type lit = lit and type proof_step = proof_step
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 -> ( lit, proof, proof_step ) acts -> unit

Assume the lits in the slice, possibly using the slice to push new lits to be propagated or to raising a conflict or to add new lemmas.

val final_check : t -> ( lit, proof, proof_step ) 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/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html index 825a43b5..eb5be118 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Lit)

Module PLUGIN_SAT.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +Lit (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Lit)

Module PLUGIN_SAT.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/Step_vec/index.html index 9ba2d13b..64387522 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html index 31690ca3..2050af34 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Proof)

Module PLUGIN_SAT.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT.Proof)

Module PLUGIN_SAT.Proof

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step = proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html index 85cab03b..80fb4db3 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-PLUGIN_SAT/index.html @@ -1,2 +1,3 @@ -PLUGIN_SAT (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

type lit
module Lit : LIT with type t = lit

lits

type proof
type proof_step
module Proof : PROOF with type t = proof and type lit = lit and type proof_step = proof_step
\ No newline at end of file +PLUGIN_SAT (sidekick.Sidekick_sat.Solver_intf.PLUGIN_SAT)

Module type Solver_intf.PLUGIN_SAT

Signature for pure SAT solvers

type lit
module Lit : LIT with type t = lit

lits

type proof
type proof_step
module Proof : + PROOF with type t = proof and type lit = lit and type proof_step = proof_step
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html index adf36125..f7c9ec51 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Clause/index.html @@ -1,2 +1,2 @@ -Clause (sidekick.Sidekick_sat.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t
val pp : store -> t printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file +Clause (sidekick.Sidekick_sat.Solver_intf.S.Clause)

Module S.Clause

type t = clause
val equal : t -> t -> bool
module Tbl : Stdlib.Hashtbl.S with type key = t
val pp : store -> t printer

Print the clause

val short_name : store -> t -> string

Short name for a clause. Unspecified

val n_atoms : store -> t -> int
val lits_iter : store -> t -> lit Iter.t

Literals of a clause

val lits_a : store -> t -> lit array

Atoms of a clause

val lits_l : store -> t -> lit list

List of atoms of a clause

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html index 459e7cf1..4212a36d 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_sat.Solver_intf.S.Lit)

Module S.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file +Lit (sidekick.Sidekick_sat.Solver_intf.S.Lit)

Module S.Lit

lits

type t = lit

The type of atomic lits over terms.

val equal : t -> t -> bool

Equality over lits.

val hash : t -> int

Hashing function for lits. Should be such that two lits equal according to Expr_intf.S.equal have the same hash.

val pp : t printer

Printing function used among other thing for debugging.

val neg : t -> t

Formula negation

val norm_sign : t -> t * same_sign

Returns a 'normalized' form of the lit, possibly same_sign (in which case return false). norm must be so that a and neg a normalise to the same lit, but one returns false and the other true.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/Step_vec/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/Step_vec/index.html index c635eac0..18c6b546 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/Step_vec/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_sat.Solver_intf.S.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_sat.Solver_intf.S.Proof.Step_vec)

Module Proof.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html index 9e4d9d5b..6d3f9cb5 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/Proof/index.html @@ -1,2 +1,2 @@ -Proof (sidekick.Sidekick_sat.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file +Proof (sidekick.Sidekick_sat.Solver_intf.S.Proof)

Module S.Proof

A module to manipulate proofs.

type t = proof

The stored proof (possibly nil, possibly on disk, possibly in memory)

type proof_step

identifier for a proof

A vector of steps

type lit = lit

A boolean literal for the proof trace

type proof_rule = t -> proof_step

A proof proof_rule constructor, used to obtain proofs from theories

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html index 841af84f..a9eb689a 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-S/index.html @@ -1,4 +1,28 @@ -S (sidekick.Sidekick_sat.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : LIT with type t = lit

lits

type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory
type proof

A representation of a full proof

type proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : ?on_conflict:(t -> Clause.t -> unit) -> ?on_decision:(t -> lit -> unit) -> -?on_learnt:(t -> Clause.t -> unit) -> ?on_gc:(t -> lit array -> unit) -> ?stat:Sidekick_util.Stat.t -> -?size:[ `Tiny | `Small | `Big ] -> proof:Proof.t -> theory -> t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : descr:string -> size:int -> t -> clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of (litclauseproof_step) unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : t -> pool:clause_pool_id -> lit list -> proof_step -> unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : t -> pool:clause_pool_id -> lit array -> proof_step -> unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:(unit -> unit) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of (litclauseproof_step) unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : ?assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file +S (sidekick.Sidekick_sat.Solver_intf.S)

Module type Solver_intf.S

The external interface implemented by safe solvers, such as the one created by the Solver.Make and Mcsolver.Make functors.

Internal modules

These are the internal modules used, you should probably not use them if you're not familiar with the internals of mSAT.

type lit

literals

module Lit : LIT with type t = lit

lits

type clause
type clause_pool_id

Pool of clauses, with its own lifetime management

type theory
type proof

A representation of a full proof

type proof_step
type solver

The main solver type.

type store

Stores atoms, clauses, etc.

module Clause : sig ... end
module Proof : PROOF with type lit = lit and type t = proof

A module to manipulate proofs.

Main Solver Type

type t = solver

Main solver type, containing all state for solving.

val create : + ?on_conflict:( t -> Clause.t -> unit ) -> + ?on_decision:( t -> lit -> unit ) -> + ?on_learnt:( t -> Clause.t -> unit ) -> + ?on_gc:( t -> lit array -> unit ) -> + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Tiny | `Small | `Big ] -> + proof:Proof.t -> + theory -> + t

Create new solver

  • parameter theory

    the theory

  • parameter the

    proof

  • parameter size

    the initial size of internal data structures. The bigger, the faster, but also the more RAM it uses.

val theory : t -> theory

Access the theory state

val store : t -> store

Store for the solver

val stat : t -> Sidekick_util.Stat.t

Statistics

val proof : t -> proof

Access the inner proof

Clause Pools

Clause pools.

A clause pool holds/owns a set of clauses, and is responsible for managing their lifetime. We only expose an id, not a private type.

val clause_pool_descr : t -> clause_pool_id -> string
val new_clause_pool_gc_fixed_size : + descr:string -> + size:int -> + t -> + clause_pool_id

Allocate a new clause pool that GC's its clauses when its size goes above size. It keeps half of the clauses.

Types

type res =
| Sat of lit sat_state(*

Returned when the solver reaches SAT, with a model

*)
| Unsat of ( lit, clause, proof_step ) unsat_state(*

Returned when the solver reaches UNSAT, with a proof

*)

Result type for the solver

exception UndecidedLit

Exception raised by the evaluating functions when a literal has not yet been assigned a value.

Base operations

val assume : t -> lit list list -> unit

Add the list of clauses to the current set of assumptions. Modifies the sat solver state in place.

val add_clause : t -> lit list -> proof_step -> unit

Lower level addition of clauses

val add_clause_a : t -> lit array -> proof_step -> unit

Lower level addition of clauses

val add_input_clause : t -> lit list -> unit

Like add_clause but with the justification of being an input clause

val add_input_clause_a : t -> lit array -> unit

Like add_clause_a but with justification of being an input clause

val add_clause_in_pool : + t -> + pool:clause_pool_id -> + lit list -> + proof_step -> + unit

Like add_clause but using a specific clause pool

val add_clause_a_in_pool : + t -> + pool:clause_pool_id -> + lit array -> + proof_step -> + unit

Like add_clause_a but using a specific clause pool

Solving

val solve : ?on_progress:( unit -> unit ) -> ?assumptions:lit list -> t -> res

Try and solves the current set of clauses.

  • parameter assumptions

    additional atomic assumptions to be temporarily added. The assumptions are just used for this call to solve, they are not saved in the solver's state.

  • parameter on_progress

    regularly called during solving. Can raise Resource_exhausted to stop solving.

  • raises Resource_exhausted

    if the on_progress handler raised it to stop

Evaluating and adding literals

val add_lit : t -> ?default_pol:bool -> lit -> unit

Ensure the SAT solver handles this particular literal, ie add a boolean variable for it if it's not already there.

val set_default_pol : t -> lit -> bool -> unit

Set default polarity for the given boolean variable. Sign of the literal is ignored.

val true_at_level0 : t -> lit -> bool

true_at_level0 a returns true if a was proved at level0, i.e. it must hold in all models

val eval_lit : t -> lit -> lbool

Evaluate atom in current state

Assumption stack

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of ( lit, clause, proof_step ) unsat_state

Result returned by check_sat_propagations_only

val check_sat_propagations_only : + ?assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses the added clauses and local assumptions (using push_assumptions and assumptions) to quickly assess whether the context is satisfiable. It is not complete; calling solve is required to get an accurate result.

  • returns

    either Ok() if propagation yielded no conflict, or Error c if a conflict clause c was found.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html index 11d434d0..81273607 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-SAT_STATE/index.html @@ -1,2 +1,2 @@ -SAT_STATE (sidekick.Sidekick_sat.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

  • raises UndecidedLit

    if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

  • raises UndecidedLit

    if the literal is not decided

val iter_trail : (lit -> unit) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file +SAT_STATE (sidekick.Sidekick_sat.Solver_intf.SAT_STATE)

Module type Solver_intf.SAT_STATE

type lit

Literals (signed boolean atoms)

val eval : lit -> bool

Returns the valuation of a lit in the current state of the sat solver.

  • raises UndecidedLit

    if the literal is not decided

val eval_level : lit -> bool * int

Return the current assignement of the literals, as well as its decision level. If the level is 0, then it is necessary for the literal to have this value; otherwise it is due to choices that can potentially be backtracked.

  • raises UndecidedLit

    if the literal is not decided

val iter_trail : ( lit -> unit ) -> unit

Iter through the lits in order of decision/propagation (starting from the first propagation, to the last propagation).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html index 70108095..ef3af695 100644 --- a/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html +++ b/dev/sidekick/Sidekick_sat/Solver_intf/module-type-UNSAT_STATE/index.html @@ -1,2 +1,2 @@ -UNSAT_STATE (sidekick.Sidekick_sat.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type lit
type clause
type proof
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val unsat_assumptions : unit -> lit Iter.t

Subset of assumptions responsible for "unsat"

val unsat_proof : unit -> proof
\ No newline at end of file +UNSAT_STATE (sidekick.Sidekick_sat.Solver_intf.UNSAT_STATE)

Module type Solver_intf.UNSAT_STATE

type lit
type clause
type proof
val unsat_conflict : unit -> clause

Returns the unsat clause found at the toplevel

val unsat_assumptions : unit -> lit Iter.t

Subset of assumptions responsible for "unsat"

val unsat_proof : unit -> proof
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat/index.html b/dev/sidekick/Sidekick_sat/index.html index 18653f94..99386dd8 100644 --- a/dev/sidekick/Sidekick_sat/index.html +++ b/dev/sidekick/Sidekick_sat/index.html @@ -1,2 +1,3 @@ -Sidekick_sat (sidekick.Sidekick_sat)

Module Sidekick_sat

Main API

module Solver_intf : sig ... end

Interface for Solvers

module type S = Solver_intf.S
module type LIT = Solver_intf.LIT
module type PLUGIN_CDCL_T = Solver_intf.PLUGIN_CDCL_T
module type PROOF = Solver_intf.PROOF
type lbool = Solver_intf.lbool =
| L_true
| L_false
| L_undefined
module type SAT_STATE = Solver_intf.SAT_STATE
type 'form sat_state = 'form Solver_intf.sat_state
type ('lit, 'proof) reason = ('lit'proof) Solver_intf.reason =
| Consequence of unit -> 'lit list * 'proof
module type ACTS = Solver_intf.ACTS
type ('lit, 'proof, 'proof_step) acts = ('lit'proof'proof_step) Solver_intf.acts
type negated = bool
val pp_lbool : Stdlib.Format.formatter -> lbool -> unit

Print lbool values

exception No_proof
module Solver : sig ... end
module Make_cdcl_t = Solver.Make_cdcl_t
module Make_pure_sat = Solver.Make_pure_sat
module Proof_dummy : sig ... end

Module for dummy proofs based on unit

\ No newline at end of file +Sidekick_sat (sidekick.Sidekick_sat)

Module Sidekick_sat

Main API

module Solver_intf : sig ... end

Interface for Solvers

module type S = Solver_intf.S
module type LIT = Solver_intf.LIT
module type PLUGIN_CDCL_T = Solver_intf.PLUGIN_CDCL_T
module type PROOF = Solver_intf.PROOF
type lbool = Solver_intf.lbool =
| L_true
| L_false
| L_undefined
module type SAT_STATE = Solver_intf.SAT_STATE
type 'form sat_state = 'form Solver_intf.sat_state
type ('lit, 'proof) reason = ( 'lit, 'proof ) Solver_intf.reason =
| Consequence of unit -> 'lit list * 'proof
module type ACTS = Solver_intf.ACTS
type ('lit, 'proof, 'proof_step) acts = + ( 'lit, 'proof, 'proof_step ) Solver_intf.acts
type negated = bool
val pp_lbool : Stdlib.Format.formatter -> lbool -> unit

Print lbool values

exception No_proof
exception Resource_exhausted
module Solver : sig ... end
module Make_cdcl_t = Solver.Make_cdcl_t
module Make_pure_sat = Solver.Make_pure_sat
module Proof_dummy : sig ... end

Module for dummy proofs based on unit

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__/.dune-keep b/dev/sidekick/Sidekick_sat__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__/index.html b/dev/sidekick/Sidekick_sat__/index.html deleted file mode 100644 index a860e63c..00000000 --- a/dev/sidekick/Sidekick_sat__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__ (sidekick.Sidekick_sat__)

Module Sidekick_sat__

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Heap/.dune-keep b/dev/sidekick/Sidekick_sat__Heap/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__Heap/index.html b/dev/sidekick/Sidekick_sat__Heap/index.html deleted file mode 100644 index 2bf3c0fc..00000000 --- a/dev/sidekick/Sidekick_sat__Heap/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__Heap (sidekick.Sidekick_sat__Heap)

Module Sidekick_sat__Heap

\ 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 deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__Heap_intf/index.html b/dev/sidekick/Sidekick_sat__Heap_intf/index.html deleted file mode 100644 index 740940e7..00000000 --- a/dev/sidekick/Sidekick_sat__Heap_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__Heap_intf (sidekick.Sidekick_sat__Heap_intf)

Module Sidekick_sat__Heap_intf

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Proof_dummy/.dune-keep b/dev/sidekick/Sidekick_sat__Proof_dummy/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__Proof_dummy/index.html b/dev/sidekick/Sidekick_sat__Proof_dummy/index.html deleted file mode 100644 index 6a1c2414..00000000 --- a/dev/sidekick/Sidekick_sat__Proof_dummy/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__Proof_dummy (sidekick.Sidekick_sat__Proof_dummy)

Module Sidekick_sat__Proof_dummy

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_sat__Solver/.dune-keep b/dev/sidekick/Sidekick_sat__Solver/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__Solver/index.html b/dev/sidekick/Sidekick_sat__Solver/index.html deleted file mode 100644 index e78871af..00000000 --- a/dev/sidekick/Sidekick_sat__Solver/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__Solver (sidekick.Sidekick_sat__Solver)

Module Sidekick_sat__Solver

\ 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 deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sat__Solver_intf/index.html b/dev/sidekick/Sidekick_sat__Solver_intf/index.html deleted file mode 100644 index f03fc841..00000000 --- a/dev/sidekick/Sidekick_sat__Solver_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_sat__Solver_intf (sidekick.Sidekick_sat__Solver_intf)

Module Sidekick_sat__Solver_intf

\ No newline at end of file diff --git a/dev/sidekick-base/Sidekick_base_proof_trace__Storage/.dune-keep b/dev/sidekick/Sidekick_sigs/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base_proof_trace__Storage/.dune-keep rename to dev/sidekick/Sidekick_sigs/.dummy diff --git a/dev/sidekick/Sidekick_sigs/.dune-keep b/dev/sidekick/Sidekick_sigs/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_sigs/index.html b/dev/sidekick/Sidekick_sigs/index.html index cd985230..92349cfa 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 8e18dff4..5a36d0ad 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 33098612..b47f74b7 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 5beb334f..b0950955 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 54fec14e..420511f4 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-base/Sidekick_base_solver/.dune-keep b/dev/sidekick/Sidekick_simplex/.dummy similarity index 100% rename from dev/sidekick-base/Sidekick_base_solver/.dune-keep rename to dev/sidekick/Sidekick_simplex/.dummy diff --git a/dev/sidekick/Sidekick_simplex/Binary_op/index.html b/dev/sidekick/Sidekick_simplex/Binary_op/index.html new file mode 100644 index 00000000..6a4b573a --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Binary_op/index.html @@ -0,0 +1,2 @@ + +Binary_op (sidekick.Sidekick_simplex.Binary_op)

Module Sidekick_simplex.Binary_op

type t =
| Plus
| Minus
val to_string : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/Infix/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/Infix/index.html new file mode 100644 index 00000000..3f0861f0 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick.Sidekick_simplex.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_simplex/Linear_expr/Make/Comb/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/index.html new file mode 100644 index 00000000..5ca0aa54 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick.Sidekick_simplex.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

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.

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_simplex/Linear_expr/Make/Constr/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Constr/index.html new file mode 100644 index 00000000..1faf72a9 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick.Sidekick_simplex.Linear_expr.Make.Constr)

Module Make.Constr

Linear constraints.

Represents constraints on linear expressions.

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 -> Linear_expr_intf.bool_op -> t
val make : Comb.t -> 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 expr : t -> Expr.t

Extract the given part from a constraint.

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_simplex/Linear_expr/Make/Expr/Infix/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/Infix/index.html new file mode 100644 index 00000000..fe130156 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (sidekick.Sidekick_simplex.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_simplex/Linear_expr/Make/Expr/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/index.html new file mode 100644 index 00000000..6b84b17f --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick.Sidekick_simplex.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

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.

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_simplex/Linear_expr/Make/argument-1-C/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-1-C/index.html new file mode 100644 index 00000000..025ecf8c --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-1-C/index.html @@ -0,0 +1,2 @@ + +C (sidekick.Sidekick_simplex.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/Simplex2/module-type-VAR/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-2-Var/index.html similarity index 69% rename from dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html rename to dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-2-Var/index.html index 70904f95..87c7b88c 100644 --- a/dev/sidekick/Sidekick_arith_lra/Simplex2/module-type-VAR/index.html +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/argument-2-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_simplex.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_simplex/Linear_expr/Make/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/index.html new file mode 100644 index 00000000..314bd49b --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/Make/index.html @@ -0,0 +1,2 @@ + +Make (sidekick.Sidekick_simplex.Linear_expr.Make)

Module Linear_expr.Make

Parameters

module C : COEFF
module Var : VAR

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 = Var.t -> C.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_simplex/Linear_expr/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr/index.html new file mode 100644 index 00000000..bf849dca --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr/index.html @@ -0,0 +1,5 @@ + +Linear_expr (sidekick.Sidekick_simplex.Linear_expr)

Module Sidekick_simplex.Linear_expr

Arithmetic expressions

module type COEFF = Linear_expr_intf.COEFF
module type VAR = Linear_expr_intf.VAR
module type S = Linear_expr_intf.S
type nonrec bool_op = Linear_expr_intf.bool_op =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
module Make + (C : COEFF) + (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_simplex/Linear_expr_intf/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/index.html new file mode 100644 index 00000000..3396395a --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/index.html @@ -0,0 +1,2 @@ + +Linear_expr_intf (sidekick.Sidekick_simplex.Linear_expr_intf)

Module Sidekick_simplex.Linear_expr_intf

Linear expressions interface

module type COEFF = sig ... end
module type VAR = sig ... end
type bool_op = Predicate.t =
| Leq
| Geq
| Lt
| Gt
| Eq
| Neq
type op = Binary_op.t =
| Plus
| Minus

Linear expressions & formulas

module type S = sig ... end

Linear expressions & formulas.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-COEFF/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-COEFF/index.html new file mode 100644 index 00000000..30b09e3f --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-COEFF/index.html @@ -0,0 +1,2 @@ + +COEFF (sidekick.Sidekick_simplex.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_simplex/Linear_expr_intf/module-type-S/C/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/C/index.html new file mode 100644 index 00000000..dbf0f85a --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/C/index.html @@ -0,0 +1,2 @@ + +C (sidekick.Sidekick_simplex.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/Make/Comb/Infix/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Comb/Infix/index.html similarity index 74% rename from dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html rename to dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Comb/Infix/index.html index 2398666c..109c4295 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Comb/Infix/index.html +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/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_simplex.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_simplex/Linear_expr_intf/module-type-S/Comb/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Comb/index.html new file mode 100644 index 00000000..2825e690 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Comb/index.html @@ -0,0 +1,2 @@ + +Comb (sidekick.Sidekick_simplex.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

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.

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_simplex/Linear_expr_intf/module-type-S/Constr/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Constr/index.html new file mode 100644 index 00000000..9d2fbf8d --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Constr/index.html @@ -0,0 +1,2 @@ + +Constr (sidekick.Sidekick_simplex.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/Make/Expr/Infix/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Expr/Infix/index.html similarity index 74% rename from dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html rename to dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Expr/Infix/index.html index 57751629..6da323c0 100644 --- a/dev/sidekick/Sidekick_arith_lra/Linear_expr/Make/Expr/Infix/index.html +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/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_simplex.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_simplex/Linear_expr_intf/module-type-S/Expr/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Expr/index.html new file mode 100644 index 00000000..3c45a4be --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Expr/index.html @@ -0,0 +1,2 @@ + +Expr (sidekick.Sidekick_simplex.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

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.

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_simplex/Linear_expr_intf/module-type-S/Var/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Var/index.html new file mode 100644 index 00000000..43409e80 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick.Sidekick_simplex.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_simplex/Linear_expr_intf/module-type-S/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/index.html new file mode 100644 index 00000000..3ba25719 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (sidekick.Sidekick_simplex.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 key = var

Maps from variables, used for expressions as well as substitutions.

type subst = Var.t -> C.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_simplex/Linear_expr_intf/module-type-VAR/index.html b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-VAR/index.html new file mode 100644 index 00000000..cf382898 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Linear_expr_intf/module-type-VAR/index.html @@ -0,0 +1,2 @@ + +VAR (sidekick.Sidekick_simplex.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_simplex/Make/Constraint/index.html b/dev/sidekick/Sidekick_simplex/Make/Constraint/index.html new file mode 100644 index 00000000..7a6e086c --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_simplex.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_simplex/Make/Subst/index.html b/dev/sidekick/Sidekick_simplex/Make/Subst/index.html new file mode 100644 index 00000000..6e1cc48f --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_simplex.Make.Subst)

Module Make.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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_simplex/Make/Unsat_cert/index.html b/dev/sidekick/Sidekick_simplex/Make/Unsat_cert/index.html new file mode 100644 index 00000000..8485910b --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_simplex.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_simplex/Make/argument-1-Arg/Q/index.html b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Q/index.html new file mode 100644 index 00000000..e006190d --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_simplex.Make.1-Arg.Q)

Module 1-Arg.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_simplex/Make/argument-1-Arg/Var/index.html b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Var/index.html new file mode 100644 index 00000000..aab508f6 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick.Sidekick_simplex.Make.1-Arg.Var)

Module 1-Arg.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_simplex/Make/argument-1-Arg/Z/index.html b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Z/index.html new file mode 100644 index 00000000..21316130 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_simplex.Make.1-Arg.Z)

Module 1-Arg.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/index.html b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/index.html new file mode 100644 index 00000000..744ac361 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/argument-1-Arg/index.html @@ -0,0 +1,2 @@ + +Arg (sidekick.Sidekick_simplex.Make.1-Arg)

Parameter Make.1-Arg

module Z : INT
module Q : RATIONAL with type bigint = Z.t
module Var : VAR
val mk_lit : Var.t -> Op.t -> Q.t -> Var.lit

Create new literals

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/Make/index.html b/dev/sidekick/Sidekick_simplex/Make/index.html new file mode 100644 index 00000000..d2b922f1 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Make/index.html @@ -0,0 +1,16 @@ + +Make (sidekick.Sidekick_simplex.Make)

Module Sidekick_simplex.Make

Parameters

module Arg : ARG

Signature

module V = Arg.Var
module V_map : CCMap.S with type key = V.t
module Z = Arg.Z
module Q = Arg.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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/Op/index.html b/dev/sidekick/Sidekick_simplex/Op/index.html new file mode 100644 index 00000000..a03cf2e2 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Op/index.html @@ -0,0 +1,2 @@ + +Op (sidekick.Sidekick_simplex.Op)

Module Sidekick_simplex.Op

Simplex 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_simplex/Predicate/index.html b/dev/sidekick/Sidekick_simplex/Predicate/index.html new file mode 100644 index 00000000..17a97708 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/Predicate/index.html @@ -0,0 +1,2 @@ + +Predicate (sidekick.Sidekick_simplex.Predicate)

Module Sidekick_simplex.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_simplex/index.html b/dev/sidekick/Sidekick_simplex/index.html new file mode 100644 index 00000000..698bb6c8 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/index.html @@ -0,0 +1,4 @@ + +Sidekick_simplex (sidekick.Sidekick_simplex)

Module Sidekick_simplex

Fast Simplex for CDCL(T)

We follow the paper "Integrating Simplex with DPLL(T )" from de Moura and Dutertre.

module Linear_expr_intf : sig ... end
module Linear_expr : sig ... end

Arithmetic expressions

module Predicate : sig ... end
module Binary_op : sig ... end
module type INT = Sidekick_arith.INT
module type RATIONAL = Sidekick_arith.RATIONAL
module type VAR = Linear_expr_intf.VAR
module Op : sig ... end

Simplex operator

module type S = sig ... end
module type ARG = sig ... end
module Make + (Arg : ARG) : + S with module V = Arg.Var and module Z = Arg.Z and module Q = Arg.Q
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/module-type-ARG/Q/index.html b/dev/sidekick/Sidekick_simplex/module-type-ARG/Q/index.html new file mode 100644 index 00000000..019a6f7e --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-ARG/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_simplex.ARG.Q)

Module ARG.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_simplex/module-type-ARG/Var/index.html b/dev/sidekick/Sidekick_simplex/module-type-ARG/Var/index.html new file mode 100644 index 00000000..aa103ba9 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-ARG/Var/index.html @@ -0,0 +1,2 @@ + +Var (sidekick.Sidekick_simplex.ARG.Var)

Module ARG.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_simplex/module-type-ARG/Z/index.html b/dev/sidekick/Sidekick_simplex/module-type-ARG/Z/index.html new file mode 100644 index 00000000..26de977d --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-ARG/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_simplex.ARG.Z)

Module ARG.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/module-type-ARG/index.html b/dev/sidekick/Sidekick_simplex/module-type-ARG/index.html new file mode 100644 index 00000000..73d89b5d --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-ARG/index.html @@ -0,0 +1,2 @@ + +ARG (sidekick.Sidekick_simplex.ARG)

Module type Sidekick_simplex.ARG

module Z : INT
module Q : RATIONAL with type bigint = Z.t
module Var : VAR
val mk_lit : Var.t -> Op.t -> Q.t -> Var.lit

Create new literals

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/module-type-S/Constraint/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/Constraint/index.html new file mode 100644 index 00000000..572db2bb --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/Constraint/index.html @@ -0,0 +1,2 @@ + +Constraint (sidekick.Sidekick_simplex.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_simplex/module-type-S/Q/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/Q/index.html new file mode 100644 index 00000000..10412f09 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/Q/index.html @@ -0,0 +1,2 @@ + +Q (sidekick.Sidekick_simplex.S.Q)

Module S.Q

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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_simplex/module-type-S/Subst/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/Subst/index.html new file mode 100644 index 00000000..b5c63c19 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/Subst/index.html @@ -0,0 +1,2 @@ + +Subst (sidekick.Sidekick_simplex.S.Subst)

Module S.Subst

type t = num V_map.t
val eval : t -> V.t -> Q.t option
val to_iter : t -> (V.t * Q.t) Iter.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_simplex/module-type-S/Unsat_cert/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/Unsat_cert/index.html new file mode 100644 index 00000000..c50305f2 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/Unsat_cert/index.html @@ -0,0 +1,2 @@ + +Unsat_cert (sidekick.Sidekick_simplex.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_simplex/module-type-S/V/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/V/index.html new file mode 100644 index 00000000..ba361f86 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/V/index.html @@ -0,0 +1,2 @@ + +V (sidekick.Sidekick_simplex.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_simplex/module-type-S/Z/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/Z/index.html new file mode 100644 index 00000000..5bd60be8 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/Z/index.html @@ -0,0 +1,2 @@ + +Z (sidekick.Sidekick_simplex.S.Z)

Module S.Z

include Sidekick_arith.NUM
type t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_simplex/module-type-S/index.html b/dev/sidekick/Sidekick_simplex/module-type-S/index.html new file mode 100644 index 00000000..6baf8091 --- /dev/null +++ b/dev/sidekick/Sidekick_simplex/module-type-S/index.html @@ -0,0 +1,16 @@ + +S (sidekick.Sidekick_simplex.S)

Module type Sidekick_simplex.S

module V : VAR
module V_map : CCMap.S with type key = V.t
module Z : INT
module Q : RATIONAL with type bigint = Z.t
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 : ?is_int:bool -> 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 : ?is_int:bool -> t -> V.t -> unit

Make sure the variable exists in the simplex.

val add_constraint : + ?keep_on_backtracking:bool -> + ?is_int:bool -> + on_propagate:ev_on_propagate -> + t -> + Constraint.t -> + V.lit -> + unit

Add a constraint to the simplex.

This is removed upon backtracking by default.

  • parameter is_int

    declares whether the constraint's variable is an integer

  • raises Unsat

    if it's immediately obvious that this is not satisfiable.

  • parameter keep_on_backtracking

    if true (default false), the bound is not backtrackable

val declare_bound : ?is_int:bool -> t -> Constraint.t -> V.lit -> unit

Declare that this constraint exists and map it to a literal, so we can possibly propagate it later. 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. This does NOT enforce that integer variables map to integer values.

val check_branch_and_bound : + on_propagate:( V.lit -> reason:V.lit list -> unit ) -> + max_tree_nodes:int -> + t -> + result option

Try to solve and respect the integer constraints.

val n_vars : t -> int
val n_rows : t -> int
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib/.dune-keep b/dev/sidekick/Sidekick_smt_solver/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib/.dune-keep rename to dev/sidekick/Sidekick_smt_solver/.dummy diff --git a/dev/sidekick/Sidekick_smt_solver/.dune-keep b/dev/sidekick/Sidekick_smt_solver/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html index 38b6024e..eb5db8ec 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Model/index.html @@ -1,2 +1,2 @@ -Model (sidekick.Sidekick_smt_solver.Make.Model)

Module Make.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Model (sidekick.Sidekick_smt_solver.Make.Model)

Module Make.Model

Models

A model can be produced when the solver is found to be in a satisfiable state after a call to solve.

type t
val empty : t
val mem : t -> term -> bool
val find : t -> term -> term option
val eval : t -> term -> term option
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Registry/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Registry/index.html new file mode 100644 index 00000000..deb5f8f2 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_smt_solver.Make.Registry)

Module Make.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/Step_vec/index.html index 2e0e15a3..69bcd86c 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html index 9db84be0..801048e0 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html index 30ec6268..a9a71daf 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Actions/index.html @@ -1,2 +1,15 @@ -Actions (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_smt_solver.Make.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_smt_solver/Make/Solver_internal/CC/Expl/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html index 7d42810f..770b4a98 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Expl/index.html @@ -1,2 +1,2 @@ -Expl (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t
val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ No newline at end of file +Expl (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Expl)

Module CC.Expl

Explanations

Explanations are specialized proofs, created by the congruence closure when asked to justify why 2 terms are equal.

type t
val pp : t Sidekick_core.Fmt.printer
val mk_merge : N.t -> N.t -> t

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html index 17ee32b4..f7d34c4b 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/N/index.html @@ -1,2 +1,2 @@ -N (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See 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_smt_solver.Make.Solver_internal.CC.N)

Module CC.N

Equivalence classes.

An equivalence class is a set of terms that are currently equal in the partial model built by the solver. The class is represented by a collection of nodes, one of which is distinguished and is called the "representative".

All information pertaining to the whole equivalence class is stored in this representative's node.

When two classes become equal (are "merged"), one of the two representatives is picked as the representative of the new class. The new class contains the union of the two old classes' nodes.

We also allow theories to store additional information in the representative. This information can be used when two classes are merged, to detect conflicts and solve equations à la Shostak.

type t

An equivalent class, containing terms that are proved to be equal.

A value of type t points to a particular term, but see find to get the representative of the class.

val term : t -> term

Term contained in this equivalence class. If is_root n, then term n is the class' representative term.

val equal : t -> t -> bool

Are two classes physically equal? To check for logical equality, use CC.N.equal (CC.find cc n1) (CC.find cc n2) which checks for equality of representatives.

val hash : t -> int

An opaque hash of this node.

val pp : t Sidekick_core.Fmt.printer

Unspecified printing of the node, for example its term, a unique ID, etc.

val is_root : t -> bool

Is the node a root (ie the representative of its class)? See find to get the root.

val iter_class : t -> t Iter.t

Traverse the congruence class. Precondition: is_root n (see find below)

val iter_parents : t -> t Iter.t

Traverse the parents of the class. Precondition: is_root n (see find below)

type bitfield

A field in the bitfield of this node. This should only be allocated when a theory is initialized.

Bitfields are accessed using preallocated keys. See CC_S.allocate_bitfield.

All fields are initially 0, are backtracked automatically, and are merged automatically when classes are merged.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/Step_vec/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/Step_vec/index.html index 83a4d9e4..c218c221 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html index 26e90121..540833b9 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..2d3280b3 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html index bac2e94a..6184be64 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/CC/index.html @@ -1,4 +1,25 @@ -CC (sidekick.Sidekick_smt_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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_smt_solver.Make.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 push_level : t -> unit

Push backtracking level

val pop_levels : t -> int -> unit

Restore to state n calls to push_level earlier. Used during backtracking.

val get_model : t -> N.t Iter.t Iter.t

get all the equivalence classes so they can be merged in the model

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Registry/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Registry/index.html new file mode 100644 index 00000000..9db2b175 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_smt_solver.Make.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html index 9d706ed4..65c378d5 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/Simplify/index.html @@ -1,2 +1,2 @@ -Simplify (sidekick.Sidekick_smt_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_smt_solver.Make.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html index a7b3f6be..3ac878c8 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/index.html @@ -1,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_smt_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_smt_solver.Make.Solver_internal)

Module Make.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 42253bcf..694c5dfa 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_smt_solver.Make.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_smt_solver.Make.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html b/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html index af516b6b..dd4bb43c 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/Unknown/index.html @@ -1,2 +1,2 @@ -Unknown (sidekick.Sidekick_smt_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file +Unknown (sidekick.Sidekick_smt_solver.Make.Unknown)

Module Make.Unknown

type t
val pp : t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html index 8dd83adc..9c433246 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_smt_solver.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_smt_solver.Make.1-A.Lit)

Module 1-A.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/Step_vec/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/Step_vec/index.html index 1ce22cce..3c1e112e 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_smt_solver.Make.1-A.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_smt_solver.Make.1-A.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html index 7cd9286e..6326bfbf 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_smt_solver.Make.1-A.P)

Module 1-A.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_smt_solver.Make.1-A.P)

Module 1-A.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html index c99990e9..be2af77a 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_smt_solver.Make.1-A.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_smt_solver.Make.1-A.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html index 522bd60f..3266c055 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Term/index.html @@ -1,8 +1,8 @@ -Term (sidekick.Sidekick_smt_solver.Make.1-A.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+Term (sidekick.Sidekick_smt_solver.Make.1-A.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> ( t -> t ) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html index 402b661f..48269754 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick.Sidekick_smt_solver.Make.1-A.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_smt_solver.Make.1-A.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html index c5fdf584..d1b16414 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_smt_solver.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file +T (sidekick.Sidekick_smt_solver.Make.1-A.T)

Module 1-A.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html index 2bd095e6..b3fde5dd 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/argument-1-A/index.html @@ -1,2 +1,9 @@ -A (sidekick.Sidekick_smt_solver.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type term = T.Term.t and type t = proof and type proof_step = proof_step and type lit = Lit.t
val mk_eq : T.Term.store -> T.Term.t -> T.Term.t -> T.Term.t

mk_eq store t u builds the term t=u

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 +A (sidekick.Sidekick_smt_solver.Make.1-A)

Parameter Make.1-A

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type term = T.Term.t + and type t = proof + and type proof_step = proof_step + and type lit = Lit.t
val cc_view : + T.Term.t -> + ( T.Fun.t, T.Term.t, T.Term.t Iter.t ) Sidekick_core.CC_view.t
val mk_eq : T.Term.store -> T.Term.t -> T.Term.t -> T.Term.t

mk_eq store t u builds the term t=u

val is_valid_literal : T.Term.t -> bool

Is this a valid boolean literal? (e.g. is it a closed term, not inside a quantifier)

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/index.html b/dev/sidekick/Sidekick_smt_solver/Make/index.html index e64c6e37..009636aa 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/index.html @@ -1,5 +1,32 @@ -Make (sidekick.Sidekick_smt_solver.Make)

Module Sidekick_smt_solver.Make

Main functor to get a solver.

Parameters

module A : ARG

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
type proof_step = A.proof_step
module P = A.P
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +Make (sidekick.Sidekick_smt_solver.Make)

Module Sidekick_smt_solver.Make

Main functor to get a solver.

Parameters

module A : ARG

Signature

module T = A.T
module Lit = A.Lit
type proof = A.proof
type proof_step = A.proof_step
module P = A.P
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html b/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html index 4f6286a4..2740d29b 100644 --- a/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html +++ b/dev/sidekick/Sidekick_smt_solver/Make/module-type-THEORY/index.html @@ -1,2 +1,2 @@ -THEORY (sidekick.Sidekick_smt_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type 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_smt_solver.Make.THEORY)

Module type Make.THEORY

A theory

Theories are abstracted over the concrete implementation of the solver, so they can work with any implementation.

Typically a theory should be a functor taking an argument containing a SOLVER_INTERNAL or even a full SOLVER, and some additional views on terms, literals, etc. that are specific to the theory (e.g. to map terms to linear expressions). The theory can then be instantiated on any kind of solver for any term representation that also satisfies the additional theory-specific requirements. Instantiated theories (ie values of type SOLVER.theory) can be added to the solver.

type t

The theory's state

val name : string

Name of the theory (ideally, unique and short)

val create_and_setup : Solver_internal.t -> t

Instantiate the theory's state for the given (internal) solver, register callbacks, create keys, etc.

Called once for every solver this theory is added to.

val push_level : t -> unit

Push backtracking level. When the corresponding pop is called, the theory's state should be restored to a state equivalent to what it was just before push_level.

it does not have to be exactly the same state, it just needs to be equivalent.

val pop_levels : t -> int -> unit

pop_levels theory n pops n backtracking levels, restoring theory to its state before calling push_level n times.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/Registry/index.html b/dev/sidekick/Sidekick_smt_solver/Registry/index.html new file mode 100644 index 00000000..6fc5a951 --- /dev/null +++ b/dev/sidekick/Sidekick_smt_solver/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_smt_solver.Registry)

Module Sidekick_smt_solver.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/index.html b/dev/sidekick/Sidekick_smt_solver/index.html index fc81b064..ef8af522 100644 --- a/dev/sidekick/Sidekick_smt_solver/index.html +++ b/dev/sidekick/Sidekick_smt_solver/index.html @@ -1,3 +1,9 @@ -Sidekick_smt_solver (sidekick.Sidekick_smt_solver)

Module Sidekick_smt_solver

Core of the SMT solver using Sidekick_sat

Sidekick_sat (in src/sat/) is a modular SAT solver in pure OCaml.

This builds a Sidekick_core.SOLVER on top of it.

module type ARG = sig ... end

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module type S = Sidekick_core.SOLVER
module Make (A : ARG) : S with module T = A.T and type proof = A.proof and type proof_step = A.proof_step and module Lit = A.Lit and module -P = A.P

Main functor to get a solver.

\ No newline at end of file +Sidekick_smt_solver (sidekick.Sidekick_smt_solver)

Module Sidekick_smt_solver

Core of the SMT solver using Sidekick_sat

Sidekick_sat (in src/sat/) is a modular SAT solver in pure OCaml.

This builds a Sidekick_core.SOLVER on top of it.

module type ARG = sig ... end

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module type S = Sidekick_core.SOLVER
module Make + (A : ARG) : + S + with module T = A.T + and type proof = A.proof + and type proof_step = A.proof_step + and module Lit = A.Lit + and module P = A.P

Main functor to get a solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html index f5934d42..ee6903da 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/Lit/index.html @@ -1,2 +1,2 @@ -Lit (sidekick.Sidekick_smt_solver.ARG.Lit)

Module ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_smt_solver.ARG.Lit)

Module ARG.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/Step_vec/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/Step_vec/index.html index 193442ea..28b3f7a4 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_smt_solver.ARG.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_smt_solver.ARG.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html index e5769c6d..3429f07a 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_smt_solver.ARG.P)

Module ARG.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_smt_solver.ARG.P)

Module ARG.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html index 5ed35c7e..5cae109e 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Fun/index.html @@ -1,2 +1,2 @@ -Fun (sidekick.Sidekick_smt_solver.ARG.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Fun (sidekick.Sidekick_smt_solver.ARG.T.Fun)

Module T.Fun

A function symbol, like "f" or "plus" or "is_human" or "socrates"

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html index f5fb7661..ce410543 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Term/index.html @@ -1,8 +1,8 @@ -Term (sidekick.Sidekick_smt_solver.ARG.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> (t -> t) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_dag : t -> (t -> unit) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
+Term (sidekick.Sidekick_smt_solver.ARG.T.Term)

Module T.Term

Term structure.

Terms should be hashconsed, with perfect sharing. This allows, for example, Term.Tbl and Term.iter_dag to be efficient.

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store

A store used to create new terms. It is where the hashconsing table should live, along with other all-terms related store.

val ty : t -> Ty.t
val bool : store -> bool -> t

build true/false

val as_bool : t -> bool option

as_bool t is Some true if t is the term true, and similarly for false. For other terms it is None.

val abs : store -> t -> t * bool

abs t returns an "absolute value" for the term, along with the sign of t.

The idea is that we want to turn not a into (a, false), or (a != b) into (a=b, false). For terms without a negation this should return (t, true).

The store is passed in case a new term needs to be created.

val map_shallow : store -> ( t -> t ) -> t -> t

Map function on immediate subterms. This should not be recursive.

val iter_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html index e6513c5e..ecd3f636 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/Ty/index.html @@ -1,2 +1,2 @@ -Ty (sidekick.Sidekick_smt_solver.ARG.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file +Ty (sidekick.Sidekick_smt_solver.ARG.T.Ty)

Module T.Ty

Types

Types should be comparable (ideally, in O(1)), and have at least a boolean type available.

type t
val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
type store
val bool : store -> t
val is_bool : t -> bool
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html index 67bd7783..28d123d8 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/T/index.html @@ -1,2 +1,2 @@ -T (sidekick.Sidekick_smt_solver.ARG.T)

Module ARG.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file +T (sidekick.Sidekick_smt_solver.ARG.T)

Module ARG.T

module Fun : sig ... end

A function symbol, like "f" or "plus" or "is_human" or "socrates"

module Ty : sig ... end

Types

module Term : sig ... end

Term structure.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html index 9e9bc485..69a162e3 100644 --- a/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html +++ b/dev/sidekick/Sidekick_smt_solver/module-type-ARG/index.html @@ -1,2 +1,9 @@ -ARG (sidekick.Sidekick_smt_solver.ARG)

Module type Sidekick_smt_solver.ARG

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type term = T.Term.t and type t = proof and type proof_step = proof_step and type lit = Lit.t
val mk_eq : T.Term.store -> T.Term.t -> T.Term.t -> T.Term.t

mk_eq store t u builds the term t=u

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_smt_solver.ARG)

Module type Sidekick_smt_solver.ARG

Argument to pass to the functor Make in order to create a new Msat-based SMT solver.

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type term = T.Term.t + and type t = proof + and type proof_step = proof_step + and type lit = Lit.t
val cc_view : + T.Term.t -> + ( T.Fun.t, T.Term.t, T.Term.t Iter.t ) Sidekick_core.CC_view.t
val mk_eq : T.Term.store -> T.Term.t -> T.Term.t -> T.Term.t

mk_eq store t u builds the term t=u

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-bin/Sidekick_bin_lib__/.dune-keep b/dev/sidekick/Sidekick_tef/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib__/.dune-keep rename to dev/sidekick/Sidekick_tef/.dummy diff --git a/dev/sidekick/Sidekick_tef/.dune-keep b/dev/sidekick/Sidekick_tef/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_tef/index.html b/dev/sidekick/Sidekick_tef/index.html index 9f462fbb..3816f04d 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
val with_setup : (unit -> 'a) -> 'a
\ 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
val with_setup : ( unit -> 'a ) -> 'a
\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep b/dev/sidekick/Sidekick_th_bool_static/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib__Dimacs_lexer/.dune-keep rename to dev/sidekick/Sidekick_th_bool_static/.dummy diff --git a/dev/sidekick/Sidekick_th_bool_static/.dune-keep b/dev/sidekick/Sidekick_th_bool_static/.dune-keep deleted file mode 100644 index e69de29b..00000000 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 72168b3d..118d07df 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/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Lit/index.html index e8075d27..6bb1acc1 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Model/index.html index 421729f2..d3542efd 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Step_vec/index.html index 80e24742..79b73d8b 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 25c72951..5c28c66c 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,10 @@ -P (sidekick.Sidekick_th_bool_static.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Registry/index.html new file mode 100644 index 00000000..624f0ae0 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.Make.1-A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 4b4f8bca..70c3a6fe 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html index 9fa8a487..f3c6f4fe 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 2e5d9dc8..7fe8a723 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,15 @@ -Actions (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_bool_static.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 1cc8b3df..0ccefc0c 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 fc5a0c8a..def721b9 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html index f8313f33..321f34ff 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html index dc70ed31..e81ff69d 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..21806cf7 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/CC/index.html index 74f694b1..9aa52ddb 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..08706d97 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 bdf56dc2..02e1ddda 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 71fa10be..150da549 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index dba0f2bc..60ea4840 100644 --- a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/argument-1-A/S/T/Fun/index.html index c164015a..ed7022fd 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 aa4b49a0..dffefcf0 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 0e22f526..7edcd86d 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 564521a2..a4c5b355 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 2763737e..b60eb4c9 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 eaaac09e..46ba86f2 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,5 +1,37 @@ -S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 f6be27c5..d0a8fca8 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 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 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 1e05933c..5c8f7d21 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,9 @@ -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.

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.

include PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type lit := S.Lit.t and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file +A (sidekick.Sidekick_th_bool_static.Make.1-A)

Parameter Make.1-A

type term = S.T.Term.t
val view_as_bool : term -> ( term, term Iter.t ) bool_view

Project the term into the boolean view.

Make a term from the given boolean view.

include PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type lit := S.Lit.t + and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/Make/index.html b/dev/sidekick/Sidekick_th_bool_static/Make/index.html index fdd6d21d..a2538a74 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

module A : ARG

Signature

module A = A
type state

Simplify given term

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

module A : ARG

Signature

module A = A
type state

Simplify given term

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 863a5b15..3d94347f 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 PROOF = sig ... end
module type ARG = sig ... end

Argument to the theory

module type S = sig ... end

Signature

module Make (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 PROOF = sig ... end
module type ARG = sig ... end

Argument to the theory

module type S = sig ... end

Signature

module Make (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 0bce1752..be954881 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/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Lit/index.html index 46401593..90f5cd4c 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Model/index.html index f9f704b5..7ec304f0 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Step_vec/index.html index c21c2866..e863221c 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 3722a55d..002db703 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,10 @@ -P (sidekick.Sidekick_th_bool_static.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Registry/index.html new file mode 100644 index 00000000..b3cfec83 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.ARG.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html index ade5cc17..f593b6dd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html index 6e5fbb86..c40646eb 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 b3ea1e48..f5b13d8e 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,15 @@ -Actions (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_bool_static.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 4b0d997a..4c2ab0e7 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 ef918c34..438d28f8 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html index b608ad78..faeafee0 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html index 4803b2b0..80789263 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..0d2f3f77 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/CC/index.html index 4295e19c..c0d763bd 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..149776c6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 eaa1c9c8..a90f0d13 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 8e7e3dc2..00f8872e 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index c8ae6e3a..c5f63bdd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-ARG/S/T/Fun/index.html index 8d605017..77ed365b 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 ff2480f3..fd8a0e60 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 4929749d..c9f663d5 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 15c4881e..b9d874d9 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 d5a67848..9b823664 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 e059c89f..d6dfeb34 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,5 +1,37 @@ -S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 5006b797..2442818e 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 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 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 7d298806..0d02c798 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,9 @@ -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.

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.

include PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type lit := S.Lit.t and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

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 -> ( term, term Iter.t ) bool_view

Project the term into the boolean view.

Make a term from the given boolean view.

include PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type lit := S.Lit.t + and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-PROOF/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-PROOF/index.html index 9dabef08..143a10bc 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_th_bool_static.PROOF)

Module type Sidekick_th_bool_static.PROOF

type proof
type proof_step
type term
type lit
val lemma_bool_tauto : lit Iter.t -> proof -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> term list -> proof -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : term -> term -> proof -> proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:term -> proof -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:term -> proof -> proof_step

lemma ¬a ==> ite a b c = c

\ No newline at end of file +PROOF (sidekick.Sidekick_th_bool_static.PROOF)

Module type Sidekick_th_bool_static.PROOF

type proof
type proof_step
type term
type lit
val lemma_bool_tauto : lit Iter.t -> proof -> proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> term list -> proof -> proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : term -> term -> proof -> proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:term -> proof -> proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:term -> proof -> proof_step

lemma ¬a ==> ite a b c = c

\ 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 780bc6a0..88a74438 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/Lit/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Lit/index.html index db235767..e64434aa 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_bool_static.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Model/index.html index b168002f..d300735d 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Step_vec/index.html index 250cbb80..88ab75f8 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 57c48702..eb0944f2 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,10 @@ -P (sidekick.Sidekick_th_bool_static.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Registry/index.html new file mode 100644 index 00000000..829644d2 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.S.A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 700ff4e5..23f19ccd 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html index 0b210b31..eff29565 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 f3782e1d..fcbb8f7e 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,15 @@ -Actions (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_bool_static.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 4f883af4..ff589712 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 4c153407..ae366276 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html index caae3e69..080acd1b 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html index 86932264..951e0e1d 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..05523357 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/CC/index.html index 4b76a8dd..95141a73 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..bc0d1e84 --- /dev/null +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 67a72a44..2c49177f 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 b54b1d1d..a85a2aa3 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 0ad90fe3..a3153c69 100644 --- a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_bool_static.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/A/S/T/Fun/index.html index 46969eae..b5d1c88d 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 d76b708a..a621b200 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 a972ab6d..075c7b5d 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 6ed881dd..3f38492a 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 8f1cb5e4..0633b6cd 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 f7f2d0fe..0611ca44 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,5 +1,37 @@ -S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_bool_static.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 d3913958..d9c06374 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 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 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 52e7b311..f2f6b194 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,9 @@ -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.

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.

include PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type lit := S.Lit.t and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

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 -> ( term, term Iter.t ) bool_view

Project the term into the boolean view.

Make a term from the given boolean view.

include PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type lit := S.Lit.t + and type term := S.T.Term.t
val lemma_bool_tauto : S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (clause)

val lemma_bool_c : string -> S.T.Term.t list -> S.P.t -> S.P.proof_step

Basic boolean logic lemma for a clause |- c. proof_bool_c b name cs is the rule designated by name.

val lemma_bool_equiv : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

Boolean tautology lemma (equivalence)

val lemma_ite_true : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma a ==> ite a b c = b

val lemma_ite_false : ite:S.T.Term.t -> S.P.t -> S.P.proof_step

lemma ¬a ==> ite a b c = c

module Gensym : sig ... end

Fresh symbol generator.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html b/dev/sidekick/Sidekick_th_bool_static/module-type-S/index.html index 969f7224..358b97b8 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

Simplify given term

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

Simplify given term

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-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep b/dev/sidekick/Sidekick_th_cstor/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib__Dimacs_parser/.dune-keep rename to dev/sidekick/Sidekick_th_cstor/.dummy diff --git a/dev/sidekick/Sidekick_th_cstor/.dune-keep b/dev/sidekick/Sidekick_th_cstor/.dune-keep deleted file mode 100644 index e69de29b..00000000 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 7855e876..8c2cfa6b 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Model/index.html index 164d438f..ac0de249 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Step_vec/index.html index d056a8af..a9ee2fcd 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 8cfc1492..961445bc 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,10 @@ -P (sidekick.Sidekick_th_cstor.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Registry/index.html new file mode 100644 index 00000000..772a309f --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.Make.1-A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 559c2f1c..300e8399 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html index f2832920..dc0cd995 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 f5d1f82d..d25cb2f1 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,15 @@ -Actions (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_cstor.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 91243b26..692cd818 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 d9643586..fbac1bda 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html index 0d3a0f8c..ea16ea2b 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html index 0a89087a..e4f5f12f 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..4ddf5af6 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/CC/index.html index 049a7d41..d1bce2a7 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..ebd3f555 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 1137c630..855dde23 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 754567fb..91873ef5 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index c742a8af..f63a78eb 100644 --- a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/Make/argument-1-A/S/T/Fun/index.html index b897d364..08b7c9bd 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 d26c6a00..d40fb494 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 7c3c2c21..4587bafd 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 0f74c43f..50bca1e3 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 baf64573..530372af 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 994fe367..9810dbb4 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,5 +1,37 @@ -S (sidekick.Sidekick_th_cstor.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 a94998df..e6d6dc31 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 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 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 cdf141a1..2a19c0a5 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 @@ -A (sidekick.Sidekick_th_cstor.Make.1-A)

Parameter Make.1-A

val view_as_cstor : S.T.Term.t -> (S.T.Fun.tS.T.Term.t) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file +A (sidekick.Sidekick_th_cstor.Make.1-A)

Parameter Make.1-A

val view_as_cstor : S.T.Term.t -> ( S.T.Fun.t, S.T.Term.t ) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/Make/index.html b/dev/sidekick/Sidekick_th_cstor/Make/index.html index abd2cc07..88bdda98 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

module A : ARG

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

module A : ARG

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 b417b962..2faa19db 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 (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 (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/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Lit/index.html index 59f4c669..26fc4171 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Model/index.html index b2822040..eb229ade 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Step_vec/index.html index 850aee0f..895488c6 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 4c8d6172..37707562 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,10 @@ -P (sidekick.Sidekick_th_cstor.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Registry/index.html new file mode 100644 index 00000000..f91d7049 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.ARG.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 362f263e..34d87ba0 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html index b03057f2..459be863 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 962158a0..b71a4679 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,15 @@ -Actions (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_cstor.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 a2133c59..7c437985 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 3a40219c..f612bb9b 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html index 5f130252..1e8fdc6e 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html index 46a68c51..ab2f01db 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..6dda4112 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/CC/index.html index 29aef64b..69d7fe36 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..05db864c --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 869e6ee1..9e934a47 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 58d1bd26..b54cc741 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 0c845f16..671b4db1 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-ARG/S/T/Fun/index.html index 287cb30a..4a68551d 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 d2f14526..ddda28e6 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 9c4f4859..9d532a49 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 ab97f5fe..7358eb11 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 fd339cef..266afce9 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 430e38c1..d9656543 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,5 +1,37 @@ -S (sidekick.Sidekick_th_cstor.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 af5d4ade..9146ce29 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 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 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 04898d0d..ef14b1d4 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
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ 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.t, S.T.Term.t ) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Lit/index.html index 4f7b2ef6..a7644a7b 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_cstor.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Model/index.html index e69fafb8..9cd9038c 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Step_vec/index.html index e50853fd..f6286a0f 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 c9a8a652..4e75af4f 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,10 @@ -P (sidekick.Sidekick_th_cstor.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Registry/index.html new file mode 100644 index 00000000..4a18155e --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.S.A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 247bd626..e1178200 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html index 62989fc8..ed6cee0e 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 21515dcf..ceaaeef8 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,15 @@ -Actions (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_cstor.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 47e20fa1..c4941d41 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 1b1010b8..76fc468a 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html index 9e21a1d9..334481b3 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html index 4f9570a2..da8b7a31 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..3e3ffc34 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/CC/index.html index 5fca3997..45952d83 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..b5839d81 --- /dev/null +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 62600609..4ddbc89f 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 adbc62cd..372340c1 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 8a901abb..053579f6 100644 --- a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_cstor.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/A/S/T/Fun/index.html index 950e3ca7..76b36a3d 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 f02703ae..feb5545d 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 f00587b2..28a206d8 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 9ea0553f..5c8db73e 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 a89cc549..af298c43 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 2af66162..8724177b 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,5 +1,37 @@ -S (sidekick.Sidekick_th_cstor.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_cstor.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 c0d6a699..7cd6429d 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 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 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 c6186650..53867d7c 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
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ 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.t, S.T.Term.t ) cstor_view
val lemma_cstor : S.proof -> S.Lit.t Iter.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html b/dev/sidekick/Sidekick_th_cstor/module-type-S/index.html index b3b1d17a..852ede9a 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-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep b/dev/sidekick/Sidekick_th_data/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib__Drup_lexer/.dune-keep rename to dev/sidekick/Sidekick_th_data/.dummy diff --git a/dev/sidekick/Sidekick_th_data/.dune-keep b/dev/sidekick/Sidekick_th_data/.dune-keep deleted file mode 100644 index e69de29b..00000000 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 492aa1ab..60f03735 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/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/P/index.html index 960b2e48..4d3923cd 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/P/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/P/index.html @@ -1,2 +1,18 @@ -P (sidekick.Sidekick_th_data.Make.1-A.P)

Module 1-A.P

val lemma_isa_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : S.T.Term.t -> S.T.Term.t -> int -> S.P.t -> S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (S.T.Term.t * S.T.Term.t) Iter.t -> S.P.t -> S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ No newline at end of file +P (sidekick.Sidekick_th_data.Make.1-A.P)

Module 1-A.P

val lemma_isa_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : + S.T.Term.t -> + S.T.Term.t -> + int -> + S.P.t -> + S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : + (S.T.Term.t * S.T.Term.t) Iter.t -> + S.P.t -> + S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ 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 3625d5ab..6a043749 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.Make.1-A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Model/index.html index 254a1c86..ee89115a 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Step_vec/index.html index b41ff406..4aad72b9 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 a1ac2c45..3c4bbcdd 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,10 @@ -P (sidekick.Sidekick_th_data.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.Make.1-A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Registry/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Registry/index.html new file mode 100644 index 00000000..0a894af3 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.Make.1-A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index cbc81cf9..6f24b368 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html index 99e890fd..a01685eb 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 200c3170..11eee73e 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,15 @@ -Actions (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_data.Make.1-A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 91826eb6..ac4090a6 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 7a775260..c41f9fe8 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html index ce245e99..2d7edbfb 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html index 0df325e4..389c49ac 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..ecf87475 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/CC/index.html index 52771f80..2ecfd731 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..a64e53f4 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 82744df6..ea88a73f 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 c4813c4c..bee966fd 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index e84c7431..d385583f 100644 --- a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_data.Make.1-A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/Make/argument-1-A/S/T/Fun/index.html index fecde1c2..15ae8ef9 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 6b8db235..376efe99 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 5af24bae..604783f4 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 d01a58b5..589e96d2 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 62f1c9fc..e5421b62 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 57b8eb21..ee1d8ee5 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,5 +1,37 @@ -S (sidekick.Sidekick_th_data.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.Make.1-A.S)

Module 1-A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 19f043a3..cd49d077 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 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 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 b4d4e801..f7913336 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,11 @@ -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

Make a constructor application term

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

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)

module P : PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type term := S.T.Term.t and type lit := S.Lit.t
\ No newline at end of file +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.t, S.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.t, S.T.Term.t ) data_view

Try to view term as a datatype term

Make a constructor application term

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

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)

module P : + PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type term := S.T.Term.t + and type lit := S.Lit.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 87569d1d..838deb86 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

module A : ARG

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

module A : ARG

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 dbd339fa..1fbb85be 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_select of 'c * int * 't
| T_is_a of 'c * 't
| T_other of 't

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 PROOF = sig ... end
module type ARG = sig ... end
module type S = sig ... end
module Make (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_select of 'c * int * 't
| T_is_a of 'c * 't
| T_other of 't

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 PROOF = sig ... end
module type ARG = sig ... end
module type S = sig ... end
module Make (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 33cdada8..ca30cc08 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/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/P/index.html index 91611166..970529f2 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/P/index.html @@ -1,2 +1,18 @@ -P (sidekick.Sidekick_th_data.ARG.P)

Module ARG.P

val lemma_isa_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : S.T.Term.t -> S.T.Term.t -> int -> S.P.t -> S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (S.T.Term.t * S.T.Term.t) Iter.t -> S.P.t -> S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ No newline at end of file +P (sidekick.Sidekick_th_data.ARG.P)

Module ARG.P

val lemma_isa_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : + S.T.Term.t -> + S.T.Term.t -> + int -> + S.P.t -> + S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : + (S.T.Term.t * S.T.Term.t) Iter.t -> + S.P.t -> + S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ 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 49541c27..266690e1 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.ARG.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Model/index.html index 58a4b9ab..a18c3fd0 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Step_vec/index.html index f43604e5..125e4111 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.ARG.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 352dcc07..50327125 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,10 @@ -P (sidekick.Sidekick_th_data.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.ARG.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Registry/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Registry/index.html new file mode 100644 index 00000000..76fe4a0a --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.ARG.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 9aa346fc..fd621af4 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html index b0153ff0..3aef59bf 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 bac60e56..5c4c1b6e 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,15 @@ -Actions (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_data.ARG.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 2d15fde8..682a9eb4 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 050ace7b..1fd4267d 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html index e858e813..e42021fd 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html index 6052f1fe..01656e38 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..555dfd16 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/CC/index.html index 910eeaa5..5242f4fb 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_data.ARG.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..33cb157f --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.ARG.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 2c72d710..6226a6d0 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.ARG.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 4140bfe6..92b9defd 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_data.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.ARG.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index 66f68aae..d04133e0 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_data.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_data.ARG.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-ARG/S/T/Fun/index.html index 44126e33..763621bb 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 78c51d15..26f3e143 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 fd6c0b87..595382db 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 86f97d99..962e7dbb 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 b01b45a0..ecaff83e 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 a7a4f5e5..5a83c02d 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,5 +1,37 @@ -S (sidekick.Sidekick_th_data.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.ARG.S)

Module ARG.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 86a56358..4a98ebdd 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 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 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 eeaef950..87260a5e 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,11 @@ -ARG (sidekick.Sidekick_th_data.ARG)

Module type Sidekick_th_data.ARG

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

Make a constructor application term

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

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)

module P : PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type term := S.T.Term.t and type lit := S.Lit.t
\ No newline at end of file +ARG (sidekick.Sidekick_th_data.ARG)

Module type Sidekick_th_data.ARG

module Cstor : sig ... end

Constructor symbols.

val as_datatype : S.T.Ty.t -> ( Cstor.t Iter.t, S.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.t, S.T.Term.t ) data_view

Try to view term as a datatype term

Make a constructor application term

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

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)

module P : + PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type term := S.T.Term.t + and type lit := S.Lit.t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-PROOF/index.html b/dev/sidekick/Sidekick_th_data/module-type-PROOF/index.html index 3edbdca9..12813b5d 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-PROOF/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-PROOF/index.html @@ -1,2 +1,2 @@ -PROOF (sidekick.Sidekick_th_data.PROOF)

Module type Sidekick_th_data.PROOF

type term
type lit
type proof_step
type proof
val lemma_isa_cstor : cstor_t:term -> term -> proof -> proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:term -> term -> proof -> proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : term -> lit Iter.t -> proof -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : term -> proof -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : lit -> lit -> proof -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : term -> term -> int -> proof -> proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : term -> term -> proof -> proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (term * term) Iter.t -> proof -> proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ No newline at end of file +PROOF (sidekick.Sidekick_th_data.PROOF)

Module type Sidekick_th_data.PROOF

type term
type lit
type proof_step
type proof
val lemma_isa_cstor : cstor_t:term -> term -> proof -> proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:term -> term -> proof -> proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : term -> lit Iter.t -> proof -> proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : term -> proof -> proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : lit -> lit -> proof -> proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : term -> term -> int -> proof -> proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : term -> term -> proof -> proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (term * term) Iter.t -> proof -> proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ 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 a50b53ad..10b1e29c 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/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/P/index.html index 2a841114..6e5eef50 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/P/index.html @@ -1,2 +1,18 @@ -P (sidekick.Sidekick_th_data.S.A.P)

Module A.P

val lemma_isa_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : cstor_t:S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : S.T.Term.t -> S.T.Term.t -> int -> S.P.t -> S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : (S.T.Term.t * S.T.Term.t) Iter.t -> S.P.t -> S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ No newline at end of file +P (sidekick.Sidekick_th_data.S.A.P)

Module A.P

val lemma_isa_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_isa_cstor (d …) (is-c t) returns the clause (c …) = t |- is-c t or (d …) = t |- ¬ (is-c t)

val lemma_select_cstor : + cstor_t:S.T.Term.t -> + S.T.Term.t -> + S.P.t -> + S.P.proof_step

lemma_select_cstor (c t1…tn) (sel-c-i t) returns a proof of t = c t1…tn |- (sel-c-i t) = ti

val lemma_isa_split : S.T.Term.t -> S.Lit.t Iter.t -> S.P.t -> S.P.proof_step

lemma_isa_split t lits is the proof of is-c1 t \/ is-c2 t \/ … \/ is-c_n t

val lemma_isa_sel : S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_sel (is-c t) is the proof of is-c t |- t = c (sel-c-1 t)…(sel-c-n t)

val lemma_isa_disj : S.Lit.t -> S.Lit.t -> S.P.t -> S.P.proof_step

lemma_isa_disj (is-c t) (is-d t) is the proof of ¬ (is-c t) \/ ¬ (is-c t)

val lemma_cstor_inj : + S.T.Term.t -> + S.T.Term.t -> + int -> + S.P.t -> + S.P.proof_step

lemma_cstor_inj (c t1…tn) (c u1…un) i is the proof of c t1…tn = c u1…un |- ti = ui

val lemma_cstor_distinct : S.T.Term.t -> S.T.Term.t -> S.P.t -> S.P.proof_step

lemma_isa_distinct (c …) (d …) is the proof of the unit clause |- (c …) ≠ (d …)

val lemma_acyclicity : + (S.T.Term.t * S.T.Term.t) Iter.t -> + S.P.t -> + S.P.proof_step

lemma_acyclicity pairs is a proof of t1=u1, …, tn=un |- false by acyclicity.

\ 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 19551514..12d75e0e 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

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file +Lit (sidekick.Sidekick_th_data.S.A.S.Lit)

Module S.Lit

module T = T

Literals depend on terms

type t

A literal

val term : t -> T.Term.t

Get the (positive) term

val sign : t -> bool

Get the sign. A negated literal has sign false.

val neg : t -> t

Take negation of literal. sign (neg lit) = not (sign lit).

val abs : t -> t

abs lit is like lit but always positive, i.e. sign (abs lit) = true

val signed_term : t -> T.Term.t * bool

Return the atom and the sign

val atom : ?sign:bool -> T.Term.store -> T.Term.t -> t

atom store t makes a literal out of a term, possibly normalizing its sign in the process.

  • parameter sign

    if provided, and sign=false, negate the resulting lit.

val norm_sign : t -> t * bool

norm_sign (+t) is +t, true, and norm_sign (-t) is +t, false. In both cases the term is positive, and the boolean reflects the initial sign.

val equal : t -> t -> bool
val hash : t -> int
val pp : t Sidekick_core.Fmt.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Model/index.html index 384dfe21..6d8077b1 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/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Step_vec/index.html index 49bcb5b8..97876e98 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.S.A.S.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ 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 fecebcb5..4befa48b 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,10 @@ -P (sidekick.Sidekick_th_data.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.S.A.S.P)

Module S.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Registry/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Registry/index.html new file mode 100644 index 00000000..f5a715b3 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.S.A.S.Registry)

Module S.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html index 72d09f31..19f41aa9 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html index 51906fe5..08954296 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Actions/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions.P)

Module Actions.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term = T.Term.t
type lit = Lit.t
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ 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 8f7e4a93..f2db9620 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,15 @@ -Actions (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type term = T.Term.t and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 * proof_step) -> 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_th_data.S.A.S.Solver_internal.CC.Actions)

Module CC.Actions

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type term = T.Term.t + and type proof_step = proof_step

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 proof : t -> proof
val raise_conflict : t -> Lit.t list -> proof_step -> '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 raise_semantic_conflict : + t -> + Lit.t list -> + (bool * T.Term.t * T.Term.t) list -> + 'a

raise_semantic_conflict acts lits same_val declares that the conjunction of all lits (literals true in current trail) and tuples {=,≠}, t_i, u_i implies false.

The {=,≠}, t_i, u_i are pairs of terms with the same value (if = / true) or distinct value (if / false)) in the current model.

This does not return. It should raise an exception.

val propagate : + t -> + Lit.t -> + reason:( unit -> Lit.t list * proof_step ) -> + 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_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 e32cb7da..726cf770 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

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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

Explanation: the nodes were explicitly merged

val mk_merge_t : term -> term -> t

Explanation: the terms were explicitly merged

val mk_lit : lit -> t

Explanation: we merged t and u because of literal t=u, or we merged t and true because of literal t, or t and false because of literal ¬t

val mk_same_value : N.t -> N.t -> t
val mk_list : t list -> t

Conjunction of explanations

val mk_theory : term -> term -> (term * term * t list) list -> proof_step -> t

mk_theory t u expl_sets pr builds a theory explanation for why |- t=u. It depends on sub-explanations expl_sets which are tuples (t_i, u_i, expls_i) where expls_i are explanations that justify t_i = u_i in the current congruence closure.

The proof pr is the theory lemma, of the form (t_i = u_i)_i |- t=u . It is resolved against each expls_i |- t_i=u_i obtained from expl_sets, on pivot t_i=u_i, to obtain a proof of Gamma |- t=u where Gamma is a subset of the literals asserted into the congruence closure.

For example for the lemma a=b deduced by injectivity from Some a=Some b in the theory of datatypes, the arguments would be a, b, [Some a, Some b, mk_merge_t (Some a)(Some b)], pr where pr is the injectivity lemma Some a=Some b |- a=b.

\ 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 d35c3304..699b2e23 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 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 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/P/Step_vec/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html index ce03909a..f9f0cd78 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/Step_vec/index.html @@ -1,2 +1,2 @@ -Step_vec (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Step_vec (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.P.Step_vec)

Module P.Step_vec

A vector of steps

include Sidekick_util.Vec_sig.BASE with type elt = proof_step
include Sidekick_util.Vec_sig.BASE_RO with type elt = proof_step
type elt = proof_step
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Sidekick_util.Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html index 0a37ac13..48c337cd 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/P/index.html @@ -1,2 +1,10 @@ -P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF with type t := t and type lit := lit and type proof_step := proof_step and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : proof_step -> res:lit Iter.t -> using:proof_step Iter.t -> proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file +P (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.P)

Module CC.P

type t = proof

The abstract representation of a proof. A proof always proves a clause to be valid (true in every possible interpretation of the problem's assertions, and the theories)

type proof_step = proof_step

Identifier for a proof proof_rule (like a unique ID for a clause previously added/proved)

type term
type lit = lit
type proof_rule = t -> proof_step
include Sidekick_core.SAT_PROOF + with type t := t + and type lit := lit + and type proof_step := proof_step + and type proof_rule := proof_rule

A vector of steps

val enabled : t -> bool

Returns true if proof production is enabled

val emit_input_clause : lit Iter.t -> proof_rule

Emit an input clause.

val emit_redundant_clause : lit Iter.t -> hyps:proof_step Iter.t -> proof_rule

Emit a clause deduced by the SAT solver, redundant wrt previous clauses. The clause must be RUP wrt hyps.

val emit_unsat_core : lit Iter.t -> proof_rule

Produce a proof of the empty clause given this subset of the assumptions. FIXME: probably needs the list of proof_step that disprove the lits?

val emit_unsat : proof_step -> t -> unit

Signal "unsat" result at the given proof

val del_clause : proof_step -> lit Iter.t -> t -> unit

Forget a clause. Only useful for performance considerations.

val lemma_cc : lit Iter.t -> proof_rule

lemma_cc proof lits asserts that lits form a tautology for the theory of uninterpreted functions.

val define_term : term -> term -> proof_rule

define_term cst u proof defines the new constant cst as being equal to u. The result is a proof of the clause cst = u

val proof_p1 : proof_step -> proof_step -> proof_rule

proof_p1 p1 p2, where p1 proves the unit clause t=u (t:bool) and p2 proves C \/ t, is the rule that produces C \/ u, i.e unit paramodulation.

val proof_r1 : proof_step -> proof_step -> proof_rule

proof_r1 p1 p2, where p1 proves the unit clause |- t (t:bool) and p2 proves C \/ ¬t, is the rule that produces C \/ u, i.e unit resolution.

val proof_res : pivot:term -> proof_step -> proof_step -> proof_rule

proof_res ~pivot p1 p2, where p1 proves the clause |- C \/ l and p2 proves D \/ ¬l, where l is either pivot or ¬pivot, is the rule that produces C \/ D, i.e boolean resolution.

val with_defs : proof_step -> proof_step Iter.t -> proof_rule

with_defs pr defs specifies that pr is valid only in a context where the definitions defs are present.

val lemma_true : term -> proof_rule

lemma_true (true) p asserts the clause (true)

val lemma_preprocess : term -> term -> using:proof_step Iter.t -> proof_rule

lemma_preprocess t u ~using p asserts that t = u is a tautology and that t has been preprocessed into u.

The theorem /\_{eqn in using} eqn |- t=u is proved using congruence closure, and then resolved against the clauses using to obtain a unit equality.

From now on, t and u will be used interchangeably.

  • returns

    a proof_rule ID for the clause (t=u).

val lemma_rw_clause : + proof_step -> + res:lit Iter.t -> + using:proof_step Iter.t -> + proof_rule

lemma_rw_clause prc ~res ~using, where prc is the proof of |- c, uses the equations |- p_i = q_i from using to rewrite some literals of c into res. This is used to preprocess literals of a clause (using lemma_preprocess individually).

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html new file mode 100644 index 00000000..d9cea944 --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/Resolved_expl/index.html @@ -0,0 +1,2 @@ + +Resolved_expl (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC.Resolved_expl)

Module CC.Resolved_expl

Resolved explanations.

The congruence closure keeps explanations for why terms are in the same class. However these are represented in a compact, cheap form. To use these explanations we need to resolve them into a resolved explanation, typically a list of literals that are true in the current trail and are responsible for merges.

However, we can also have merged classes because they have the same value in the current model.

type t = {
lits : lit list;
same_value : (N.t * N.t) list;
pr : proof -> proof_step;
}
val is_semantic : t -> bool

is_semantic expl is true if there's at least one pair in expl.same_value.

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/Solver_internal/CC/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/CC/index.html index d031fee0..c7552379 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,4 +1,25 @@ -CC (sidekick.Sidekick_th_data.S.A.S.Solver_internal.CC)

Module Solver_internal.CC

Congruence closure instance

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step with type t = proof with type lit = lit
module Actions : Sidekick_core.CC_ACTIONS with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

type node = N.t

A node of the congruence closure

type repr = N.t

Node that is currently a representative

type explanation = Expl.t

Accessors

val term_store : t -> term_store
val proof : t -> proof
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 * proof_step) -> 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 -> proof -> 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

first, some aliases.

module T = T
module Lit = Lit
type proof = proof
type proof_step = proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + with type t = proof + with type lit = lit
module Actions : + Sidekick_core.CC_ACTIONS + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + with type t = theory_actions
type term_store = T.Term.store
type term = T.Term.t
type value = term
type fun_ = T.Fun.t
type lit = Lit.t
type actions = Actions.t
type t

The congruence closure object. It contains a fair amount of state and is mutable and backtrackable.

module N : sig ... end

Equivalence classes.

module Expl : sig ... end

Explanations

module Resolved_expl : sig ... end

Resolved 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 proof : t -> proof
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 * proof_step ) -> 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 -> + proof -> + 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 -> Resolved_expl.t

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.

This fails in an unspecified way if the explanation, once resolved, satisfies Resolved_expl.is_semantic.

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 set_model_value : t -> term -> value -> unit

Set the value of a term in the model.

val with_model_mode : t -> ( unit -> 'a ) -> 'a

Enter model combination mode.

val get_model_for_each_class : t -> (repr * N.t Iter.t * value) Iter.t

In model combination mode, obtain classes with their values.

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 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/Registry/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Registry/index.html new file mode 100644 index 00000000..202a3c9e --- /dev/null +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/Registry/index.html @@ -0,0 +1,2 @@ + +Registry (sidekick.Sidekick_th_data.S.A.S.Solver_internal.Registry)

Module Solver_internal.Registry

type t
type 'a key
val create_key : unit -> 'a key

Call this statically, typically at program initialization, for each distinct key.

val create : unit -> t
val get : t -> 'a key -> 'a option
val set : t -> 'a key -> 'a -> unit
\ 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 ec0ece8a..e4eccd34 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.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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 * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.

\ No newline at end of file +Simplify (sidekick.Sidekick_th_data.S.A.S.Solver_internal.Simplify)

Module Solver_internal.Simplify

Simplify terms

type t
val tst : t -> term_store
val ty_st : t -> ty_store
val clear : t -> unit

Reset internal cache, etc.

val proof : t -> proof

Access proof

type hook = t -> term -> (term * proof_step Iter.t) 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.

The simplifier will take care of simplifying the resulting term further, caching (so that work is not duplicated in subterms), etc.

val normalize : t -> term -> (term * proof_step) 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 * proof_step option

Normalize a term using all the hooks, along with a proof that the simplification is correct. returns 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 0c11d05e..5e875dd1 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,3 +1,43 @@ -Solver_internal (sidekick.Sidekick_th_data.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : Sidekick_core.CC_S with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and type -P.t = proof and type P.lit = lit and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> (term * proof_step Iter.t) option

Given a term, try to preprocess it. Return None if it didn't change, or Some (u) if t=u. Can also add clauses to define new terms.

Preprocessing might transform terms to make them more amenable to reasoning, e.g. by removing boolean formulas via Tseitin encoding, adding clauses that encode their meaning in the same move.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

val preprocess_acts_of_acts : t -> theory_actions -> preprocess_actions

Obtain preprocessor actions, from theory actions

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : t -> theory_actions -> lit -> reason:(unit -> lit list * proof_step) -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : t -> theory_actions -> lit list -> proof_step -> unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val preprocess_term : t -> preprocess_actions -> term -> term * proof_step option

Preprocess a term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : t -> (CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit) -> unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> (CC.t -> CC.N.t -> term -> unit) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> (CC.N.t -> term -> unit) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> (CC.t -> th:bool -> lit list -> unit) -> unit

Callback called on every CC conflict

val on_cc_propagate : t -> (CC.t -> lit -> (unit -> lit list * proof_step) -> unit) -> unit

Callback called on every CC propagation

val on_partial_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> (t -> theory_actions -> lit Iter.t -> unit) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

Model production

type model_hook = recurse:(t -> CC.N.t -> term) -> t -> CC.N.t -> term option

A model-production hook. It takes the solver, a class, and returns a term for this class. For example, an arithmetic theory might detect that a class contains a numeric constant, and return this constant as a model value.

If no hook assigns a value to a class, a fake value is created for it.

val on_model_gen : t -> model_hook -> unit

Add a hook that will be called when a model is being produced

\ No newline at end of file +Solver_internal (sidekick.Sidekick_th_data.S.A.S.Solver_internal)

Module S.Solver_internal

Internal solver, available to theories.

module T = T
module Lit = Lit
type ty = T.Ty.t
type term = T.Term.t
type value = T.Term.t
type term_store = T.Term.store
type ty_store = T.Ty.store
type clause_pool
type proof = proof
type proof_step = proof_step
module P = P
type t

Main type for a solver

type solver = t
val tst : t -> term_store
val ty_st : t -> ty_store
val stats : t -> Sidekick_util.Stat.t
val proof : t -> proof

Access the proof object

Registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

Actions for the theories

type theory_actions

Handle that the theories can use to perform actions.

type lit = Lit.t

Congruence Closure

module CC : + Sidekick_core.CC_S + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and type P.t = proof + and type P.lit = lit + and type Actions.t = theory_actions

Congruence closure instance

val cc : t -> CC.t

Congruence closure for this solver

Simplifiers

module Simplify : sig ... end

Simplify terms

type simplify_hook = Simplify.hook
val add_simplifier : t -> Simplify.hook -> unit

Add a simplifier hook for preprocessing.

val simplify_t : t -> term -> (term * proof_step) option

Simplify input term, returns Some u if some simplification occurred.

val simp_t : t -> term -> term * proof_step option

simp_t si t returns u even if no simplification occurred (in which case t == u syntactically). It emits |- t=u. (see simplifier)

Preprocessors

These preprocessors turn mixed, raw literals (possibly simplified) into literals suitable for reasoning. Typically some clauses are also added to the solver.

module type PREPROCESS_ACTS = sig ... end
type preprocess_actions = (module PREPROCESS_ACTS)

Actions available to the preprocessor

type preprocess_hook = t -> preprocess_actions -> term -> unit

Given a term, preprocess it.

The idea is to add literals and clauses to help define the meaning of the term, if needed. For example for boolean formulas, clauses for their Tseitin encoding can be added, with the formula acting as its own proxy symbol.

  • parameter preprocess_actions

    actions available during preprocessing.

val on_preprocess : t -> preprocess_hook -> unit

Add a hook that will be called when terms are preprocessed

hooks for the theory

val raise_conflict : t -> theory_actions -> lit list -> proof_step -> 'a

Give a conflict clause to the solver

val push_decision : t -> theory_actions -> lit -> unit

Ask the SAT solver to decide the given literal in an extension of the current trail. This is useful for theory combination. If the SAT solver backtracks, this (potential) decision is removed and forgotten.

val propagate : + t -> + theory_actions -> + lit -> + reason:( unit -> lit list * proof_step ) -> + unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val propagate_l : t -> theory_actions -> lit -> lit list -> proof_step -> unit

Propagate a boolean using a unit clause. expl => lit must be a theory lemma, that is, a T-tautology

val add_clause_temp : t -> theory_actions -> lit list -> proof_step -> unit

Add local clause to the SAT solver. This clause will be removed when the solver backtracks.

val add_clause_permanent : + t -> + theory_actions -> + lit list -> + proof_step -> + unit

Add toplevel clause to the SAT solver. This clause will not be backtracked.

val mk_lit : t -> theory_actions -> ?sign:bool -> term -> lit

Create a literal. This automatically preprocesses the term.

val add_lit : t -> theory_actions -> ?default_pol:bool -> lit -> unit

Add the given literal to the SAT solver, so it gets assigned a boolean value.

  • parameter default_pol

    default polarity for the corresponding atom

val add_lit_t : t -> theory_actions -> ?sign:bool -> term -> unit

Add the given (signed) bool term to the SAT solver, so it gets assigned a boolean value

val cc_raise_conflict_expl : t -> theory_actions -> CC.Expl.t -> 'a

Raise a conflict with the given congruence closure explanation. it must be a theory tautology that expl ==> absurd. To be used in theories.

val cc_find : t -> CC.N.t -> CC.N.t

Find representative of the node

val cc_are_equal : t -> term -> term -> bool

Are these two terms equal in the congruence closure?

val cc_merge : t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit

Merge these two nodes in the congruence closure, given this explanation. It must be a theory tautology that expl ==> n1 = n2. To be used in theories.

val cc_merge_t : t -> theory_actions -> term -> term -> CC.Expl.t -> unit

Merge these two terms in the congruence closure, given this explanation. See cc_merge

val cc_add_term : t -> term -> CC.N.t

Add/retrieve congruence closure node for this term. To be used in theories

val cc_mem_term : t -> term -> bool

Return true if the term is explicitly in the congruence closure. To be used in theories

val on_cc_pre_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> CC.Expl.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called before)

val on_cc_post_merge : + t -> + ( CC.t -> theory_actions -> CC.N.t -> CC.N.t -> unit ) -> + unit

Callback for when two classes containing data for this key are merged (called after)

val on_cc_new_term : t -> ( CC.t -> CC.N.t -> term -> unit ) -> unit

Callback to add data on terms when they are added to the congruence closure

val on_cc_is_subterm : t -> ( CC.N.t -> term -> unit ) -> unit

Callback for when a term is a subterm of another term in the congruence closure

val on_cc_conflict : t -> ( CC.t -> th:bool -> lit list -> unit ) -> unit

Callback called on every CC conflict

val on_cc_propagate : + t -> + ( CC.t -> lit -> ( unit -> lit list * proof_step ) -> unit ) -> + unit

Callback called on every CC propagation

val on_partial_check : + t -> + ( t -> theory_actions -> lit Iter.t -> unit ) -> + unit

Register callbacked to be called with the slice of literals newly added on the trail.

This is called very often and should be efficient. It doesn't have to be complete, only correct. It's given only the slice of the trail consisting in new literals.

val on_final_check : t -> ( t -> theory_actions -> lit Iter.t -> unit ) -> unit

Register callback to be called during the final check.

Must be complete (i.e. must raise a conflict if the set of literals is not satisfiable) and can be expensive. The function is given the whole trail.

val on_th_combination : + t -> + ( t -> theory_actions -> (term * value) Iter.t ) -> + unit

Add a hook called during theory combination. The hook must return an iterator of pairs (t, v) which mean that term t has value v in the model.

Terms with the same value (according to Term.equal) will be merged in the CC; if two terms with different values are merged, we get a semantic conflict and must pick another model.

val declare_pb_is_incomplete : t -> unit

Declare that, in some theory, the problem is outside the logic fragment that is decidable (e.g. if we meet proper NIA formulas). The solver will not reply "SAT" from now on.

Model production

type model_ask_hook = + recurse:( t -> CC.N.t -> term ) -> + t -> + CC.N.t -> + term option

A model-production hook to query values from a theory.

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.

type model_completion_hook = t -> add:( term -> term -> unit ) -> unit

A model production hook, for the theory to add values. The hook is given a add function to add bindings to the model.

val on_model : + ?ask:model_ask_hook -> + ?complete:model_completion_hook -> + t -> + unit

Add model production/completion hooks.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html index eb1223a1..d9e50cfd 100644 --- a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html +++ b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/Solver_internal/module-type-PREPROCESS_ACTS/index.html @@ -1,2 +1,2 @@ -PREPROCESS_ACTS (sidekick.Sidekick_th_data.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit_nopreproc : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val mk_lit : ?sign:bool -> term -> lit * proof_step option

mk_lit t creates a new literal for a boolean term t. Also returns an optional proof of preprocessing, which if present is the proof of |- t = lit with lit the result.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file +PREPROCESS_ACTS (sidekick.Sidekick_th_data.S.A.S.Solver_internal.PREPROCESS_ACTS)

Module type Solver_internal.PREPROCESS_ACTS

val proof : proof
val mk_lit : ?sign:bool -> term -> lit

mk_lit t creates a new literal for a boolean term t.

val add_clause : lit list -> proof_step -> unit

pushes a new clause into the SAT solver.

val add_lit : ?default_pol:bool -> lit -> unit

Ensure the literal will be decided/handled by the SAT solver.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html b/dev/sidekick/Sidekick_th_data/module-type-S/A/S/T/Fun/index.html index f67997cf..c7eb4339 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 2e65c2b1..679ebd81 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,8 +1,8 @@ -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_shallow : store -> ( t -> unit ) -> t -> unit

Iterate function on immediate subterms. This should not be recursive.

val iter_dag : t -> ( t -> unit ) -> unit

iter_dag t f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.

For example, in:

let x = 2 in
 let y = f x x in
 let z = g y x in
 z = z

the DAG has the following nodes:

n1: 2
 n2: f n1 n1
 n3: g n2 n1
-n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file +n4: = n3 n3
module Tbl : CCHashtbl.S with type key = t
\ No newline at end of file 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 dfccfb15..8b9a5f2f 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 02dc6601..9ba2590d 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 025b0385..196b41cd 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 2ef8b738..32ec1f4f 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,5 +1,37 @@ -S (sidekick.Sidekick_th_data.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : Sidekick_core.PROOF with type lit = Lit.t and type t = proof and type proof_step = proof_step and type term = T.Term.t
module Solver_internal : Sidekick_core.SOLVER_INTERNAL with module T = T and module Lit = Lit and type proof = proof and type proof_step = proof_step and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t
module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : name:string -> create_and_setup:(Solver_internal.t -> 'th) -> -?push_level:('th -> unit) -> ?pop_levels:('th -> int -> unit) -> unit -> theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : ?stat:Sidekick_util.Stat.t -> ?size:[ `Big | `Tiny | `Small ] -> proof:proof -> theories:theory list -> -T.Term.store -> T.Ty.store -> unit -> t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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) -> -?should_stop:(t -> int -> bool) -> assumptions:lit list -> t -> res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : assumptions:lit list -> t -> propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
val pp_stats : t CCFormat.printer

Print some statistics. What it prints exactly is unspecified.

\ No newline at end of file +S (sidekick.Sidekick_th_data.S.A.S)

Module A.S

module Lit : Sidekick_core.LIT with module T = T
type proof
type proof_step
module P : + Sidekick_core.PROOF + with type lit = Lit.t + and type t = proof + and type proof_step = proof_step + and type term = T.Term.t
module Solver_internal : + Sidekick_core.SOLVER_INTERNAL + with module T = T + and module Lit = Lit + and type proof = proof + and type proof_step = proof_step + and module P = P

Internal solver, available to theories.

type t

The solver's state.

type solver = t
type term = T.Term.t
type ty = T.Ty.t
type lit = Lit.t

Value registry

val registry : t -> Registry.t

A solver contains a registry so that theories can share data

module type THEORY = sig ... end
type theory = (module THEORY)

A theory that can be used for this particular solver.

type 'a theory_p = (module THEORY with type t = 'a)

A theory that can be used for this particular solver, with state of type 'a.

val mk_theory : + name:string -> + create_and_setup:( Solver_internal.t -> 'th ) -> + ?push_level:( 'th -> unit ) -> + ?pop_levels:( 'th -> int -> unit ) -> + unit -> + theory

Helper to create a theory.

module Model : sig ... end

Models

module Unknown : sig ... end

Main API

val stats : t -> Sidekick_util.Stat.t
val tst : t -> T.Term.store
val ty_st : t -> T.Ty.store
val proof : t -> proof
val create : + ?stat:Sidekick_util.Stat.t -> + ?size:[ `Big | `Tiny | `Small ] -> + proof:proof -> + theories:theory list -> + T.Term.store -> + T.Ty.store -> + unit -> + t

Create a new solver.

It needs a term state and a type state to manipulate terms and types. All terms and types interacting with this solver will need to come from these exact states.

  • parameter store_proof

    if true, proofs from the SAT solver and theories are retained and potentially accessible after solve returns UNSAT.

  • parameter size

    influences the size of initial allocations.

  • parameter theories

    theories to load from the start. Other theories can be added using add_theory.

val add_theory : t -> theory -> unit

Add a theory to the solver. This should be called before any call to solve or to add_clause and the likes (otherwise the theory will have a partial view of the problem).

val add_theory_p : t -> 'a theory_p -> 'a

Add the given theory and obtain its state

val add_theory_l : t -> theory list -> unit
val mk_lit_t : t -> ?sign:bool -> term -> lit

mk_lit_t _ ~sign t returns lit', where lit' is preprocess(lit) and lit is an internal representation of ± t.

The proof of |- lit = lit' is directly added to the solver's proof.

val add_clause : t -> lit Sidekick_util.IArray.t -> proof_step -> unit

add_clause solver cs adds a boolean clause to the solver. Subsequent calls to solve will need to satisfy this clause.

val add_clause_l : t -> lit list -> proof_step -> unit

Add a clause to the solver, given as a list.

val assert_terms : t -> term list -> unit

Helper that turns each term into an atom, before adding the result to the solver as an assertion

val assert_term : t -> term -> unit

Helper that turns the term into an atom, before adding the result to the solver as a unit clause assertion

type res =
| Sat of Model.t(*

Satisfiable

*)
| Unsat of {
unsat_core : unit -> lit Iter.t;(*

Unsat core (subset of assumptions), or empty

*)
unsat_proof_step : unit -> proof_step option;(*

Proof step for the empty clause

*)
}
(*

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 ) -> + ?should_stop:( t -> int -> bool ) -> + assumptions:lit list -> + t -> + res

solve s checks the satisfiability of the clauses added so far to s.

  • parameter check

    if true, the model is checked before returning.

  • parameter on_progress

    called regularly during solving.

  • parameter assumptions

    a set of atoms held to be true. The unsat core, if any, will be a subset of assumptions.

  • parameter should_stop

    a callback regularly called with the solver, and with a number of "steps" done since last call. The exact notion of step is not defined, but is guaranteed to increase regularly. The function should return true if it judges solving must stop (returning Unknown), false if solving can proceed.

  • parameter on_exit

    functions to be run before this returns

val last_res : t -> res option

Last result, if any. Some operations will erase this (e.g. assert_term).

val push_assumption : t -> lit -> unit

Pushes an assumption onto the assumption stack. It will remain there until it's pop'd by pop_assumptions.

val pop_assumptions : t -> int -> unit

pop_assumptions solver n removes n assumptions from the stack. It removes the assumptions that were the most recently added via push_assumptions. Note that check_sat_propagations_only can call this if it meets a conflict.

type propagation_result =
| PR_sat
| PR_conflict of {
backtracked : int;
}
| PR_unsat of {
unsat_core : unit -> lit Iter.t;
}
val check_sat_propagations_only : + assumptions:lit list -> + t -> + propagation_result

check_sat_propagations_only solver uses assumptions (including the assumptions parameter, and atoms previously added via push_assumptions) and boolean+theory propagation to quickly assess satisfiability. It is not complete; calling solve is required to get an accurate result.

  • returns

    one of:

    • PR_sat if the current state seems satisfiable
    • PR_conflict {backtracked=n} if a conflict was found and resolved, leading to backtracking n levels of assumptions
    • PR_unsat … if the assumptions were found to be unsatisfiable, with the given core.
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 45ee521d..5498bbeb 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 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 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 15a508ef..205878ae 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,11 @@ -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

Make a constructor application term

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

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)

module P : PROOF with type proof := S.P.t and type proof_step := S.P.proof_step and type term := S.T.Term.t and type lit := S.Lit.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.t, S.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.t, S.T.Term.t ) data_view

Try to view term as a datatype term

Make a constructor application term

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

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)

module P : + PROOF + with type proof := S.P.t + and type proof_step := S.P.proof_step + and type term := S.T.Term.t + and type lit := S.Lit.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 1fb90c6b..547cafb4 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__/.dune-keep b/dev/sidekick/Sidekick_th_data__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_th_data__/index.html b/dev/sidekick/Sidekick_th_data__/index.html deleted file mode 100644 index b14420ba..00000000 --- a/dev/sidekick/Sidekick_th_data__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_th_data__ (sidekick.Sidekick_th_data__)

Module Sidekick_th_data__

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__Th_intf/.dune-keep b/dev/sidekick/Sidekick_th_data__Th_intf/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_th_data__Th_intf/index.html b/dev/sidekick/Sidekick_th_data__Th_intf/index.html deleted file mode 100644 index 2764b283..00000000 --- a/dev/sidekick/Sidekick_th_data__Th_intf/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_th_data__Th_intf (sidekick.Sidekick_th_data__Th_intf)

Module Sidekick_th_data__Th_intf

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_th_data__Types/.dune-keep b/dev/sidekick/Sidekick_th_data__Types/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_th_data__Types/index.html b/dev/sidekick/Sidekick_th_data__Types/index.html deleted file mode 100644 index 3fc59081..00000000 --- a/dev/sidekick/Sidekick_th_data__Types/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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-bin/Sidekick_bin_lib__Drup_parser/.dune-keep b/dev/sidekick/Sidekick_util/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_bin_lib__Drup_parser/.dune-keep rename to dev/sidekick/Sidekick_util/.dummy diff --git a/dev/sidekick/Sidekick_util/.dune-keep b/dev/sidekick/Sidekick_util/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util/Backtrack_stack/index.html b/dev/sidekick/Sidekick_util/Backtrack_stack/index.html index 11056d04..485c4e69 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_ref/index.html b/dev/sidekick/Sidekick_util/Backtrackable_ref/index.html index b2231e7b..4b0712e2 100644 --- a/dev/sidekick/Sidekick_util/Backtrackable_ref/index.html +++ b/dev/sidekick/Sidekick_util/Backtrackable_ref/index.html @@ -1,2 +1,2 @@ -Backtrackable_ref (sidekick.Sidekick_util.Backtrackable_ref)

Module Sidekick_util.Backtrackable_ref

Backtrackable ref

type 'a t
val create : ?copy:('a -> 'a) -> 'a -> 'a t

Create a backtrackable reference holding the given value initially.

  • parameter copy

    if provided, will be used to copy the value when push_level is called.

val set : 'a t -> 'a -> unit

Set the reference's current content

val get : 'a t -> 'a

Get the reference's current content

val update : 'a t -> ('a -> 'a) -> unit

Update the reference's current content

val push_level : _ t -> unit

Push a backtracking level, copying the current value on top of some stack. The copy function will be used if it was provided in create.

val n_levels : _ t -> int

Number of saved values

val pop_levels : _ t -> int -> unit

Pop n levels, restoring to the value the reference was storing n calls to push_level earlier.

  • raises Invalid_argument

    if n is bigger than n_levels.

\ No newline at end of file +Backtrackable_ref (sidekick.Sidekick_util.Backtrackable_ref)

Module Sidekick_util.Backtrackable_ref

Backtrackable ref

type 'a t
val create : ?copy:( 'a -> 'a ) -> 'a -> 'a t

Create a backtrackable reference holding the given value initially.

  • parameter copy

    if provided, will be used to copy the value when push_level is called.

val set : 'a t -> 'a -> unit

Set the reference's current content

val get : 'a t -> 'a

Get the reference's current content

val update : 'a t -> ( 'a -> 'a ) -> unit

Update the reference's current content

val push_level : _ t -> unit

Push a backtracking level, copying the current value on top of some stack. The copy function will be used if it was provided in create.

val n_levels : _ t -> int

Number of saved values

val pop_levels : _ t -> int -> unit

Pop n levels, restoring to the value the reference was storing n calls to push_level earlier.

  • raises Invalid_argument

    if n is bigger than n_levels.

\ 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 755c2a4f..c6f1c438 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 @@ -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 +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 6ccc3b8a..4ab16312 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

module A : ARG

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

module A : ARG

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
val n_levels : _ t -> int
\ 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 096c0e96..2a5375ac 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 (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 (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 599ec984..ac75c42d 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 74703f16..ecd7f06d 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
val n_levels : _ t -> int
\ 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 bc7dd1f8..4de9853c 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 snoc : 'a t -> 'a -> 'a t
val append : 'a t -> 'a t -> 'a t
val of_iter : 'a Iter.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 snoc : 'a t -> 'a -> 'a t
val append : 'a t -> 'a t -> 'a t
val of_iter : 'a Iter.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/Bitvec/index.html b/dev/sidekick/Sidekick_util/Bitvec/index.html index 45275078..559655d5 100644 --- a/dev/sidekick/Sidekick_util/Bitvec/index.html +++ b/dev/sidekick/Sidekick_util/Bitvec/index.html @@ -1,2 +1,2 @@ -Bitvec (sidekick.Sidekick_util.Bitvec)

Module Sidekick_util.Bitvec

Bitvector

type t
val create : unit -> t
val ensure_size : t -> int -> unit

ensure_size bv i ensures that i is a valid index in bv

val get : t -> int -> bool
val set : t -> int -> bool -> unit
val clear_all : t -> unit
\ No newline at end of file +Bitvec (sidekick.Sidekick_util.Bitvec)

Module Sidekick_util.Bitvec

Bitvector

type t
val create : unit -> t
val ensure_size : t -> int -> unit

ensure_size bv i ensures that i is a valid index in bv

val get : t -> int -> bool
val set : t -> int -> bool -> unit
val clear_all : t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Chunk_stack/Buf/index.html b/dev/sidekick/Sidekick_util/Chunk_stack/Buf/index.html index 84196e90..be78c2c8 100644 --- a/dev/sidekick/Sidekick_util/Chunk_stack/Buf/index.html +++ b/dev/sidekick/Sidekick_util/Chunk_stack/Buf/index.html @@ -1,2 +1,2 @@ -Buf (sidekick.Sidekick_util.Chunk_stack.Buf)

Module Chunk_stack.Buf

A hand made buffer

type t = {
mutable b : bytes;
mutable len : int;
}
val create : ?cap:int -> unit -> t
val clear : t -> unit
val contents : t -> string
\ No newline at end of file +Buf (sidekick.Sidekick_util.Chunk_stack.Buf)

Module Chunk_stack.Buf

A hand made buffer

type t = {
mutable b : bytes;
mutable len : int;
}
val create : ?cap:int -> unit -> t
val clear : t -> unit
val contents : t -> string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Chunk_stack/Reader/index.html b/dev/sidekick/Sidekick_util/Chunk_stack/Reader/index.html index 3e648aae..12b16d20 100644 --- a/dev/sidekick/Sidekick_util/Chunk_stack/Reader/index.html +++ b/dev/sidekick/Sidekick_util/Chunk_stack/Reader/index.html @@ -1,2 +1,6 @@ -Reader (sidekick.Sidekick_util.Chunk_stack.Reader)

Module Chunk_stack.Reader

type t
val next : t -> yield:(bytes -> int -> int -> 'a) -> finish:(unit -> 'a) -> 'a

Read next chunk, call yield with a slice of bytes, otherwise call finish().

val next_string : t -> string option

Read next chunk as a string

val empty : t
val from_buf : Buf.t -> t
val from_channel_backward : ?close_at_end:bool -> Stdlib.in_channel -> t

Read channel from the end, assuming that is possible.

val with_file_backward : string -> (t -> 'a) -> 'a

read_file_backward filename f calls f with an iterator over chunks of the file, read from the end.

Each chunk is assumed to be followed by its length as an int32 LE.

\ No newline at end of file +Reader (sidekick.Sidekick_util.Chunk_stack.Reader)

Module Chunk_stack.Reader

type t
val next : + t -> + yield:( bytes -> int -> int -> 'a ) -> + finish:( unit -> 'a ) -> + 'a

Read next chunk, call yield with a slice of bytes, otherwise call finish().

val next_string : t -> string option

Read next chunk as a string

val empty : t
val from_buf : Buf.t -> t
val from_channel_backward : ?close_at_end:bool -> Stdlib.in_channel -> t

Read channel from the end, assuming that is possible.

val with_file_backward : string -> ( t -> 'a ) -> 'a

read_file_backward filename f calls f with an iterator over chunks of the file, read from the end.

Each chunk is assumed to be followed by its length as an int32 LE.

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Chunk_stack/Writer/index.html b/dev/sidekick/Sidekick_util/Chunk_stack/Writer/index.html index a2ae22f8..48144206 100644 --- a/dev/sidekick/Sidekick_util/Chunk_stack/Writer/index.html +++ b/dev/sidekick/Sidekick_util/Chunk_stack/Writer/index.html @@ -1,2 +1,2 @@ -Writer (sidekick.Sidekick_util.Chunk_stack.Writer)

Module Chunk_stack.Writer

Create a stack of chunks.

type t
val dummy : t
val into_buf : Buf.t -> t
val into_channel : Stdlib.out_channel -> t
val add_buf : t -> Buf.t -> unit
val add_bytes : t -> bytes -> int -> int -> unit
val add_string : t -> string -> unit
val add_buffer : t -> Stdlib.Buffer.t -> unit
\ No newline at end of file +Writer (sidekick.Sidekick_util.Chunk_stack.Writer)

Module Chunk_stack.Writer

Create a stack of chunks.

type t
val dummy : t
val into_buf : Buf.t -> t
val into_channel : Stdlib.out_channel -> t
val add_buf : t -> Buf.t -> unit
val add_bytes : t -> bytes -> int -> int -> unit
val add_string : t -> string -> unit
val add_buffer : t -> Stdlib.Buffer.t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Chunk_stack/index.html b/dev/sidekick/Sidekick_util/Chunk_stack/index.html index 86ad80b6..f6aa4225 100644 --- a/dev/sidekick/Sidekick_util/Chunk_stack/index.html +++ b/dev/sidekick/Sidekick_util/Chunk_stack/index.html @@ -1,2 +1,2 @@ -Chunk_stack (sidekick.Sidekick_util.Chunk_stack)

Module Sidekick_util.Chunk_stack

Manage a list of chunks.

A chunk is used for serializing proof traces, possibly on disk. This way we do not have to keep the whole proof in memory. Each chunk is typically one step of the proof search.

We produce chunks in forward order (chronological order of their discovery), but once we find a proof of "false", we work our way backward to find chunks transitively needed by this proof of false. Once we obtain this subset of the chunks (as a graph in memory) we can emit a proper proof with no redundant information.

module Buf : sig ... end

A hand made buffer

module Writer : sig ... end

Create a stack of chunks.

module Reader : sig ... end
\ No newline at end of file +Chunk_stack (sidekick.Sidekick_util.Chunk_stack)

Module Sidekick_util.Chunk_stack

Manage a list of chunks.

A chunk is used for serializing proof traces, possibly on disk. This way we do not have to keep the whole proof in memory. Each chunk is typically one step of the proof search.

We produce chunks in forward order (chronological order of their discovery), but once we find a proof of "false", we work our way backward to find chunks transitively needed by this proof of false. Once we obtain this subset of the chunks (as a graph in memory) we can emit a proper proof with no redundant information.

module Buf : sig ... end

A hand made buffer

module Writer : sig ... end

Create a stack of chunks.

module Reader : sig ... end
\ 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 c2bbfee3..9c7f6c86 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 : ('aStdlib.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 c12b0c70..c2fda66d 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 8eb3a5da..21c8816a 100644 --- a/dev/sidekick/Sidekick_util/IArray/index.html +++ b/dev/sidekick/Sidekick_util/IArray/index.html @@ -1,2 +1,7 @@ -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/Int_id/Make/index.html b/dev/sidekick/Sidekick_util/Int_id/Make/index.html index ec0c5e87..1cf12c5c 100644 --- a/dev/sidekick/Sidekick_util/Int_id/Make/index.html +++ b/dev/sidekick/Sidekick_util/Int_id/Make/index.html @@ -1,2 +1,2 @@ -Make (sidekick.Sidekick_util.Int_id.Make)

Module Int_id.Make

Parameters

Signature

type t = int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : int CCHash.t
val to_int : 'a -> 'a
val of_int_unsafe : int -> t
\ No newline at end of file +Make (sidekick.Sidekick_util.Int_id.Make)

Module Int_id.Make

Parameters

Signature

type t = int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : int CCHash.t
val to_int : 'a -> 'a
val of_int_unsafe : int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Int_id/index.html b/dev/sidekick/Sidekick_util/Int_id/index.html index 32635600..758c6bd9 100644 --- a/dev/sidekick/Sidekick_util/Int_id/index.html +++ b/dev/sidekick/Sidekick_util/Int_id/index.html @@ -1,2 +1,2 @@ -Int_id (sidekick.Sidekick_util.Int_id)

Module Sidekick_util.Int_id

module type S = sig ... end
module Make () : sig ... end
\ No newline at end of file +Int_id (sidekick.Sidekick_util.Int_id)

Module Sidekick_util.Int_id

module type S = sig ... end
module Make () : sig ... end
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Int_id/module-type-S/index.html b/dev/sidekick/Sidekick_util/Int_id/module-type-S/index.html index ab82f388..e48394a0 100644 --- a/dev/sidekick/Sidekick_util/Int_id/module-type-S/index.html +++ b/dev/sidekick/Sidekick_util/Int_id/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_util.Int_id.S)

Module type Int_id.S

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val to_int : t -> int
val of_int_unsafe : int -> t
\ No newline at end of file +S (sidekick.Sidekick_util.Int_id.S)

Module type Int_id.S

type t = private int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val to_int : t -> int
val of_int_unsafe : int -> t
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Log/index.html b/dev/sidekick/Sidekick_util/Log/index.html index a963273d..de453da3 100644 --- a/dev/sidekick/Sidekick_util/Log/index.html +++ b/dev/sidekick/Sidekick_util/Log/index.html @@ -1,2 +1,6 @@ -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 -> ((('aStdlib.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 +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 81b39373..cb3d4359 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 091b9a2e..b7cdefcd 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 33d8909c..4b0ba843 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,7 @@ -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 746c83e8..1bde3026 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 df3cbb38..f57e0564 100644 --- a/dev/sidekick/Sidekick_util/Util/index.html +++ b/dev/sidekick/Sidekick_util/Util/index.html @@ -1,2 +1,5 @@ -Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?sep:string -> 'a printer -> 'a list printer
val pp_iter : ?sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?sep:string -> 'a printer -> 'a array printer
val pp_pair : ?sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : ?sep:string -> 'a CCFormat.printer -> 'a IArray.t CCFormat.printer
val flat_map_l_ia : ('a -> 'b IArray.t) -> 'a list -> 'b list
val array_of_list_map : ('a -> 'b) -> 'a list -> 'b array

array_of_list_map f l is the same as Array.of_list @@ List.map f l

val array_to_list_map : ('a -> 'b) -> 'a array -> 'b list
val lazy_map : ('a -> 'b) -> 'a lazy_t -> 'b lazy_t
val lazy_map2 : ('a -> 'b -> 'c) -> 'a lazy_t -> 'b lazy_t -> 'c lazy_t
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type elt = int
module Int_map : CCMap.S with type key = int
module Int_tbl : CCHashtbl.S with type key = int
module Str_tbl : CCHashtbl.S with type key = string
\ No newline at end of file +Util (sidekick.Sidekick_util.Util)

Module Sidekick_util.Util

Utils

type 'a printer = 'a CCFormat.printer
val pp_list : ?sep:string -> 'a printer -> 'a list printer
val pp_iter : ?sep:string -> 'a printer -> 'a Iter.t printer
val pp_array : ?sep:string -> 'a printer -> 'a array printer
val pp_pair : ?sep:string -> 'a printer -> 'b printer -> ('a * 'b) printer
val pp_iarray : + ?sep:string -> + 'a CCFormat.printer -> + 'a IArray.t CCFormat.printer
val flat_map_l_ia : ( 'a -> 'b IArray.t ) -> 'a list -> 'b list
val array_of_list_map : ( 'a -> 'b ) -> 'a list -> 'b array

array_of_list_map f l is the same as Array.of_list @@ List.map f l

val array_to_list_map : ( 'a -> 'b ) -> 'a array -> 'b list
val lazy_map : ( 'a -> 'b ) -> 'a lazy_t -> 'b lazy_t
val lazy_map2 : ( 'a -> 'b -> 'c ) -> 'a lazy_t -> 'b lazy_t -> 'c lazy_t
val setup_gc : unit -> unit

Change parameters of the GC

module Int_set : CCSet.S with type elt = int
module Int_map : CCMap.S with type key = int
module Int_tbl : CCHashtbl.S with type key = int
module Str_tbl : CCHashtbl.S with type key = string
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec/index.html b/dev/sidekick/Sidekick_util/Vec/index.html index 52812f44..4e995319 100644 --- a/dev/sidekick/Sidekick_util/Vec/index.html +++ b/dev/sidekick/Sidekick_util/Vec/index.html @@ -1,3 +1,7 @@ -Vec (sidekick.Sidekick_util.Vec)

Module Sidekick_util.Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val ensure_size : 'a t -> 'a -> int -> unit

ensure size is at least n

val ensure_size_with : 'a t -> (unit -> 'a) -> int -> unit

ensure size is at least n

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop_exn : 'a t -> 'a

Pop last element and return it.

  • raises Invalid_argument

    if the vector is empty

val pop : 'a t -> 'a option
val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

  • raises Invalid_argument

    if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

  • raises Invalid_argument

    if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val append : into:'a t -> 'a t -> unit

append ~into v pushes elements of v in the vector into

val prepend : 'a t -> into:'a t -> unit

prepend v ~into pushes all elements of v into into, at the beginning. consumes v.

val filter_in_place : ('a -> bool) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ('a -> 'a -> int) -> unit

Sort in place the array

val iter : ('a -> unit) -> 'a t -> unit

Iterate on elements

val to_iter : 'a t -> 'a Iter.t
val iteri : (int -> 'a -> unit) -> 'a t -> unit

Iterate on elements with their index

val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ('a -> bool) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ('a -> bool) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : ?sep:string -> -(Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit
\ No newline at end of file +Vec (sidekick.Sidekick_util.Vec)

Module Sidekick_util.Vec

Vectors

A resizable array, workhorse of imperative programming :-). This implementation originated in alt-ergo-zero but has been basically rewritten from scratch several times since.

type 'a t

Abstract type of vectors of 'a

val make : int -> 'a -> 'a t

make cap dummy creates a new vector filled with dummy. The vector is initially empty but its underlying array has capacity cap. dummy will stay alive as long as the vector

val create : unit -> 'a t
val to_list : 'a t -> 'a list

Returns the list of elements of the vector

val to_array : 'a t -> 'a array
val of_list : 'a list -> 'a t
val to_seq : 'a t -> 'a Iter.t
val clear : 'a t -> unit

Set size to 0, doesn't free elements

val ensure_size : 'a t -> 'a -> int -> unit

ensure size is at least n

val ensure_size_with : 'a t -> ( unit -> 'a ) -> int -> unit

ensure size is at least n

val shrink : 'a t -> int -> unit

shrink vec sz resets size of vec to sz. Assumes sz >=0 && sz <= size vec

val pop_exn : 'a t -> 'a

Pop last element and return it.

  • raises Invalid_argument

    if the vector is empty

val pop : 'a t -> 'a option
val size : 'a t -> int
val is_empty : 'a t -> bool
val is_full : 'a t -> bool

Is the capacity of the vector equal to the number of its elements?

val push : 'a t -> 'a -> unit

Push element into the vector

val get : 'a t -> int -> 'a

get the element at the given index, or

  • raises Invalid_argument

    if the index is not valid

val set : 'a t -> int -> 'a -> unit

set the element at the given index, either already set or the first free slot if not (is_full vec), or

  • raises Invalid_argument

    if the index is not valid

val copy : 'a t -> 'a t

Fresh copy

val fast_remove : 'a t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val append : into:'a t -> 'a t -> unit

append ~into v pushes elements of v in the vector into

val prepend : 'a t -> into:'a t -> unit

prepend v ~into pushes all elements of v into into, at the beginning. consumes v.

val filter_in_place : ( 'a -> bool ) -> 'a t -> unit

filter_in_place f v removes from v the elements that do not satisfy f

val sort : 'a t -> ( 'a -> 'a -> int ) -> unit

Sort in place the array

val iter : ( 'a -> unit ) -> 'a t -> unit

Iterate on elements

val to_iter : 'a t -> 'a Iter.t
val iteri : ( int -> 'a -> unit ) -> 'a t -> unit

Iterate on elements with their index

val fold : ( 'b -> 'a -> 'b ) -> 'b -> 'a t -> 'b

Fold over elements

val exists : ( 'a -> bool ) -> 'a t -> bool

Does there exist an element that satisfies the predicate?

val for_all : ( 'a -> bool ) -> 'a t -> bool

Do all elements satisfy the predicate?

val pp : + ?sep:string -> + ( Stdlib.Format.formatter -> 'a -> unit ) -> + Stdlib.Format.formatter -> + 'a t -> + unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/VecI32/index.html b/dev/sidekick/Sidekick_util/VecI32/index.html index 2dee94ef..c89cecb3 100644 --- a/dev/sidekick/Sidekick_util/VecI32/index.html +++ b/dev/sidekick/Sidekick_util/VecI32/index.html @@ -1,2 +1,2 @@ -VecI32 (sidekick.Sidekick_util.VecI32)

Module Sidekick_util.VecI32

Vectors of int32 integers

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := int32
include Vec_sig.BASE with type elt := int32
include Vec_sig.BASE_RO with type elt := int32
type t
val size : t -> int
val get : t -> int -> int32
val iter : f:(int32 -> unit) -> t -> unit
val iteri : f:(int -> int32 -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> int32 -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (int32 -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> int32
val set : t -> int -> int32 -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := int32
val to_iter : t -> int32 Iter.t
val to_array : t -> int32 array
val fold_left : ('a -> int32 -> 'a) -> 'a -> t -> 'a
val pp : int32 CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +VecI32 (sidekick.Sidekick_util.VecI32)

Module Sidekick_util.VecI32

Vectors of int32 integers

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := int32
include Vec_sig.BASE with type elt := int32
include Vec_sig.BASE_RO with type elt := int32
type t
val size : t -> int
val get : t -> int -> int32
val iter : f:( int32 -> unit ) -> t -> unit
val iteri : f:( int -> int32 -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> int32 -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( int32 -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> int32
val set : t -> int -> int32 -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := int32
val to_iter : t -> int32 Iter.t
val to_array : t -> int32 array
val fold_left : ( 'a -> int32 -> 'a ) -> 'a -> t -> 'a
val pp : int32 CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/VecSmallInt/index.html b/dev/sidekick/Sidekick_util/VecSmallInt/index.html index 796dff95..ed40680e 100644 --- a/dev/sidekick/Sidekick_util/VecSmallInt/index.html +++ b/dev/sidekick/Sidekick_util/VecSmallInt/index.html @@ -1,2 +1,2 @@ -VecSmallInt (sidekick.Sidekick_util.VecSmallInt)

Module Sidekick_util.VecSmallInt

Vectors of int32 integers

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := int
include Vec_sig.BASE with type elt := int
include Vec_sig.BASE_RO with type elt := int
type t
val size : t -> int
val get : t -> int -> int
val iter : f:(int -> unit) -> t -> unit
val iteri : f:(int -> int -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> int -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (int -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> int
val set : t -> int -> int -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := int
val to_iter : t -> int Iter.t
val to_array : t -> int array
val fold_left : ('a -> int -> 'a) -> 'a -> t -> 'a
val pp : int CCFormat.printer -> t CCFormat.printer
val push_i32 : t -> int32 -> unit
val get_i32 : t -> int -> int32
val set_i32 : t -> int -> int32 -> unit
\ No newline at end of file +VecSmallInt (sidekick.Sidekick_util.VecSmallInt)

Module Sidekick_util.VecSmallInt

Vectors of int32 integers

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := int
include Vec_sig.BASE with type elt := int
include Vec_sig.BASE_RO with type elt := int
type t
val size : t -> int
val get : t -> int -> int
val iter : f:( int -> unit ) -> t -> unit
val iteri : f:( int -> int -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> int -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( int -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> int
val set : t -> int -> int -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := int
val to_iter : t -> int Iter.t
val to_array : t -> int array
val fold_left : ( 'a -> int -> 'a ) -> 'a -> t -> 'a
val pp : int CCFormat.printer -> t CCFormat.printer
val push_i32 : t -> int32 -> unit
val get_i32 : t -> int -> int32
val set_i32 : t -> int -> int32 -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_float/index.html b/dev/sidekick/Sidekick_util/Vec_float/index.html index 77c863e3..631e50e1 100644 --- a/dev/sidekick/Sidekick_util/Vec_float/index.html +++ b/dev/sidekick/Sidekick_util/Vec_float/index.html @@ -1,2 +1,2 @@ -Vec_float (sidekick.Sidekick_util.Vec_float)

Module Sidekick_util.Vec_float

Vectors of floats

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := float
include Vec_sig.BASE with type elt := float
include Vec_sig.BASE_RO with type elt := float
type t
val size : t -> int
val get : t -> int -> float
val iter : f:(float -> unit) -> t -> unit
val iteri : f:(int -> float -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> float -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (float -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> float
val set : t -> int -> float -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := float
val to_iter : t -> float Iter.t
val to_array : t -> float array
val fold_left : ('a -> float -> 'a) -> 'a -> t -> 'a
val pp : float CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Vec_float (sidekick.Sidekick_util.Vec_float)

Module Sidekick_util.Vec_float

Vectors of floats

These vectors are more optimized than Vec.

include Vec_sig.S with type elt := float
include Vec_sig.BASE with type elt := float
include Vec_sig.BASE_RO with type elt := float
type t
val size : t -> int
val get : t -> int -> float
val iter : f:( float -> unit ) -> t -> unit
val iteri : f:( int -> float -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> float -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( float -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> float
val set : t -> int -> float -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := float
val to_iter : t -> float Iter.t
val to_array : t -> float array
val fold_left : ( 'a -> float -> 'a ) -> 'a -> t -> 'a
val pp : float CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/argument-1-B/index.html b/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/argument-1-B/index.html index 9268816f..87b70771 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/argument-1-B/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/argument-1-B/index.html @@ -1,2 +1,2 @@ -B (sidekick.Sidekick_util.Vec_sig.Make_extensions.1-B)

Parameter Make_extensions.1-B

type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
\ No newline at end of file +B (sidekick.Sidekick_util.Vec_sig.Make_extensions.1-B)

Parameter Make_extensions.1-B

type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/index.html b/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/index.html index ceb7d7c5..aa15261c 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/Make_extensions/index.html @@ -1,2 +1,2 @@ -Make_extensions (sidekick.Sidekick_util.Vec_sig.Make_extensions)

Module Vec_sig.Make_extensions

Parameters

module B : BASE_RO

Signature

val to_iter : B.t -> B.elt Iter.t
val to_array : B.t -> B.elt array
val fold_left : ('a -> B.elt -> 'a) -> 'a -> B.t -> 'a
val pp : B.elt CCFormat.printer -> B.t CCFormat.printer
\ No newline at end of file +Make_extensions (sidekick.Sidekick_util.Vec_sig.Make_extensions)

Module Vec_sig.Make_extensions

Parameters

module B : BASE_RO

Signature

val to_iter : B.t -> B.elt Iter.t
val to_array : B.t -> B.elt array
val fold_left : ( 'a -> B.elt -> 'a ) -> 'a -> B.t -> 'a
val pp : B.elt CCFormat.printer -> B.t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/index.html b/dev/sidekick/Sidekick_util/Vec_sig/index.html index e425b8ee..5fede8ef 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/index.html @@ -1,2 +1,4 @@ -Vec_sig (sidekick.Sidekick_util.Vec_sig)

Module Sidekick_util.Vec_sig

module type BASE_RO = sig ... end

Basics

module type BASE = sig ... end
module type EXTENSIONS = sig ... end
module type S = sig ... end
module Make_extensions (B : BASE_RO) : EXTENSIONS with type t := B.t and type elt := B.elt
\ No newline at end of file +Vec_sig (sidekick.Sidekick_util.Vec_sig)

Module Sidekick_util.Vec_sig

module type BASE_RO = sig ... end

Basics

module type BASE = sig ... end
module type EXTENSIONS = sig ... end
module type S = sig ... end
module Make_extensions + (B : BASE_RO) : + EXTENSIONS with type t := B.t and type elt := B.elt
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE/index.html b/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE/index.html index e9c8a63e..9e53b39c 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE/index.html @@ -1,2 +1,2 @@ -BASE (sidekick.Sidekick_util.Vec_sig.BASE)

Module type Vec_sig.BASE

include BASE_RO
type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
\ No newline at end of file +BASE (sidekick.Sidekick_util.Vec_sig.BASE)

Module type Vec_sig.BASE

include BASE_RO
type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE_RO/index.html b/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE_RO/index.html index 7a74401e..900abf71 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE_RO/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/module-type-BASE_RO/index.html @@ -1,2 +1,2 @@ -BASE_RO (sidekick.Sidekick_util.Vec_sig.BASE_RO)

Module type Vec_sig.BASE_RO

Basics

type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
\ No newline at end of file +BASE_RO (sidekick.Sidekick_util.Vec_sig.BASE_RO)

Module type Vec_sig.BASE_RO

Basics

type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/module-type-EXTENSIONS/index.html b/dev/sidekick/Sidekick_util/Vec_sig/module-type-EXTENSIONS/index.html index c52a1b3d..92444021 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/module-type-EXTENSIONS/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/module-type-EXTENSIONS/index.html @@ -1,2 +1,2 @@ -EXTENSIONS (sidekick.Sidekick_util.Vec_sig.EXTENSIONS)

Module type Vec_sig.EXTENSIONS

type elt
type t
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +EXTENSIONS (sidekick.Sidekick_util.Vec_sig.EXTENSIONS)

Module type Vec_sig.EXTENSIONS

type elt
type t
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html b/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html index 40e08d83..c9f3a9bb 100644 --- a/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html +++ b/dev/sidekick/Sidekick_util/Vec_sig/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sidekick.Sidekick_util.Vec_sig.S)

Module type Vec_sig.S

include BASE
include BASE_RO
type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +S (sidekick.Sidekick_util.Vec_sig.S)

Module type Vec_sig.S

include BASE
include BASE_RO
type elt
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/Vec_unit/index.html b/dev/sidekick/Sidekick_util/Vec_unit/index.html index d6289351..5916ffd4 100644 --- a/dev/sidekick/Sidekick_util/Vec_unit/index.html +++ b/dev/sidekick/Sidekick_util/Vec_unit/index.html @@ -1,2 +1,2 @@ -Vec_unit (sidekick.Sidekick_util.Vec_unit)

Module Sidekick_util.Vec_unit

include Vec_sig.S with type elt = unit
include Vec_sig.BASE with type elt = unit
include Vec_sig.BASE_RO with type elt = unit
type elt = unit
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:(elt -> unit) -> t -> unit
val iteri : f:(int -> elt -> unit) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : (elt -> bool) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ('a -> elt -> 'a) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file +Vec_unit (sidekick.Sidekick_util.Vec_unit)

Module Sidekick_util.Vec_unit

include Vec_sig.S with type elt = unit
include Vec_sig.BASE with type elt = unit
include Vec_sig.BASE_RO with type elt = unit
type elt = unit
type t
val size : t -> int
val get : t -> int -> elt
val iter : f:( elt -> unit ) -> t -> unit
val iteri : f:( int -> elt -> unit ) -> t -> unit
val create : ?cap:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val is_empty : t -> bool
val push : t -> elt -> unit
val fast_remove : t -> int -> unit

Remove element at index i without preserving order (swap with last element)

val filter_in_place : ( elt -> bool ) -> t -> unit
val ensure_size : t -> int -> unit
val pop : t -> elt
val set : t -> int -> elt -> unit
val shrink : t -> int -> unit
include Vec_sig.EXTENSIONS with type t := t and type elt := elt
val to_iter : t -> elt Iter.t
val to_array : t -> elt array
val fold_left : ( 'a -> elt -> 'a ) -> 'a -> t -> 'a
val pp : elt CCFormat.printer -> t CCFormat.printer
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util/index.html b/dev/sidekick/Sidekick_util/index.html index ab06c286..f593fa91 100644 --- a/dev/sidekick/Sidekick_util/index.html +++ b/dev/sidekick/Sidekick_util/index.html @@ -1,2 +1,2 @@ -Sidekick_util (sidekick.Sidekick_util)

Module Sidekick_util

module Fmt = CCFormat
module Util : sig ... end
module Vec : sig ... end

Vectors

module VecSmallInt : sig ... end

Vectors of int32 integers

module VecI32 : sig ... end

Vectors of int32 integers

module Vec_float : sig ... end

Vectors of floats

module Vec_unit : sig ... end
module Vec_sig : sig ... end
module Bitvec : sig ... end

Bitvector

module Int_id : sig ... end
module Int_tbl = Util.Int_tbl
module Int_set = Util.Int_set
module Int_map = Util.Int_map
module IArray : sig ... end
module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Backtrackable_ref : sig ... end
module Log : sig ... end

Logging function, for debugging

module Error : sig ... end
module Bag : sig ... end
module Stat : sig ... end
module Hash : sig ... end
module Profile : sig ... end
module Chunk_stack : sig ... end

Manage a list of chunks.

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 VecSmallInt : sig ... end

Vectors of int32 integers

module VecI32 : sig ... end

Vectors of int32 integers

module Vec_float : sig ... end

Vectors of floats

module Vec_unit : sig ... end
module Vec_sig : sig ... end
module Bitvec : sig ... end

Bitvector

module Int_id : sig ... end
module Int_tbl = Util.Int_tbl
module Int_set = Util.Int_set
module Int_map = Util.Int_map
module IArray : sig ... end
module Backtrack_stack : sig ... end
module Backtrackable_tbl : sig ... end
module Backtrackable_ref : sig ... end
module Log : sig ... end

Logging function, for debugging

module Error : sig ... end
module Bag : sig ... end
module Stat : sig ... end
module Hash : sig ... end
module Profile : sig ... end
module Chunk_stack : sig ... end

Manage a list of chunks.

module Intf = Sidekick_sigs
\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__/.dune-keep b/dev/sidekick/Sidekick_util__/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__/index.html b/dev/sidekick/Sidekick_util__/index.html deleted file mode 100644 index 9af96af0..00000000 --- a/dev/sidekick/Sidekick_util__/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__ (sidekick.Sidekick_util__)

Module Sidekick_util__

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrack_stack/.dune-keep b/dev/sidekick/Sidekick_util__Backtrack_stack/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html b/dev/sidekick/Sidekick_util__Backtrack_stack/index.html deleted file mode 100644 index 65c346ee..00000000 --- a/dev/sidekick/Sidekick_util__Backtrack_stack/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Backtrack_stack (sidekick.Sidekick_util__Backtrack_stack)

Module Sidekick_util__Backtrack_stack

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_ref/.dune-keep b/dev/sidekick/Sidekick_util__Backtrackable_ref/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Backtrackable_ref/index.html b/dev/sidekick/Sidekick_util__Backtrackable_ref/index.html deleted file mode 100644 index 6c8e89b2..00000000 --- a/dev/sidekick/Sidekick_util__Backtrackable_ref/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Backtrackable_ref (sidekick.Sidekick_util__Backtrackable_ref)

Module Sidekick_util__Backtrackable_ref

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/.dune-keep b/dev/sidekick/Sidekick_util__Backtrackable_tbl/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html b/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html deleted file mode 100644 index 6aa2a7a7..00000000 --- a/dev/sidekick/Sidekick_util__Backtrackable_tbl/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Backtrackable_tbl (sidekick.Sidekick_util__Backtrackable_tbl)

Module Sidekick_util__Backtrackable_tbl

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Bag/.dune-keep b/dev/sidekick/Sidekick_util__Bag/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Bag/index.html b/dev/sidekick/Sidekick_util__Bag/index.html deleted file mode 100644 index e981beb9..00000000 --- a/dev/sidekick/Sidekick_util__Bag/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Bag (sidekick.Sidekick_util__Bag)

Module Sidekick_util__Bag

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Bitvec/.dune-keep b/dev/sidekick/Sidekick_util__Bitvec/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Bitvec/index.html b/dev/sidekick/Sidekick_util__Bitvec/index.html deleted file mode 100644 index 782f3fa3..00000000 --- a/dev/sidekick/Sidekick_util__Bitvec/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Bitvec (sidekick.Sidekick_util__Bitvec)

Module Sidekick_util__Bitvec

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Chunk_stack/.dune-keep b/dev/sidekick/Sidekick_util__Chunk_stack/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Chunk_stack/index.html b/dev/sidekick/Sidekick_util__Chunk_stack/index.html deleted file mode 100644 index 20e59897..00000000 --- a/dev/sidekick/Sidekick_util__Chunk_stack/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Chunk_stack (sidekick.Sidekick_util__Chunk_stack)

Module Sidekick_util__Chunk_stack

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Error/.dune-keep b/dev/sidekick/Sidekick_util__Error/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Error/index.html b/dev/sidekick/Sidekick_util__Error/index.html deleted file mode 100644 index 74236838..00000000 --- a/dev/sidekick/Sidekick_util__Error/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Error (sidekick.Sidekick_util__Error)

Module Sidekick_util__Error

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Hash/.dune-keep b/dev/sidekick/Sidekick_util__Hash/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Hash/index.html b/dev/sidekick/Sidekick_util__Hash/index.html deleted file mode 100644 index 676c0217..00000000 --- a/dev/sidekick/Sidekick_util__Hash/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Hash (sidekick.Sidekick_util__Hash)

Module Sidekick_util__Hash

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__IArray/.dune-keep b/dev/sidekick/Sidekick_util__IArray/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__IArray/index.html b/dev/sidekick/Sidekick_util__IArray/index.html deleted file mode 100644 index 419e6750..00000000 --- a/dev/sidekick/Sidekick_util__IArray/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__IArray (sidekick.Sidekick_util__IArray)

Module Sidekick_util__IArray

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Int_id/.dune-keep b/dev/sidekick/Sidekick_util__Int_id/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Int_id/index.html b/dev/sidekick/Sidekick_util__Int_id/index.html deleted file mode 100644 index e4810044..00000000 --- a/dev/sidekick/Sidekick_util__Int_id/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Int_id (sidekick.Sidekick_util__Int_id)

Module Sidekick_util__Int_id

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Log/.dune-keep b/dev/sidekick/Sidekick_util__Log/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Log/index.html b/dev/sidekick/Sidekick_util__Log/index.html deleted file mode 100644 index 048bde14..00000000 --- a/dev/sidekick/Sidekick_util__Log/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Log (sidekick.Sidekick_util__Log)

Module Sidekick_util__Log

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Profile/.dune-keep b/dev/sidekick/Sidekick_util__Profile/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Profile/index.html b/dev/sidekick/Sidekick_util__Profile/index.html deleted file mode 100644 index fdfa2004..00000000 --- a/dev/sidekick/Sidekick_util__Profile/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Profile (sidekick.Sidekick_util__Profile)

Module Sidekick_util__Profile

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Stat/.dune-keep b/dev/sidekick/Sidekick_util__Stat/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Stat/index.html b/dev/sidekick/Sidekick_util__Stat/index.html deleted file mode 100644 index 3a540f59..00000000 --- a/dev/sidekick/Sidekick_util__Stat/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Stat (sidekick.Sidekick_util__Stat)

Module Sidekick_util__Stat

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Util/.dune-keep b/dev/sidekick/Sidekick_util__Util/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Util/index.html b/dev/sidekick/Sidekick_util__Util/index.html deleted file mode 100644 index fda294d8..00000000 --- a/dev/sidekick/Sidekick_util__Util/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Util (sidekick.Sidekick_util__Util)

Module Sidekick_util__Util

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec/.dune-keep b/dev/sidekick/Sidekick_util__Vec/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Vec/index.html b/dev/sidekick/Sidekick_util__Vec/index.html deleted file mode 100644 index fc58a062..00000000 --- a/dev/sidekick/Sidekick_util__Vec/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Vec (sidekick.Sidekick_util__Vec)

Module Sidekick_util__Vec

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__VecI32/.dune-keep b/dev/sidekick/Sidekick_util__VecI32/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__VecI32/index.html b/dev/sidekick/Sidekick_util__VecI32/index.html deleted file mode 100644 index 1c17a5a7..00000000 --- a/dev/sidekick/Sidekick_util__VecI32/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__VecI32 (sidekick.Sidekick_util__VecI32)

Module Sidekick_util__VecI32

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__VecSmallInt/.dune-keep b/dev/sidekick/Sidekick_util__VecSmallInt/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__VecSmallInt/index.html b/dev/sidekick/Sidekick_util__VecSmallInt/index.html deleted file mode 100644 index 72218f87..00000000 --- a/dev/sidekick/Sidekick_util__VecSmallInt/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__VecSmallInt (sidekick.Sidekick_util__VecSmallInt)

Module Sidekick_util__VecSmallInt

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_float/.dune-keep b/dev/sidekick/Sidekick_util__Vec_float/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Vec_float/index.html b/dev/sidekick/Sidekick_util__Vec_float/index.html deleted file mode 100644 index 5e05cca5..00000000 --- a/dev/sidekick/Sidekick_util__Vec_float/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Vec_float (sidekick.Sidekick_util__Vec_float)

Module Sidekick_util__Vec_float

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_sig/.dune-keep b/dev/sidekick/Sidekick_util__Vec_sig/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Vec_sig/index.html b/dev/sidekick/Sidekick_util__Vec_sig/index.html deleted file mode 100644 index 727bca89..00000000 --- a/dev/sidekick/Sidekick_util__Vec_sig/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Vec_sig (sidekick.Sidekick_util__Vec_sig)

Module Sidekick_util__Vec_sig

\ No newline at end of file diff --git a/dev/sidekick/Sidekick_util__Vec_unit/.dune-keep b/dev/sidekick/Sidekick_util__Vec_unit/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_util__Vec_unit/index.html b/dev/sidekick/Sidekick_util__Vec_unit/index.html deleted file mode 100644 index 8ed3f7d5..00000000 --- a/dev/sidekick/Sidekick_util__Vec_unit/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Sidekick_util__Vec_unit (sidekick.Sidekick_util__Vec_unit)

Module Sidekick_util__Vec_unit

\ No newline at end of file diff --git a/dev/sidekick-bin/Sidekick_smtlib/.dune-keep b/dev/sidekick/Sidekick_zarith/.dummy similarity index 100% rename from dev/sidekick-bin/Sidekick_smtlib/.dune-keep rename to dev/sidekick/Sidekick_zarith/.dummy diff --git a/dev/sidekick/Sidekick_zarith/.dune-keep b/dev/sidekick/Sidekick_zarith/.dune-keep deleted file mode 100644 index e69de29b..00000000 diff --git a/dev/sidekick/Sidekick_zarith/Int/index.html b/dev/sidekick/Sidekick_zarith/Int/index.html index 68ad0778..440efaee 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 with type t = Z.t
type t = Z.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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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.INT with type t = Z.t
include Sidekick_arith.NUM with type t = Z.t
type t = Z.t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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
val pred : t -> t
val gcd : t -> t -> t
val sqrt : t -> t
val divexact : t -> t -> t
val (/) : t -> t -> t
val ediv : t -> t -> t

Euclidian division

val rem : t -> t -> t
val probab_prime : t -> bool
val pow : t -> int -> 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 d7e1f4b9..98bea41b 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 with type t = Q.t
type t = Q.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
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val is_real : t -> bool

A proper real, not nan/infinity

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 with type t = Q.t
type t = Q.t
val zero : t
val one : t
val minus_one : t
val abs : t -> t
val sign : t -> int
val of_int : int -> t
include Sidekick_sigs.EQ with type t := t
val equal : t -> t -> bool
include Sidekick_sigs.ORD with type t := t
val compare : t -> t -> int
include Sidekick_sigs.HASH with type t := t
val hash : t -> int
include Sidekick_sigs.PRINT with type t := 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 infinity : t

+infinity

val minus_infinity : t
val of_bigint : bigint -> t
val is_real : t -> bool

A proper real, not nan/infinity

val is_int : t -> bool

Is this a proper integer?

val as_int : t -> bigint option

Convert to an integer if it's one, return None otherwise

val floor : t -> bigint

Integer equal or below

val ceil : t -> bigint

Integer equal or above

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 2ca4d7d1..7ac247ea 100644 --- a/dev/sidekick/Sidekick_zarith/index.html +++ b/dev/sidekick/Sidekick_zarith/index.html @@ -1,2 +1,3 @@ -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_FULL 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 6c97262b..77a01c96 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.drup

The entry point of this library is the module: Sidekick_drup.

Library sidekick.lit

The entry point of this library is the module: Sidekick_lit.

Library sidekick.memtrace

The entry point of this library is the module: Sidekick_memtrace.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.quip

The entry point of this library is the module: Sidekick_quip.

Library sidekick.sat

The entry point of this library is the module: Sidekick_sat.

Library sidekick.sigs

The entry point of this library is the module: Sidekick_sigs.

Library sidekick.smt-solver

The entry point of this library is the module: Sidekick_smt_solver.

Library sidekick.tef

The entry point of this library is the module: Sidekick_tef.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.th-cstor

The entry point of this library is the module: Sidekick_th_cstor.

Library sidekick.th-data

The entry point of this library is the module: Sidekick_th_data.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

Library sidekick.zarith

The entry point of this library is the module: Sidekick_zarith.

\ No newline at end of file +index (sidekick.index)

sidekick index

Library sidekick.arith

The entry point of this library is the module: Sidekick_arith.

Library sidekick.arith-lia

The entry point of this library is the module: Sidekick_arith_lia.

Library sidekick.arith-lra

The entry point of this library is the module: Sidekick_arith_lra.

Library sidekick.cc

The entry point of this library is the module: Sidekick_cc.

Library sidekick.core

The entry point of this library is the module: Sidekick_core.

Library sidekick.drup

The entry point of this library is the module: Sidekick_drup.

Library sidekick.intsolver

The entry point of this library is the module: Sidekick_intsolver.

Library sidekick.lit

The entry point of this library is the module: Sidekick_lit.

Library sidekick.memtrace

The entry point of this library is the module: Sidekick_memtrace.

Library sidekick.mini-cc

The entry point of this library is the module: Sidekick_mini_cc.

Library sidekick.quip

The entry point of this library is the module: Sidekick_quip.

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.simplex

The entry point of this library is the module: Sidekick_simplex.

Library sidekick.smt-solver

The entry point of this library is the module: Sidekick_smt_solver.

Library sidekick.tef

The entry point of this library is the module: Sidekick_tef.

Library sidekick.th-bool-static

The entry point of this library is the module: Sidekick_th_bool_static.

Library sidekick.th-cstor

The entry point of this library is the module: Sidekick_th_cstor.

Library sidekick.th-data

The entry point of this library is the module: Sidekick_th_data.

Library sidekick.util

The entry point of this library is the module: Sidekick_util.

Library sidekick.zarith

The entry point of this library is the module: Sidekick_zarith.

\ No newline at end of file