paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Synthesis of Sound and Precise Storage Cost Bounds via Unsound Resource Analysis and Max-SMT

通过不健全资源分析与 Max-SMT 合成健全且精确的存储成本界
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 该论文属于静态程序分析与抽象解释方向,方法(先用不健全分析再以 Max-SMT 恢复健全性)和工程落地(改进 gastap、asparagus 两个以太坊 gas 分析器)都较扎实,符合用户对『理论+工程』和『问题驱动』的偏好;但研究场景是以太坊存储成本/gas 分析,与用户核心关注的 PL↔AI 交叉(ML/Agentic 程序静态分析、LLM 改进静态分析)、浮点程序分析、贝叶斯程序分析均无关联,也不涉及 LLM,故整体匹配度偏低。引用 0 inbox
Elvira Albert, Jesús Correas, Pablo Gordillo, Guillermo Román-Díez, Albert Rubio
crossref: 2026-09-12

AI 速览

一句话:先用不健全静态资源分析获得精确存储成本界,再用 Max-SMT 修正以恢复健全性,用于以太坊 gas 分析。

存储是跨程序执行持久保留的内存;在区块链中其内容被复制并产生最高的 gas 费用。以太坊存储成本模型具有动态性:某键首次访问成本更高,写访问还依值是否改变而有不同成本。现有 gas 分析器一律按最大成本估算,过于悲观且界过松。本文提出先用现成静态资源分析但不总假设最坏成本,从而得到不健全但更精确的界;再用新的 Max-SMT 方法计算修正量以恢复健全性。作者实现了该方法,并用其改进以太坊 gas 分析器 gastap 和 asparagus;在超过 40 万个函数上实验,存储界精度最高提升 75%,最常见提升为 10–20%。

问题
如何在考虑以太坊存储成本模型动态性的同时,合成既健全又精确的存储成本界;现有分析按最坏情况估算,界过松。
方法
使用现成静态资源分析且不总取最坏成本,先得到不健全但精确的界;再用新的 Max-SMT 方法计算修正量,使最终界恢复健全性。
评估
将方法实现并集成到 gastap 和 asparagus 两个以太坊 gas 分析器,在超过 400,000 个函数上评估;存储界精度最高提升 75%,常见提升 10–20%。
原文摘要(Abstract)

A storage is a persistent memory whose contents are kept across different program executions. In the blockchain technology, storage contents are replicated and incur the largest costs of a program’s execution (a.k.a. gas fees). Storage costs are dynamically calculated using a rather complex model which assigns a much larger cost to the first access made in an execution to a storage key, and besides assigns different costs to write accesses depending on whether they change the values w.r.t. the initial and previous contents. Safely assuming the largest cost for all situations, as done in existing gas analyzers, is an overly-pessimistic approach that might render useless bounds because of being too loose. The challenge is to soundly, and yet accurately, synthesize storage bounds which take into account the dynamicity implicit to the cost model. Our solution consists in using an off-the-shelf static resource analysis —but do not always assuming a worst-case cost— and hence yielding unsound bounds; and then, in a posterior stage, computing corrections to recover soundness in the bounds by using a new Max-SMT based approach. We have implemented our approach and used it to improve the precision of two gas analyzers for Ethereum, gastap and asparagus. Experimental results on more than 400,000 functions show that we achieve great accuracy gains, up to 75%, on the storage bounds, being the most frequent gains between 10-20%.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8582,
  title = {Synthesis of Sound and Precise Storage Cost Bounds via Unsound Resource Analysis and Max-SMT},
  author = {Elvira Albert and Jesús Correas and Pablo Gordillo and Guillermo Román-Díez and Albert Rubio},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680352}
}