Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of partial fields and add warning. #111

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Conversation

kquick
Copy link
Member

@kquick kquick commented Mar 24, 2021

Partial fields are the situation where an ADT is defined with record
syntax. The field accessors are of type ADT -> field, but the field
is only valid for one constructor of the ADT, so proper usage requires
matching on the constructor before using field accessors, and omitting
this matching can lead to invalid accesses.

This change modifies the only use of this in What4 to ensure that the
Record types are not ADT's and vice-versa.

Partial fields are the situation where an ADT is defined with record
syntax.  The field accessors are of type `ADT -> field`, but the field
is only valid for one constructor of the ADT, so proper usage requires
matching on the constructor before using field accessors, and omitting
this matching can lead to invalid accesses.

This change modifies the only use of this in What4 to ensure that the
Record types are not ADT's and vice-versa.
@kquick kquick requested a review from robdockins March 24, 2021 16:12
@kquick kquick merged commit bb38b0c into master Mar 25, 2021
@kquick kquick deleted the nopartialfields branch March 25, 2021 21:08
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Apr 8, 2021
RyanGlScott added a commit that referenced this pull request May 10, 2021
This updates `what4-{abc,blt}` to use the new `SolverStartSATQueryRec`
and `SolverEndSATQueryRec` data types introduced in #111.

Fixes #119.
RyanGlScott added a commit that referenced this pull request May 10, 2021
This updates `what4-{abc,blt}` to use the new `SolverStartSATQueryRec`
and `SolverEndSATQueryRec` data types introduced in #111.

Fixes #119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants