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

(Polymorphic) algebraic datatypes #11

Open
dariusf opened this issue Jan 25, 2024 · 0 comments
Open

(Polymorphic) algebraic datatypes #11

dariusf opened this issue Jan 25, 2024 · 0 comments

Comments

@dariusf
Copy link
Collaborator

dariusf commented Jan 25, 2024

  • In hiptypes.ml, the definition of types needs to change, same for the term language as ADT values/operations need to be added
  • Type declarations are structure items, so they can be handled by transform_str in core_lang.ml
  • The caller of transform_str is process_items in hiplib.ml. It updates prog, so adding the types there is one option. It's likely easier to use a global variable for them (globals.ml), as they need to be passed all the way down to the prover
  • infer_types.ml has to be updated to produce those types when encountering values of ADTs
  • forward_rules.ml has to be updated to for match to be aware of ADT types
  • Both Z3 and Why3 have support for algebraic data types, so both can be implemented
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

No branches or pull requests

1 participant