A bidirectional transformation is a pair of transformations satisfying certain well-behavedness properties: one maps source data into view data, and the other translates changes on the view back to the source. However, when multiple views share a source, an update on one view may affect the others, making it hard to maintain correspondence while preserving the user's update, especially when multiple views are changed at once. Ensuring these properties within a compositional framework is even more challenging. In this paper, we propose partial-state lenses, which allow source and view states to be partially specified to precisely represent the user's update intentions. These intentions are partially ordered, providing clear semantics for merging intentions of updates coming from multiple views and a refined notion of update preservation compatible with this merging. We formalize partial-state lenses, together with partial-specifiedness-aware well-behavedness that supports compositional reasoning and ensures update preservation. In addition, we demonstrate the utility of the proposed system through examples.
翻译:双向变换是一对满足特定良好行为性质的变换:一个将源数据映射为视图数据,另一个将视图上的更改反向传播至源数据。然而,当多个视图共享同一源数据时,对某一视图的更新可能会影响其他视图,这使得在维护对应关系的同时保留用户更新变得困难,尤其是在多个视图同时被修改的情况下。在组合式框架中确保这些性质更具挑战性。本文提出部分状态透镜,允许源状态和视图状态被部分指定,以精确表征用户的更新意图。这些意图构成偏序关系,为合并来自多视图的更新意图提供了清晰的语义,并建立了与此类合并相兼容的精细化更新保持概念。我们形式化定义了部分状态透镜,以及支持组合推理并确保更新保持的部分指定感知良好行为性质。此外,我们通过实例展示了所提出系统的实用性。