paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Persistent software transactional memory in Haskell

Haskell 中的持久软件事务内存
ICFP 5(ICFP)2021匹配度 1/10 · 该论文研究 Haskell 运行时中持久软件事务内存(PSTM)的集成,属于运行时系统与内存管理方向,与用户关注的静态分析、LLM/Agent 交叉、浮点程序分析及贝叶斯程序分析均无直接关联。引用 3 inbox
Nicolas Krauter, Patrick Raaf, Peter Braam, Reza Salkhordeh, Sebastian Erdweg, André Brinkmann
crossref: 2026-09-10

AI 速览

一句话:将持久软件事务内存(PSTM)原生集成进 Haskell 运行时,原子管理持久数据并兼容惰性求值与垃圾回收。

持久内存支持以内存速度进行字节粒度持久访问,但故障一致性要求不同于易失内存的写语义。现有面向 C/C++ 的持久事务库方案无法在自动内存管理语言中保持高层抽象。本文把持久软件事务内存(PSTM)紧密集成到 Haskell 运行时,用扩展 STM 的接口与语义原子管理持久事务数据类型。该集成保留垃圾回收与分配策略,并完全兼容 Haskell 惰性执行模型。实现性能与底层库相当,现有 STM 库可轻松移植,并支持持久 memoization 与持久 Haskell 表达式等用例。

问题
在持久内存上,故障一致性要求特殊的写语义;现有持久事务库面向 C/C++ 等显式内存管理语言,无法在具有自动内存管理的高级语言中保持抽象。
方法
将持久软件事务内存(PSTM)原生集成到 Haskell 运行时,设计扩展 STM 的接口与语义,并与垃圾回收、分配策略及惰性执行模型协同。
评估
通过实现与底层持久库进行性能对比,并验证现有 STM 库到 PSTM 的可移植性,以及持久 memoization 与持久 Haskell 表达式等用例。
原文摘要(Abstract)

Emerging persistent memory in commodity hardware allows byte-granular accesses to persistent state at memory speeds. However, to prevent inconsistent state in persistent memory due to unexpected system failures, different write-semantics are required compared to volatile memory. Transaction-based library solutions for persistent memory facilitate the atomic modification of persistent data in languages where memory is explicitly managed by the programmer, such as C/C++. For languages that provide extended capabilities like automatic memory management, a more native integration into the language is needed to maintain the high level of memory abstraction. It is shown in this paper how persistent software transactional memory (PSTM) can be tightly integrated into the runtime system of Haskell to atomically manage values of persistent transactional data types. PSTM has a clear interface and semantics extending that of software transactional memory (STM). Its integration with the language’s memory management retains features like garbage collection and allocation strategies, and is fully compatible with Haskell's lazy execution model. Our PSTM implementation demonstrates competitive performance with low level libraries and trivial portability of existing STM libraries to PSTM. The implementation allows further interesting use cases, such as persistent memoization and persistent Haskell expressions.

链接与引用

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

BibTeX
@article{paperbot1116,
  title = {Persistent software transactional memory in Haskell},
  author = {Nicolas Krauter and Patrick Raaf and Peter Braam and Reza Salkhordeh and Sebastian Erdweg and André Brinkmann},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {ICFP},
  year = {2021},
  doi = {10.1145/3473568}
}