tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

Improve the handling of builtins: devise a `Plutus.tla` file to be imported by the generated TLA+ code #38

Closed VictorCMiraldo closed 2 years ago

VictorCMiraldo commented 3 years ago

When generating TLA+ for a given contract, we need to use skeletons to define the builtins used by the contract. This isn't a very elegant solution and in the future we would like to have a Plutus.tla file that is generated alongside the Contract.tla file. This is not a trivial task, however. Mainly due to the PlutusByteString datatype. For now, the multisig state machine defines a PlutusByteString as a CONSTANT and gets instantiated to a set of model values by the respective configuration files.

A reasonable option could be:

CONSTANT PlutusByteStringLength
PlutusByteString == Tup(Bit, PlutusByteStringLength)