arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1811.12285cs.PL
收藏

具有控制算子的序列效应系统

Sequential Effect Systems with Control Operators

Colin S. Gordon

摘要:

顺序效果系统是一类利用节目顺序信息的效果系统,而不是像传统的可交换效果系统那样丢弃它。这种额外的表达能力允许效果系统随着时间的推移对行为进行推理,捕获诸如原子性、非结构化锁所有权甚至一般安全属性之类的属性。虽然我们现在已经相当好地理解了基本的指称(分类)模型,但将这些想法应用到真正的软件中会受到真正语言中各种各样的源代码级控制流结构的阻碍。表示方法足够通用,可以适应任何特定的控制流构造,但不提供细节指导,更不用说应用程序了。我们解决这个新的问题,呼吁一个经典的想法:宏表达常用的编程结构的控制运营商。我们给出了Racket的标记定界控制算子的一个子集的效果系统,作为没有直接控制算子的语言的效果系统的提升。这给出了一般控制算子存在下的序列效应的第一个解释。使用这个系统,我们还重新推导出顺序效果系统的规则,以前直接显示的声音控制流结构,并推导出顺序效果规则的新结构,以前没有研究的背景下,源级顺序效果系统。这提供了一种直接将序列效果系统的源代码级支持扩展到真正的程序设计语言的方法。

英文摘要:

Sequential effect systems are a class of effect system that exploits information about program order, rather than discarding it as traditional commutative effect systems do. This extra expressive power allows effect systems to reason about behavior over time, capturing properties such as atomicity, unstructured lock ownership, or even general safety properties. While we now understand the essential denotational (categorical) models fairly well, application of these ideas to real software is hampered by the sheer variety of source level control flow constructs in real languages. Denotational approaches are general enough to accommodate any particular control flow construct, but provide no guidance on the details, let alone applications. We address this new problem by appeal to a classic idea: macro-expression of commonly-used programming constructs in terms of control operators. We give an effect system for a subset of Racket's tagged delimited control operators, as a lifting of an effect system for a language without direct control operators. This gives the first account of sequential effects in the presence of general control operators. Using this system, we also re-derive the sequential effect system rules for control flow constructs previously shown sound directly, and derive sequential effect rules for new constructs not previously studied in the context of source-level sequential effect systems. This offers a way to directly extend source-level support for sequential effect systems to real programming languages.

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

↑