Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HolSmt: orient definitions in a canonical form
In Z3 proof replay, sometimes we may end up with definitions of the form: var1 = var2 This kind of definition may theoretically arise in three different places: 1. As an explicit Z3-provided definition in `intro-def` proof rules 2. As an implicit Z3-provided definition which we instantiate as part of `rewrite` proof rules (after term unification) 3. When unifying terms to add new definitions in the process of removing the definitions from the final theorem. This can be problematic if `var1` is not a Z3-defined variable (which means `var2` is, and thus the definition should be reversed) or if both `var1` and `var2` are Z3-defined variables. If both vars are Z3-defined variables, we may end up with the following two hypotheses in the final theorem, which `remove_definitions` can't handle due to the circularity: var1 = var2 var2 = var1 To avoid ending up with such problematic definitions, this commit introduces code to change `var1 = var2` into `var2 = var1`, so that the left-hand side is always a Z3-defined variable and, if the right-hand side is also a Z3-defined variable, the former is not "greater" than the latter (for some definition of "greater").
- Loading branch information
1 parent
4b76320
commit 120e7bb
Showing
3 changed files
with
77 additions
and
13 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