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

Eval type rep #845

Merged
merged 6 commits into from Nov 18, 2021
Merged

Eval type rep #845

merged 6 commits into from Nov 18, 2021

Conversation

talsewell
Copy link
Contributor

This adds the "type representation" feature that will eventually be needed by Eval.

It also cleans up the EqualityType proof code a fair bit.

This PR is mostly for testing, there's no need for this feature in master for the time being.

In addition to the type-representation invariants (e.g. LIST_TYPE),
the translator now also defines type-representation functions which
map to the v type, for any type for which it could previously prove
EqualityType.

This is needed in the Eval proofs to represent the config oracle as
a sequence of v values, to avoid further type parameters.
Eliminate some precond conjuncts of equality lemmas that can be
proven from other equality lemmas when they are added to the store.
This saves some repeated work later.
This one doesn't use measures, and could in principle work with
mutually recursive datatypes (which don't seem to be supported
elsewhere in the translator).
Function types passed to datatype constructors mean that
EqualityType and IsTypeRep are (probably) impossible. However,
the provers now handle these datatypes normally, although the
saved theorems have (probably) impossible preconditions.
Instead of hand-adding a workaround for the function type,
the code patches in a dummy representation for any unknown
types, with various plumbing changes.
@myreen myreen merged commit a998385 into CakeML:master Nov 18, 2021
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.

None yet

2 participants