Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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 #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 #925 which seems to be the only incorrect use.
- Loading branch information