paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Practical Verification of Smart Contracts using Memory Splitting

基于内存分割的智能合约实用验证
OOPSLA 8(OOPSLA2)2024匹配度 3/10 · 该论文属于程序验证与静态分析(内存分割、指针分析)的工程落地,与用户偏好的形式化+工程实现有方法论上的邻接;但它不涉及 LLM/Agent 与静态分析的交叉,也不涉及浮点程序分析或贝叶斯程序分析,因此不匹配用户当前核心研究方向。引用 11 inbox
Shelly Grossman, John Toman, Alexander Bakst, Sameer Arora, Mooly Sagiv, Chandrakana Nandi
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出面向 Solidity 生成的 EVM 字节码的内存分割变换,用保守内存与指针分析加速 SMT 智能合约验证。

基于 SMT 的低层代码验证需对内存操作建模与推理,而现有通过指针分析将内存拆分为不相交区域以加速 SMT 求解的技术多针对 C/C++ 的显式分配操作。EVM 内存只是字节数组且无分配原语,使这些方法不直接适用。本文针对 Solidity 编译器生成的 EVM 字节码,提出由保守内存分析引导的内存分割变换。分析分两阶段:先恢复内存分配与内存区域,再进行指针分析;其目标是实现内存分割,从而加速验证。作者将分析与变换集成到 CertoraProver 中,在 229 个真实智能合约验证任务上评估,SMT 求解最多加速 120 倍,并消除 16 次超时。

问题
低层 EVM 字节码的 SMT 验证需对内存操作建模,但 EVM 内存是单体字节数组且无分配原语,现有面向 C/C++ 的内存分割与指针分析技术难以适用。
方法
提出面向 Solidity 生成的 EVM 字节码的保守内存分析,分两阶段恢复内存分配/区域并做指针分析,再据此执行内存分割变换以加速 SMT 求解。
评估
在 CertoraProver 中实现,并在 229 个真实智能合约验证任务上评估;内存分割使 SMT 求解最高加速 120×,并减少 16 次超时。
原文摘要(Abstract)

SMT-based verification of low-level code requires modeling and reasoning about memory operations. Prior work has shown that optimizing memory representations is beneficial for scaling verification—pointer analysis, for example can be used to split memory into disjoint regions leading to faster SMT solving. However, these techniques are mostly designed for C and C++ programs with explicit operations for memory allocation which are not present in all languages. For instance, on the Ethereum virtual machine, memory is simply a monolithic array of bytes which can be freely accessed by Ethereum bytecode, and there is no allocation primitive. In this paper, we present a memory splitting transformation guided by a conservative memory analysis for Ethereum bytecode generated by the Solidity compiler. The analysis consists of two phases: recovering memory allocation and memory regions, followed by a pointer analysis. The goal of the analysis is to enable memory splitting which in turn speeds up verification. We have implemented both the analysis and the memory splitting transformation as part of a verification tool, CertoraProver, and show that the transformation speeds up SMT solving by up to 120× and additionally mitigates 16 timeouts when used on 229 real-world smart contract verification tasks.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{GrossmanTBASN24,
  title = {Practical Verification of Smart Contracts using Memory Splitting},
  author = {Shelly Grossman and John Toman and Alexander Bakst and Sameer Arora and Mooly Sagiv and Chandrakana Nandi},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689796}
}