Replace fresh terms by abstract values in all subterms#1280
Draft
Halbaroth wants to merge 3 commits intoOCamlPro:nextfrom
Draft
Replace fresh terms by abstract values in all subterms#1280Halbaroth wants to merge 3 commits intoOCamlPro:nextfrom
Halbaroth wants to merge 3 commits intoOCamlPro:nextfrom
Conversation
This field is unused and is not correctly filled in the UF module.
We do not replace all the fresh names by abstract values during the model generation. This commit adds an argument `abstract` to [X.to_model_term]. `abstract` is a function of type `E.t -> E.t` that generates abstract values and `X.to_model_term` calls it on appropriate leaves. `abstract` contains a cache in its closure to prevent from duplicating abstract values for the same name.
Collaborator
Author
Halbaroth
added a commit
to Halbaroth/alt-ergo
that referenced
this pull request
Jan 30, 2025
The fix consists in using `declared_ids` to guarantee that we never define symbols that have not been declared at the current assertion level in models. A proper fix requires a lot of work as we need to rework the push/pop mechanism of CDCL. This PR is rebased OCamlPro#1280 to ensure we won't mix identifiers from different assertion levels as it could happen with string-based identifiers.
Draft
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_termis 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_termis a function of typeE.t -> E.tthat 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_valuesfield inModels. This field was only used to cache the result ofmodel_repr_of_terminUf.I replaced it by a local cache in the closure of
extract_concrete_model.Now the output of the example of #1270 is: