Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Support uninterpreted polymorphic functions in sbv/what4 backends. #92

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

brianhuffman
Copy link
Contributor

This works by declaring monomorphic uninterpreted functions at
each type instance, using a name suffix based on the type value.

Fixes GaloisInc/saw-script#320.

This works by declaring monomorphic uninterpreted functions at
each type instance, using a name suffix based on the type value.

Fixes GaloisInc/saw-script#320.
-- | A (partial) injective mapping from type values to strings. These
-- are intended to be useful as suffixes for names of type instances
-- of uninterpreted constants.
suffixTValue :: TValue sym -> Maybe String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function for selecting type-based suffixes injective? I think it is, but it isn't immediately clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. Basically it serializes the TValue with a pre-order traversal, and all the strings it uses to represent the nodes are distinct. So you could always unambiguously parse them back in.

@brianhuffman brianhuffman merged commit 066e7a8 into master Oct 21, 2020
@brianhuffman brianhuffman deleted the unint-poly branch January 22, 2021 12:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uninformative error message for uninterpreted polymorphic functions
2 participants