双向计算概念与纠缠态单子
Notions of bidirectional computation and entangled state monads
摘要:
双向转换(bx)支持数据源之间的原则性一致性维护。每个数据源对应于复合系统上的一个透视图,通过从该特定透视图“获取”和“设置”整体视图的操作来表现。BX在很多环境中都很重要,包括数据库、交互式应用程序和模型驱动开发。我们表明,BX自然建模的可变状态,特别是,“集”操作是有状态的功能。这自然会导致考虑bx也利用其他计算效应,如I/O,非确定性和失败,所有这些在迄今为止的bx文献中基本上都被忽略了。我们提出了一个语义基础的对称双向转换效果。我们建立在函数式编程中效果的一元封装的成熟理论基础上,为有效的bx开发了等式理论和重要的组合子,并提供了Haskell中的原型实现以及几个说明性示例。
英文摘要:
Bidirectional transformations (bx) support principled consistency maintenance between data sources. Each data source corresponds to one perspective on a composite system, manifested by operations to 'get' and 'set' a view of the whole from that particular perspective. Bx are important in a wide range of settings, including databases, interactive applications, and model-driven development. We show that bx are naturally modelled in terms of mutable state; in particular, the 'set' operations are stateful functions. This leads naturally to considering bx that exploit other computational effects too, such as I/O, nondeterminism, and failure, all largely ignored in the bx literature to date. We present a semantic foundation for symmetric bidirectional transformations with effects. We build on the mature theory of monadic encapsulation of effects in functional programming, develop the equational theory and important combinators for effectful bx, and provide a prototype implementation in Haskell along with several illustrative examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。