arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1803.09885cs.PL
收藏

Lolisa:Mathematical Tool Coq中solidity程序设计语言子集的形式语法和语义

Lolisa: Formal syntax and semantics for a subset of the solidity programming language in Mathematical Tool Coq

Zheng Yang, Hang Lei

摘要:

本文介绍了为Etheruem区块链平台开发的Solidity程序设计语言的一个大子集的形式语法和语义,基于我们最近开发的一个通用的,可扩展的,可重用的形式内存(GERM)框架和Curry-Howard同构的扩展,表示为执行-验证同构(EVI)。这个子集被表示为Lolisa,据我们所知,它是为Solidity开发的第一个机械化和验证的正式语法和语义。Lolisa的形式语法采用了比Solidity更强大的静态类型系统,以增强类型安全性。此外,Lolisa不仅包含Solidity的几乎所有语法组件,如映射、修饰符、合约和地址类型,而且还包含通用程序设计语言功能,如多个返回值、指针算术、结构和字段访问。因此,Lolisa固有的兼容性允许Solidity程序直接翻译成Lolisa,而无需重建或抽象,并且Lolisa固有的通用性允许它扩展到表达其他程序设计语言。为此,我们还提出了一个初步的计划,系统地扩展到其他语言。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑