arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1510.02419cs.PLcs.LO
收藏

并发程序的依赖于数据的转换

Effect-Dependent Transformations for Concurrent Programs

Nick Benton, Martin Hofmann, Vivek Nigam

摘要:

我们描述了一个指称语义的抽象效果系统的高阶,共享变量并发程序设计语言。我们证明了一些一般的基于效果的程序等价物的合理性,包括并行化方程,该方程指定了用并行组合物替换顺序组合物的充分条件。效果注释是相对于由合约指定的抽象位置而不是物理足迹,这使我们特别能够显示涉及细粒度并发数据结构(例如Michael-Scott队列)的某些转换的可靠性,这些转换允许并发访问可变数据结构的不同部分。我们的语义是基于改进的痕迹为基础的语义的一阶程序,由于布鲁克斯。通过从具体位置移动到抽象位置,并添加类型细化来捕获表达式及其并发环境的可能副作用,我们能够验证许多在未细化模型中不存在的等价性。类型的含义是使用基于游戏的逻辑关系在轨迹集上表达的。两个程序$e_1$和$e_2$是逻辑相关的,如果一个程序能够解决一个两人游戏:对于任何轨迹,结果值$v_1$在$e_1$(挑战)的语义中,玩家提出,对手可以提出一个(响应)等价的轨迹,在$e_2$的语义中,具有逻辑相关的结果值$v_2$。

英文摘要:

We describe a denotational semantics for an abstract effect system for a higher-order, shared-variable concurrent programming language. We prove the soundness of a number of general effect-based program equivalences, including a parallelization equation that specifies sufficient conditions for replacing sequential composition with parallel composition. Effect annotations are relative to abstract locations specified by contracts rather than physical footprints allowing us in particular to show the soundness of some transformations involving fine-grained concurrent data structures, such as Michael-Scott queues, that allow concurrent access to different parts of mutable data structures. Our semantics is based on refining a trace-based semantics for first-order programs due to Brookes. By moving from concrete to abstract locations, and adding type refinements that capture the possible side-effects of both expressions and their concurrent environments, we are able to validate many equivalences that do not hold in an unrefined model. The meanings of types are expressed using a game-based logical relation over sets of traces. Two programs $e_1$ and $e_2$ are logically related if one is able to solve a two-player game: for any trace with result value $v_1$ in the semantics of $e_1$ (challenge) that the player presents, the opponent can present an (response) equivalent trace in the semantics of $e_2$ with a logically related result value $v_2$.

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

↑