paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Declarative smart contracts

声明式智能合约
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 3/10 · 该论文属于程序设计语言、声明式 DSL 与智能合约运行时验证,和用户核心关注的静态分析、LLM/Agent 程序分析、浮点程序分析及贝叶斯程序分析没有直接关联;仅可作为 PL/形式化方法与合约验证方向的邻近工作。引用 14 inbox
Haoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang, Boon Thau Loo
crossref: 2026-09-12

AI 速览

一句话:提出声明式语言 DeCon,用关系约束建模智能合约并规格化合约级属性,可编译为带运行时监控的 Solidity。

论文针对智能合约实现与合约级属性难以清晰表达和监控的问题,观察到合约操作与属性可自然表示为关系约束,提出声明式语言 DeCon。DeCon 将每个合约建模为存储交易记录的关系表,程序由声明式规则和违规查询规则构成,分别描述合约实现与合约级属性。该关系表示便于规格化属性、运行时监控违规并借助数据溯源调试合约。作者实现工具将 DeCon 编译为可执行 Solidity,并注入运行时监控。案例研究显示可表达 ERC20、ERC721 等真实合约;评估表明相比开源参考实现,执行 gas 中位数开销 14%,运行时验证另增 16%。

问题
智能合约实现和合约级属性通常混合在命令式代码中,难以清晰规格化并有效监控属性违规。
方法
将智能合约建模为关系表,以声明式规则描述合约实现,以违规查询规则描述合约级属性,并编译到带运行时监控的 Solidity 程序。
评估
通过 ERC20、ERC721 等案例研究验证表达能力和可实现性,并与开源参考实现对比 gas 开销,执行中位开销 14%,运行时验证额外中位开销 16%。
原文摘要(Abstract)

This paper presents DeCon, a declarative programming language for implementing smart contracts and specifying contract-level properties. Driven by the observation that smart contract operations and contract-level properties can be naturally expressed as relational constraints, DeCon models each smart contract as a set of relational tables that store transaction records. This relational representation of smart contracts enables convenient specification of contract properties, facilitates run-time monitoring of potential property violations, and brings clarity to contract debugging via data provenance. Specifically, a DeCon program consists of a set of declarative rules and violation query rules over the relational representation, describing the smart contract implementation and contract-level properties, respectively. We have developed a tool that can compile DeCon programs into executable Solidity programs, with instrumentation for run-time property monitoring. Our case studies demonstrate that DeCon can implement realistic smart contracts such as ERC20 and ERC721 digital tokens. Our evaluation results reveal the marginal overhead of DeCon compared to the open-source reference implementation, incurring 14% median gas overhead for execution, and another 16% median gas overhead for run-time verification.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7131,
  title = {Declarative smart contracts},
  author = {Haoxian Chen and Gerald Whitters and Mohammad Javad Amiri and Yuepeng Wang and Boon Thau Loo},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3549121}
}