Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model generation support for SatML #829

Merged
merged 28 commits into from
Sep 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
914d283
Theory: harden 'compute_concrete_model' function
iguerNL May 1, 2021
982bb92
Push the test 'get_case_split_policy() == origin' into Theory.do_case…
iguerNL May 1, 2021
de26aae
CS: functions return all the env instead of just 'gamma_finite'.
iguerNL May 1, 2021
fed58a7
Fun_sat: refactor the way models are handled/printed
iguerNL May 1, 2021
7447ca3
satML: add missing case-split strategies
iguerNL May 1, 2021
0c37f66
satML: implement models generation.
iguerNL May 1, 2021
1ace3d9
Make model tests negative
Halbaroth Sep 15, 2023
3ac006b
Reindent
Halbaroth Sep 21, 2023
4b03759
Update documentation about `output_concrete_model`
Halbaroth Sep 22, 2023
0251733
Document the timeout_reason ADT
Halbaroth Sep 22, 2023
9496cf6
poetry
Halbaroth Sep 22, 2023
115a16a
Restore the comment about `reinit_cpt`
Halbaroth Sep 22, 2023
986321d
Fix spelling
Halbaroth Sep 22, 2023
b39ecb8
Remainder to the issue 834
Halbaroth Sep 22, 2023
9507d63
Simplify get-model processing
Halbaroth Sep 22, 2023
1ca2286
Remove SAT solver choices while model generating
Halbaroth Sep 21, 2023
3d75176
Fix model output
Halbaroth Sep 21, 2023
be505b4
All the model tests are positive
Halbaroth Sep 21, 2023
afb8e44
Remove deprecated cram tests
Halbaroth Sep 21, 2023
e0c9b34
Test models with all the SAT solvers
Halbaroth Sep 21, 2023
b45ee04
Restoring dump-models option
Halbaroth Sep 22, 2023
a155756
Use the right post-solve SAT environment for models
Halbaroth Sep 22, 2023
709dc42
Print dump models on the channel models
Halbaroth Sep 26, 2023
cd998e7
Prevent printing internal names in models
Halbaroth Sep 26, 2023
819935b
Promote tests
Halbaroth Sep 26, 2023
a6caf6a
Revert "Simplify get-model processing"
Halbaroth Sep 26, 2023
d4301df
Review changes
Halbaroth Sep 26, 2023
3299ff7
Test only models with FunSAT
Halbaroth Sep 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Theory: harden 'compute_concrete_model' function
iguerNL authored and Halbaroth committed Sep 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 914d283ff9dca011627d624e26af9b3851278aca
9 changes: 6 additions & 3 deletions src/lib/reasoners/theory.ml
Original file line number Diff line number Diff line change
@@ -547,7 +547,7 @@ module Main_Default : S = struct
let _, d2, p2 = e2 in
(d1 > d2 || d1 = d2 && p1 > p2) && is_ordered_list ((e2::l)::r)

let do_case_split t =
let do_case_split_aux t ~for_model =
let in_facts_l = t.cs_pending_facts in
let t = {t with cs_pending_facts = []} in
let facts = CC_X.empty_facts () in
@@ -557,12 +557,15 @@ module Main_Default : S = struct
CC_X.add_fact facts (LTerm a, ex, Th_util.Other))
) in_facts_l;

let t, ch = try_it t facts ~for_model:false in
let t, ch = try_it t facts ~for_model in
let choices = extract_terms_from_choices SE.empty t.choices in
let choices_terms = extract_terms_from_assumed choices ch in

{t with terms = Expr.Set.union t.terms choices_terms}, choices_terms

let do_case_split t =
do_case_split_aux t ~for_model:false

(* facts are sorted in decreasing order with respect to (dlvl, plvl) *)
let assume ordered in_facts t =
let facts = CC_X.empty_facts () in
@@ -744,7 +747,7 @@ module Main_Default : S = struct
let get_case_split_env t = t.gamma_finite

let compute_concrete_model env =
fst (try_it env (CC_X.empty_facts ()) ~for_model:true)
fst @@ do_case_split_aux env ~for_model:true


let assume_th_elt t th_elt dep =