[Paper Review] Lolisa: Formal Syntax and Semantics for a Subset of the Solidity Programming Language
Lolisa presents the first mechanized and validated formal syntax and semantics for a large subset of Solidity, leveraging the GERM framework and execution-verification isomorphism (EVI). It enhances type safety with a stronger static type system, supports nearly all Solidity constructs—including mappings, modifiers, structs, and multiple return values—and enables direct, line-by-line translation of Solidity programs with extensibility to other languages.
This article presents the formal syntax and semantics for a large subset of the Solidity programming language developed for the Etheruem blockchain platform based on our resent work about developing a general, extensible, and reusable formal memory (GERM) framework and an extension of Curry-Howard isomorphism, denoted as execution-verification isomorphism (EVI). This subset is denoted as Lolisa, which, to our knowledge, is the first mechanized and validated formal syntax and semantics developed for Solidity. The formal syntax of Lolisa adopts a stronger static type system than Solidity for enhanced type safety. In addition, Lolisa not only includes nearly all the syntax components of Solidity, such as mapping, modifier, contract, and address types, but it also contains general-purpose programming language features, such as multiple return values, pointer arithmetic, struct, and field access. Therefore, the inherent compatibility of Lolisa allows Solidity programs to be directly translated into Lolisa with a line-by-line correspondence without rebuilding or abstracting, and, in addition, the inherent generality of Lolisa allows it to be extended to express other programming languages as well. To this end, we also present a preliminary scheme for extending Lolisa to other languages systematically.
Motivation & Objective
- To develop a formally verified, mechanized syntax and semantics for a large subset of Solidity to improve correctness and security in smart contract development.
- To enhance type safety by introducing a stronger static type system than Solidity’s native type system.
- To ensure direct, line-by-line translation of Solidity programs into Lolisa without abstraction or reconstruction.
- To establish a general-purpose foundation that can be systematically extended to formalize other programming languages.
- To demonstrate the feasibility of applying the GERM framework and execution-verification isomorphism (EVI) to blockchain-specific languages like Solidity.
Proposed method
- Designing Lolisa as a formal language subset of Solidity using the GERM framework for a reusable and extensible formal memory model.
- Applying execution-verification isomorphism (EVI) to link program execution with formal verification, enabling mechanized reasoning.
- Extending the syntax to include advanced features such as multiple return values, pointer arithmetic, structs, and field access.
- Formalizing core Solidity constructs including mappings, modifiers, contract definitions, and address types within the Lolisa framework.
- Defining a systematic scheme for extending Lolisa to express other programming languages based on its formal foundation.
- Ensuring compatibility with Solidity through line-by-line translation semantics without loss of expressiveness.
Experimental results
Research questions
- RQ1Can a formal, mechanized semantics be developed for a large subset of Solidity that preserves full syntactic and semantic fidelity?
- RQ2How can the GERM framework and EVI be effectively applied to model smart contract execution and verification in Solidity?
- RQ3To what extent does Lolisa’s stronger static type system improve type safety compared to native Solidity?
- RQ4Is it possible to achieve direct, line-by-line translation from Solidity to a formal language without abstraction or restructuring?
- RQ5Can Lolisa be systematically extended to formalize other programming languages beyond Solidity?
Key findings
- Lolisa is the first mechanized and validated formal syntax and semantics for a large subset of Solidity, achieving full formalization with machine-checkable proofs.
- The language supports nearly all key Solidity features, including mappings, modifiers, structs, and multiple return values, with full fidelity to the original syntax.
- The stronger static type system in Lolisa enhances type safety beyond what is provided in native Solidity.
- Direct, line-by-line translation from Solidity to Lolisa is formally supported, enabling seamless integration with existing Solidity codebases.
- The design of Lolisa allows for systematic extension to formalize other programming languages, demonstrating its generality and reusability.
- The application of EVI and the GERM framework enables a unified treatment of execution and verification, supporting formal reasoning about smart contract behavior.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.