-
Notifications
You must be signed in to change notification settings - Fork 479
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
PLT-1398 Set up typechecking property tests for all PIR compiler passes #5565
PLT-1398 Set up typechecking property tests for all PIR compiler passes #5565
Conversation
a7d7ad6
to
246c4c9
Compare
I'll be adding other PIR compiler passes. Feel free to look at the tests for the simplifier passes. |
c1a5e7b
to
fcd895e
Compare
As discussed I've changed the tests to testing that the terms typecheck after a pass. Fewer tests are failing but still there are some. They are marked as expected failures and will be investigated in another PR (see ticket). |
plutus-core/plutus-ir/test/PlutusIR/Transform/CaseReduce/Test.hs
Outdated
Show resolved
Hide resolved
plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/Tests.hs
Outdated
Show resolved
Hide resolved
plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/Tests.hs
Outdated
Show resolved
Hide resolved
plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/Tests.hs
Outdated
Show resolved
Hide resolved
plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/Tests.hs
Outdated
Show resolved
Hide resolved
64d6667
to
f36d6fc
Compare
-- FIXME | ||
-- | Check that a term typechecks after a | ||
-- `PlutusIR.Compiler.Let.compileLets` (recursive terms) pass. | ||
prop_TypecheckCompileLetsRecTerms :: Property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could let it generate random LetKind too but I feel in this case it's more obviously useful to separate them. Let me know if you think otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in this case it actually means "do something completely different", so I think it's good to separate them.
f36d6fc
to
cbe39f5
Compare
-- FIXME | ||
-- | Check that a term typechecks after a | ||
-- `PlutusIR.Compiler.Let.compileLets` (recursive terms) pass. | ||
prop_TypecheckCompileLetsRecTerms :: Property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in this case it actually means "do something completely different", so I think it's good to separate them.
-- `PlutusIR.Compiler.Let.compileLets` (data types) pass. | ||
test_TypecheckCompileLetsDataTypes :: TestTree | ||
test_TypecheckCompileLetsDataTypes = | ||
ignoreTest $ testProperty "typechecking" $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the reason we can't say it's expected to fail is because it sometimes passes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.
Looks like the letrec test also fails sometimes. |
b56e2cd
to
03d0a7e
Compare
Add typechecking property tests to each simplifier pass and the overall simplifier pass.
Some of the code is a bit repetitive but I think it's ok. This way it's tidy and easy to follow which tests are which.
The
inline
and overall simplifier passes are failing atm so they're marked as expected to fail. Debugging to follow in another PR. See ticket.Pre-submit checklist: