EraseSpecifications
scalus.compiler.sir.transform.EraseSpecifications
object EraseSpecifications
Removes the specification clauses of scalus.cardano.onchain.plutus.prelude.Spec from SIR, before it is lowered.
A clause is a call of a function of the Spec module, which the compiler plugin leaves in the SIR as it leaves any call, so that a verifier can read it there. It is not part of the script:
Spec.expects(c)andSpec.ensures(c)are removed, with their conditions, which are not evaluated;body.ensuring(r => c)becomesbody;- the definitions of the
Specfunctions, which linking put around the code, are dropped, and so is the definition of a function that only the clauses used: a function written for the specification is no part of the script either.
The definitions that are left are nested again in the order the code alone gives. What comes out is the SIR of the same code written without the clauses, so its script has the same bytes. Code without clauses is returned as it is.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
EraseSpecifications.type
Members list
In this article