Replace fresh terms by abstract values in all subterms #1280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue #1270. More precisely,
X.to_model_term
. The purpose ofto_model_term
is to generate a model term from constant semantic values. Unfortunately, these model terms are not exactly the model values of the SMT-LIB standard because they can contain fresh terms. The new argument ofX.to_model_term
is a function of typeE.t -> E.t
that is used to create abstract values from fresh terms. A cache is hidden in the closure of this function to prevent from duplicating abstract values for thesame fresh terms.
term_values
field inModels
. This field was only used to cache the result ofmodel_repr_of_term
inUf
.I replaced it by a local cache in the closure of
extract_concrete_model
.Now the output of the example of #1270 is: