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 let .. in constructions in Z3 backend #434

Merged
merged 7 commits into from
Mar 28, 2023
Merged

Conversation

R1kM
Copy link
Collaborator

@R1kM R1kM commented Mar 28, 2023

This PR extends the Z3 backend with support for let ... in constructs in Catala source programs.
let x = e1 in e2 expressions are translated to EApp (fun x -> e2) e1 . This PR recognizes this specific pattern,
and performs beta-reduction before translating the expression post-substitution.
It also adds a small example inspired from the one in #389.

Fixes #389

@R1kM R1kM requested a review from denismerigoux March 28, 2023 03:59
Copy link
Contributor

@denismerigoux denismerigoux left a comment

Choose a reason for hiding this comment

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

Thanks!

compiler/verification/z3backend.real.ml Show resolved Hide resolved
tests/test_proof/bad/let_in_condition-empty.catala_en Outdated Show resolved Hide resolved
@R1kM R1kM merged commit b85a199 into master Mar 28, 2023
@R1kM R1kM deleted the afromher_proof branch March 28, 2023 21:41
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.

VC generation failing with let bindings in conditions
2 participants