forked from OCamlPro/alt-ergo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(FPA): Separate semantic triggers upon trigger construction
Currently, the theories are responsible for populating the `semantic` field of triggers when a lemma with semantic triggers is added to the theory (call to `assume_th_elt`). This means that such a lemma lives for some time *without* semantic triggers: in particular, it is initially created using `mk_forall` without semantic triggers. During that call, the guard in `find_particular_subst` preventing the "particular substitution" optimization from triggering for lemmas with semantic trigger is ignored; which means that the "particular substitution" optimization is actually applied to lemmas with semantic triggers. In particular, this optimization makes the lemma `float_of_pos_pow_of_two` in the FPA theory unsound, because it removes the check that `x` is actually a power of two, and causes OCamlPro#1111. This patch makes the `Expr` module responsible for separating syntaxic and semantic triggers, rather than the theory. This ensures that a lemma with semantic triggers never appears as having no semantic triggers. In order to make sure this invariant is properly maintained, the `trigger` type is again made private to the `Expr` module. This required moving from sorting code from the `Matching` module to the `Expr` module, also ensuring that triggers are properly sorted for matching purposes at all times. Fixes OCamlPro#1111
- Loading branch information
1 parent
b464ec3
commit ed5e4a5
Showing
9 changed files
with
360 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.