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

Add support for custom ghost type as model #228

Merged
merged 9 commits into from
May 23, 2024

Conversation

n-osborne
Copy link
Collaborator

This PR proposes an answer to #209 by adding a translation for type_declarations in ortac-core and use it in ortac-qcheck-stm.

The translation doesn't support constructors with inlined records, as they are buggy in Gospel anyway and it is still an open question whether they will be fixed or removed there.

The use of translated gospel types in ortac-qcheck-stm is naive: the symbols for constructors or record fields as translated are they appears in the gospel ast and are not stored in the context (as it is the case for gospel functions).

@n-osborne n-osborne added this to the 0.3 milestone May 22, 2024
Copy link
Contributor

@shym shym left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Just a tiny comment:

  • 90034f5 Factorize logic of core_type_of_ty
    The modification to the .mli should be in the previous commit.
    Maybe the auxiliary common function could be called core_type_of_ty_aux or core_type_of_ty_common instead of _core_type_of_ty?

Adapted from core_type_of_ty_with_subst
Constructors with record as argument are not supported yet, as they are
buggy in Gospel.
This commit proposes a naive implementation, no checks are done on the
constructors name for example.
@n-osborne
Copy link
Collaborator Author

CI failure is unrelated. Merging.

@n-osborne n-osborne merged commit 373f93b into ocaml-gospel:main May 23, 2024
2 of 3 checks passed
@n-osborne n-osborne deleted the support-custom-ghost-types branch May 23, 2024 16:54
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