Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`Satml_frontend` assumes that `assume` and `check_sat` are always called on a SatML environment with no prior decisions. It works in the current codebase because, in the presence of pop/push, we always restart from a fresh environment. The assertion: ```ocaml assert (SAT.decision_level env.satml == 0) ``` is replaced with: ```ocaml assert (SAT.decision_level env.satml <= SAT.assertion_level env.satml) ``` Notice that we cannot enforce the assertion: ```ocaml assert (SAT.decision_level env.satml = SAT.assertion_level env.satml) ``` Consider for instance: ```ocaml let env = SAT.env () in SAT.push env 1; SAT.assume env f; (* <--- HERE *) ... ``` Internally, `SAT.assume env f` adds the formula `g => f` into the environment of SatML where `g` is a guard formula introduced in `SAT.push`. But `SatML.assume` does not decide the guard formula [g], so the decision level is 0 but the assertion level is 1. Guards are decided (with the highest priority) in `SatML.solve`, which is called by `SAT.unsat`. I didn't add the new assertion into `SAT.assume_th_elt` because this function is only used for handling the theory concept in native language and we always invoke it at the assertion level 0.
- Loading branch information