Isabelle/Solidity - A shallow Embedding of Solidity in Isabelle/HOL

Diego Marmsoler 📧, Asad Ahmed 📧 and Achim D. Brucker 📧

February 25, 2026

Abstract

Smart contracts, typically written in high-level languages such as Solidity, are programs deployed on the blockchain to automate financial transactions. Due to the high-stakes nature of these applications, bugs can result in severe financial consequences. In this paper, we present a verification framework for Solidity smart contracts built within the Isabelle/HOL proof assistant. Our approach introduces a novel formalization of Solidity’s storage model, a shallow embedding of its expressions and statements, and custom Isabelle commands to facilitate contract specification and verification. To aid in the verification process, we also provide a verification condition generator. We validate the semantics through a suite of unit tests and evaluate the framework using four case studies. The results demonstrate that our framework enables the verification of complex contracts with manageable effort. Furthermore, the use of shallow embedding significantly reduces verification complexity compared to a deep embedding approach.

License

BSD License

Topics

Related publications

  • Marmsoler, D., Ahmed, A., & Brucker, A. D. (2024). Secure Smart Contracts with Isabelle/Solidity. Software Engineering and Formal Methods, 162–181. https://doi.org/10.1007/978-3-031-77382-2_10
  • https://isa-afp.org/entries/Solidity.html

Session Isabelle-Solidity

Depends on