Abstract
Michelson, the stack-based virtual machine of the Tezos blockchain, integrates type-checking for program execution completion but not program correctness. Manual stack tracking is efficient but less ergonomic to write in than a higher-level lambda calculus with variables. Compiling McBride’s Quantitative Type Theory to Michelson allows for compile-time verification of semantic predicates and automatic stack optimisation by virtue of the type-theoretic usage accounting system.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
S. Developers, Solidity: An object-oriented, high-level language for implementing smart contracts. https://solidity.readthedocs.io/en/v0.6.8/
Wood, G.: Ethereum: A secure decentralised generalised transaction ledger. https://gavwood.com/paper.pdf
Parity Technologies: A postmortem on the parity multi-sig library self-destruct. https://www.parity.io/a-postmortem-on-the-parity-multi-sig-library-self-destruct/
0x Core Team, “Post-mortem: 0x v2.0 exchange vulnerability.” https://blog.0xproject.com/post-mortem-0x-v2-0-exchange-vulnerability-763015399578
Goodman, L.M.: Tezos - a self-amending crypto-ledger, September 2014. https://tezos.com/static/white_paper-2dc8c02267a8fb86bd67a108199441bf.pdf
Bernardo, B., Cauderlier, R., Pesin, B., Tesson, J.: Albert, an intermediate smart-contract language for the tezos blockchain (2020). https://arxiv.org/abs/2001.02630
Bernardo, B., Cauderlier, R., Hu, Z., Pesin, B., Tesson, J.: Mi-cho-coq, a framework for certifying tezos smart contracts. https://arxiv.org/abs/1909.08671 (2019)
Pettersson, J.: Safer smart contracts through type-driven development. https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf
Brady, E.: IDRIS - systems programming meets full dependent types. In: PLPV 2011 - Proceedings of the 5th ACM Workshop on Programming Languages Meets Program Verification, pp. 43–54 (2011)
Edgington, B.: Ethereum lisp like language. https://lll-docs.readthedocs.io/en/latest/lll_introduction.html
Atkey, R.: Syntax and semantics of quantitative type theory. In: Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, pp. 56–65 (2018)
N. Labs: Michelson: The language of smart contracts in tezos. https://tezos.gitlab.io/whitedoc/michelson.html
McBride, C.: I got plenty o’ Nuttin’. In: Lindley, S., McBride, C., Trinder, P., Sannella, D. (eds.) A List of Successes That Can Change the World. LNCS, vol. 9600, pp. 207–233. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-30936-1_12
Ornelas, J.: Compiling Juvix to Michelson, May 2020. https://research.metastate.dev/juvix-compiling-juvix-to-michelson/
Goes, C., Morris, A.: Usage polymorphism and dependent usages in Juvix, September 2019. https://github.com/cryptiumlabs/juvix/issues/87
Goes, C.: The why of Juvix: on the design of smart contract languages, January 2020. https://research.metastate.dev/the-why-of-juvix-part-1-on-the-design-of-smart-contract-languages/
Goes, C.: The why of Juvix: Ingredients & architecture, January 2020. https://research.metastate.dev/the-why-of-juvix-ingredients-architecture/
Acknowledgements
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Goes, C. (2020). Compiling Quantitative Type Theory to Michelson for Compile-Time Verification and Run-time Efficiency in Juvix. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Applications. ISoLA 2020. Lecture Notes in Computer Science(), vol 12478. Springer, Cham. https://doi.org/10.1007/978-3-030-61467-6_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-61467-6_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-61466-9
Online ISBN: 978-3-030-61467-6
eBook Packages: Computer ScienceComputer Science (R0)