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 the usage of infix, overloaded syntax in why3 output #915

Closed
wants to merge 3 commits into from

Conversation

xldenis
Copy link
Collaborator

@xldenis xldenis commented Dec 23, 2023

This PR removes as much infix syntax as possible in the Why3 output. A few operators must be left: /\ \/, = and <> must be emitted as before since they have special handling down later in the compilation pipelines.

Several issues remain:

  • Task views now talk about le1 instead of <=.
  • Some proofs are not passing, most likely related to special encoding in smt of certain symbosl by drivers.
  • The code is rather ugly.

@xldenis
Copy link
Collaborator Author

xldenis commented Dec 23, 2023

Oh additionally, the encoding of slice / array literals is broken since the [| ... |] syntax depends on their existing a (=) symbol which happens to have the correct type.

@xldenis xldenis force-pushed the no-infix branch 3 times, most recently from 9d80aeb to 26e2da1 Compare January 3, 2024 20:56
@xldenis
Copy link
Collaborator Author

xldenis commented Jan 4, 2024

This PR doesn't really advance us unless we also get rid of the coercions for the to_int function in machine integers, which we can do but requires more work and tedium.

Additionally, this has really clear performance implications, as why3 doesn't have good support for inlining so wrapping definitions can have huge impact even if those wrappers are trivial.

Perhaps this can be revived in a different form: making all arithmetic and comparison operators let functions or let predicates (as appropriate).

@xldenis xldenis closed this Jan 7, 2024
@xldenis xldenis deleted the no-infix branch June 24, 2024 21:09
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.

1 participant