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

Incremental smt2 #371

Merged
merged 40 commits into from
Dec 21, 2020
Merged

Incremental smt2 #371

merged 40 commits into from
Dec 21, 2020

Conversation

ACoquereau
Copy link
Contributor

No description provided.

@ACoquereau ACoquereau requested a review from iguerNL October 29, 2020 11:08
@ACoquereau ACoquereau marked this pull request as draft October 30, 2020 15:55
@ACoquereau ACoquereau marked this pull request as ready for review November 6, 2020 12:58
src/lib/frontend/input.ml Outdated Show resolved Hide resolved
src/lib/frontend/input.mli Outdated Show resolved Hide resolved
src/lib/frontend/parsed_interface.ml Outdated Show resolved Hide resolved
src/lib/structures/errors.ml Outdated Show resolved Hide resolved
src/lib/structures/errors.ml Outdated Show resolved Hide resolved
src/lib/structures/commands.ml Show resolved Hide resolved
src/bin/text/main_text.ml Outdated Show resolved Hide resolved
src/parsers/psmt2_to_alt_ergo.ml Outdated Show resolved Hide resolved
src/parsers/psmt2_to_alt_ergo.ml Outdated Show resolved Hide resolved
src/parsers/psmt2_to_alt_ergo.ml Outdated Show resolved Hide resolved
Copy link
Contributor

@iguerNL iguerNL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I don't know if I wrote it somewhere: Can --timeout-per-goal option be used in incremental mode ?

  • Another question related to save/replay used-context: an extra work is probably needed. This is probably already done for native-lang's multi-goals feature, and we could adapt it for push/pop

src/lib/reasoners/sat_solver_sig.ml Outdated Show resolved Hide resolved
src/lib/reasoners/sat_solver_sig.ml Outdated Show resolved Hide resolved
src/lib/reasoners/sat_solver_sig.mli Show resolved Hide resolved
src/lib/reasoners/satml.ml Show resolved Hide resolved
src/lib/reasoners/satml.ml Show resolved Hide resolved
src/lib/reasoners/satml.ml Outdated Show resolved Hide resolved
src/lib/frontend/typechecker.ml Outdated Show resolved Hide resolved
src/lib/frontend/typechecker.ml Outdated Show resolved Hide resolved
src/lib/frontend/typechecker.mli Outdated Show resolved Hide resolved
src/lib/frontend/frontend.ml Outdated Show resolved Hide resolved
src/lib/structures/typed.ml Outdated Show resolved Hide resolved
src/lib/frontend/typechecker.ml Outdated Show resolved Hide resolved
src/lib/frontend/typechecker.ml Outdated Show resolved Hide resolved
@ACoquereau
Copy link
Contributor Author

* I don't know if I wrote it somewhere: Can `--timeout-per-goal` option be used in incremental mode ?

Yes, it works pretty well

* Another question related to save/replay used-context: an extra work is probably needed. This is probably already done for native-lang's multi-goals feature, and we could adapt it for push/pop

I did not look into this issue but you're right we need to fix this

src/lib/reasoners/satml.ml Show resolved Hide resolved
src/lib/reasoners/satml.ml Show resolved Hide resolved
Copy link
Contributor

@iguerNL iguerNL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably other refs inside or outside fun_sat.ml and satml_frontend.ml that need to be saved (on push) and restored (on pop). Like for instance,

  • steps counter
  • fied model_gen_mode in fun_sat.ml
  • other local refs related to model generation in fun_sat.ml
  let all_models_sat_env = ref None
  let latest_saved_env = ref None
  let terminated_normally = ref false

In fun_sat for instances, we should probably have a function similar to reset_refs () to save/restore refs. The data can probably be directly stored in incremental.stack_guard. A similar solution should also work for satml_frontend.

src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Outdated Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Outdated Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Outdated Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
@@ -1794,7 +1878,8 @@ module Make (Th : Theory.S) : Sat_solver_sig.S = struct
inst = Inst.add_predicate env.inst gf dep }
else
begin
assert (not (ME.mem a_t env.ground_preds));
if Stack.is_empty env.incremental.stack_guard then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pred_def (of ground and non-ground predicates), should take guards into account (see detailed commented in satml_frontend.ml)

@iguerNL iguerNL self-requested a review December 18, 2020 13:37
@ACoquereau ACoquereau linked an issue Dec 18, 2020 that may be closed by this pull request
@ACoquereau ACoquereau linked an issue Dec 18, 2020 that may be closed by this pull request
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Show resolved Hide resolved
src/lib/reasoners/fun_sat.ml Outdated Show resolved Hide resolved
src/lib/reasoners/instances.ml Outdated Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Show resolved Hide resolved
src/lib/reasoners/satml_frontend.ml Outdated Show resolved Hide resolved
@ACoquereau ACoquereau merged commit dd99e3c into OCamlPro:next Dec 21, 2020
@ACoquereau ACoquereau deleted the incremental-smt2 branch December 21, 2020 13:29
ACoquereau added a commit to ACoquereau/alt-ergo that referenced this pull request Jan 25, 2021
* Add smt-lib2 incremental (push/pop commands) support through Alt-Ergo

Co-authored-by: OriginLabs-Iguernlala <mohamed.iguernlala@origin-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[incremental] check soundness of model_gen in fun_sat [incremental] correctly handle check-sat-assuming
2 participants