arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1312.2706cs.LOcs.DCcs.PL
收藏

使用合约在STM Haskell中进行静态应用级竞争检测

Static Application-Level Race Detection in STM Haskell using Contracts

Romain Demeyer, Wim Vanhoof

摘要:

编写并发程序是一项艰巨的任务,即使使用高级同步原语(如事务存储器)和具有良好控制副作用的函数式语言(如Haskell),因为进程之间产生的干扰可能发生在不同的级别,并且以非常微妙的方式发生。当线程将共享数据保留或公开为与应用程序逻辑或数据的真实含义不一致的状态时,就会出现问题。在本文中,我们建议将合同与交易相关联,并定义了一个程序转换,使得在STM Haskell的上下文中扩展静态合同检查成为可能。因此,我们能够静态地检查STM Haskell程序的每个事务处理共享数据的方式,即以用户定义的布尔函数的形式表示的给定一致性属性被保留。这确保了在并发程序的执行过程中不会发生不良干扰。

英文摘要:

Writing concurrent programs is a hard task, even when using high-level synchronization primitives such as transactional memories together with a functional language with well-controlled side-effects such as Haskell, because the interferences generated by the processes to each other can occur at different levels and in a very subtle way. The problem occurs when a thread leaves or exposes the shared data in an inconsistent state with respect to the application logic or the real meaning of the data. In this paper, we propose to associate contracts to transactions and we define a program transformation that makes it possible to extend static contract checking in the context of STM Haskell. As a result, we are able to check statically that each transaction of a STM Haskell program handles the shared data in a such way that a given consistency property, expressed in the form of a user-defined boolean function, is preserved. This ensures that bad interference will not occur during the execution of the concurrent program.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑