plutus icon indicating copy to clipboard operation
plutus copied to clipboard

[Epic] Sort out structural vs operational evaluation errors

Open effectfully opened this issue 1 year ago • 1 comments

We have two kinds of evaluation errors: structural ones and operational ones. More on that here. This issue is for dumping all the things that we could improve upon in this context.

effectfully avatar May 29 '24 22:05 effectfully

  • [x] EvaluationError operational structural is backwards, structural should come first as structural errors concern how the program is constructed, whiich obviously precedes evaluation, which is what operational errors are about. PR: #6439
  • [x] there is no test like "evaluating a well-typed program never results in a structural error". In general there are no explicit tests on this whole structural vs operational distinction (we do have some implicit ones, but that's not nearly enough). PR: #6443
  • [x] the content of an operational unlifting error is erased by the CK/CEK machine, so the error message never reaches the user. "Something went wrong" is a horrible thing to display to the user, we should do better (at least we print the offending term though). PR: #6181
  • [x] builtin denotations don't distinguish between the two kinds of errors and just pretend that every builtin error is an operational one, which is not the case for headList for example: while headList [] should give an operational error, the "ill-typed" headList True should give a structural one. PR: #5926

effectfully avatar May 29 '24 22:05 effectfully