Composing Least-change Lenses

Composing Least-change Lenses
复制标题

组成最小变化的镜头

DOI:
10.14279/tuj.eceasst.57.868
复制
发表时间:
2013
期刊:
Electron. Commun. Eur. Assoc. Softw. Sci. Technol.
影响因子:
--
通讯作者:
P. Stevens
P. Stevens
中科院分区:
--
文献类型:
--
作者:
Julian Bradfield;P. Stevens

文献摘要

被引文献

相似文献

重要的双向转换(bx)本质上是不明确的,因为通常有许多不同的方法可以一致地将更新从一方转换到另一方。现有的BX语言和框架通常满足基本的第一原则,确保可接受的和稳定的(行为良好的)翻译。不幸的是,这些对如何在无数可能的翻译中选择特定的更新翻译提供了很少的见解。从用户的角度来看,这种不可预测性可能会阻碍BX框架的采用。这个问题可以通过实施“最小变化原则”来解决,在基于状态的框架中,这相当于将每次更新以一种方式转换,使其结果尽可能接近原始状态,根据一些距离测量。本文从形式化这些BX开始,重点讨论了这些最小变化透镜是否可以由BX框架的基本构造组合来定义。对于顺序组合,提出了两种(双)更新翻译方案:经典确定性和非确定性。该方法的一个关键要素是关系代数中主要概念的优雅形式化,它暴露了一些相似性和对偶性。
Non-trivial bidirectional transformations (BXs) are inherently ambiguous, as there are in general many different ways to consistently translate an update from one side to the other. Existing BX languages and frameworks typically satisfy fundamental first principles which ensure acceptable and stable (well-behaved) translation. Unfortunately, these give little insight about how a particular update translation is chosen among the myriad possible. From the user perspective, such unpredictability may hinder the adoption of BX frameworks. The problem can be remedied by imposing a “principle of least change” which, in a state-based framework, amounts to translating each update in a way such that its result is as close as possible to the original state, according to some distance measure. Starting by formalizing such BXs focusing on the particular framework of lenses, this paper discusses whether such least-change lenses can be defined by composition, an essential construct of BX frameworks. For sequential composition, two (dual) update translation alternatives are presented: a classical deterministic one and a nondeterministic. A key ingredient of the approach is the elegant formalization of the main concepts in relation algebra, which exposes several similarities and dualities.