Search papers, labs, and topics across Lattice.
This paper introduces a formalization of a many-sorted hybrid modal logic in Lean, integrating concepts from algebraic specification and dynamic logics to create a robust framework for specifying and verifying programming languages and security protocols. The authors provide a domain-specific language (DSL) that allows users to define many-sorted signatures and relevant axioms, enabling seamless reasoning about program executions and protocol runs. A machine-checked proof of soundness is included, along with applications demonstrating the framework's versatility, such as code verification for an imperative programming language and the application of BAN logic for security protocols.
A versatile framework for hybrid modal logic that simplifies the specification and verification of programming languages and security protocols without additional syntactic overhead.
We present a Lean formalization of a general hybrid modal logic with many-sorted signatures and polyadic modal operators. The system borrows ideas from both algebraic specification and dynamic logics, and is designed to serve as a uniform axiomatic foundation for specifying and verifying programming languages and security protocols. We expose a DSL for users to define languages and protocols as many-sorted signatures, specify the relevant domain-specific axioms, and reason about program executions or protocol runs. We provide a machine-checked proof of its soundness theorem and showcase the framework's versatility through several applications: an imperative programming language for code verification, the BAN logic for security protocols, and the modal system S5. We have designed our formalization to be intrinsically sorted, that is, well-sorted formulas in the base language are well-typed terms in Lean. Thanks to intrinsic sorting, all domain specific applications can be easily embedded in our framework via the DSL, at no additional syntactic overhead required for the user to prove. All code presented in this paper is openly accessible in the following repository: https://github.com/alexoltean61/msphml-lean