IntersectMBO / IntersectMBO/plutus

The evaluate-builtins optimization isn't conservative

Open
#6,167 1 comment 1 reaction 0 assignees View on GitHub
bug Good first issue Internal optimization Plutus IR status: triaged tech debt
Dominant language
Haskell
Stars
1.6k
Forks
508
Avg merge
3d 10h
Merged PRs (30d)
22

Description

`PlutusIR.Transform.EvaluateBuiltins` turns `ifThenElse True x y` into `x`. That is not conservative: if `y` throws then the former term will throw and the latter one won't. So this is a bug that needs to be fixed. It wasn't discussed in the original [PR](https://github.com/IntersectMBO/plutus/pull/5269).

More importantly, this looks like something that the proper property testing should catch. Look like a perfect opportunity for the PIR generators to show their power. So it'd be best to first write a failing property, then fix the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.