paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Prisma : A Tierless Language for Enforcing Contract-client Protocols in Decentralized Applications

Prisma:一种用于在去中心化应用中强制合约-客户端协议的无层语言
TOPLAS 45(3)2023匹配度 2/10 · 论文属于编程语言设计与形式化验证在区块链智能合约/dApp 领域的应用,与用户关注的 AI×PL、Agentic 程序静态分析、浮点程序分析、贝叶斯程序分析等核心方向无直接关联;仅在形式化验证方法上有边缘相似性,且不涉及 LLM/Agent 或相关 benchmark。引用 0 inbox
David Richter, David Kretzler, Pascal Weisenburger, Guido Salvaneschi, Sebastian Faust, Mira Mezini
crossref: 2026-09-10

AI 速览

一句话:提出无层语言 Prisma,将合约与客户端统一编写,用 direct-style 通信原语保证接口协议一致。

去中心化应用通常把智能合约与客户端分别用不同语言实现,通过发送/接收通信,导致分布式控制流难以表达,并且客户端-合约接口容易出现不一致,被恶意客户端利用造成经济损失。Prisma 是一种无层(tierless)语言,允许在一个单元中定义合约及其客户端,并把成对的发送/接收封装为单个 direct-style 操作:同一操作在发送方和接收方以不同方式执行,从而用普通控制流表达分布式流程,并使通信不匹配不可能发生。作者形式化证明其编译器在攻击者控制客户端代码时仍保持程序行为,并与主流及高级 dApp 编程模型进行系统比较,给出表达力与性能的实验证据。

问题
如何避免 dApp 中合约与客户端分离实现导致的接口不匹配和恶意客户端利用问题,并简化分布式控制流表达。
方法
提出无层语言 Prisma,将合约与客户端放在同一程序单元,用 direct-style 通信操作封装成对 send/receive,并由编译器保证协议一致。
评估
形式证明编译器在恶意客户端存在时保持程序行为;与主流及高级 dApp 编程模型比较,并进行表达力与性能实证评估。
原文摘要(Abstract)

Decentralized applications (dApps) consist of smart contracts that run on blockchains and clients that model collaborating parties. dApps are used to model financial and legal business functionality. Today, contracts and clients are written as separate programs—in different programming languages—communicating via send and receive operations. This makes distributed program flow awkward to express and reason about, increasing the potential for mismatches in the client-contract interface, which can be exploited by malicious clients, potentially leading to huge financial losses. In this article, we present Prisma , a language for tierless decentralized applications, where the contract and its clients are defined in one unit and pairs of send and receive actions that “belong together” are encapsulated into a single direct-style operation, which is executed differently by sending and receiving parties. This enables expressing distributed program flow via standard control flow and renders mismatching communication impossible. We prove formally that our compiler preserves program behavior in presence of an attacker controlling the client code. We systematically compare Prisma with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.

链接与引用

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

BibTeX
@article{paperbot2124,
  title = {Prisma : A Tierless Language for Enforcing Contract-client Protocols in Decentralized Applications},
  author = {David Richter and David Kretzler and Pascal Weisenburger and Guido Salvaneschi and Sebastian Faust and Mira Mezini},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {45},
  number = {3},
  year = {2023},
  doi = {10.1145/3604629}
}