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

Update Lib_usage.ml #1062

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion dune

This file was deleted.

1 change: 1 addition & 0 deletions examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

(rule
(alias runtest)
(package alt-ergo-lib)
(action
(ignore-stdout
(ignore-stderr
Expand Down
22 changes: 8 additions & 14 deletions examples/lib_usage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,18 @@ let typed, _env = Typechecker.type_file parsed

let pbs = Typechecker.split_goals_and_cnf typed

module SAT = Fun_sat.Make(Theory.Main_Default)
module SAT = Fun_sat_frontend.Make(Theory.Main_Default)
module FE = Frontend.Make(SAT)

let () =
List.iter
(fun (pb, _goal_name) ->
let ctxt = Frontend.init_all_used_context () in
let acc0 = SAT.empty (), `Unknown (SAT.empty ()), Explanation.empty in
let s = Stack.create () in
let _env, consistent, _ex =
List.fold_left
(fun acc d ->
FE.process_decl (fun _ _ -> ()) ctxt s acc d
) acc0 pb
in
match consistent with
| `Sat _ | `Unknown _ ->
Format.printf "unknown"
let env = FE.init_env ctxt in
List.iter (FE.process_decl env) pb;
match env.res with
| `Sat | `Unknown ->
Format.printf "unknown@."
| `Unsat ->
Format.printf "unsat"
)pbs
Format.printf "unsat@."
) pbs
Loading