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(Shostak): names must return
false
for X.is_constant
The `X.is_constant` function is intended to determine whether a semantic value is a constant value (it is documented to be equivalent to having an empty `X.leaves`). This invariant is relied upon by the code for delayed computation in `Rel_utils` that it was introduced for in OCamlPro#869. While the change only makes the delayed computation code less efficient, it makes the `X.is_constant` function worthless for its original purpose in planned patches. The invariant was broken in OCamlPro#925 which causes `X.is_constant` to now consider some terms (specifically, names, i.e. uninterpreted constants) as constants, which is incorrect for the intended and documented purpose of `X.is_constant` (uninterpreted constants have different values in different context, they are thus not constant values). This patch restores the original semantic of `X.is_constant` with improved documentation, and removes the assertion introduced in OCamlPro#925 which seems to be the only incorrect use.
- Loading branch information
1 parent
e7fc664
commit 5e68efe
Showing
3 changed files
with
13 additions
and
11 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