首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Combinators for bi-directional tree transformations - A linguistic approach to the view update problem
【24h】

Combinators for bi-directional tree transformations - A linguistic approach to the view update problem

机译:双向树转换的组合器-一种用于视图更新问题的语言方法

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

We propose a novel approach to the well-known view update problem for the case of tree-structured data: a domain-specific programming language in which all expressions denote bi-directional transformations on trees. In one direction; these transformations-dubbed lenses-map a "concrete" tree into a simplified "abstract view'"; in the other, they map a modified abstract view, together with the original concrete tree; to a correspondingly modified concrete tree. Our design emphasizes both robustness and ease of use; guaranteeing strong well-behavedness and totality properties for well-typed lenses.We identify a natural space of well-behaved bi-directional transformations over arbitrary structures, study definedness and continuity in this setting; and state a precise connection with the classical theory of "update translation under a constant complement" from databases. We then instantiate this semantic framework in the form of a collection of lens combinators that can be assembled to describe transformations on trees. These combinators include familiar constructs from functional programming (composition, mapping, projection, conditionals; recursion) together with some novel primitives for manipulating trees (splitting; pruning, merging; etc.). We illustrate the expressiveness of these combinators by developing a number of bi-directional list-processing transformations as derived forms.
机译:对于树状结构数据,我们提出了一种新颖的方法来解决众所周知的视图更新问题:一种特定于域的编程语言,其中所有表达式都表示树上的双向转换。在一个方向这些被称为“镜头”的转换将“混凝土”树映射为简化的“抽象视图”。另一方面,他们将修改后的抽象视图与原始混凝土树一起绘制;到相应修改的混凝土树。我们的设计既强调坚固性又易于使用。我们确保在任意结构上进行良好的双向双向变换的自然空间,并研究这种情况下的定义性和连续性;并与数据库中“不断补充下的更新翻译”这一经典理论建立了精确的联系。然后,我们以镜头组合器集合的形式实例化此语义框架,可以将其组合起来以描述树上的转换。这些组合器包括功能编程(构图,映射,投影,条件,递归)中熟悉的构造,以及一些用于操纵树的新原语(拆分,修剪,合并等)。我们通过开发许多双向列表处理转换作为派生形式来说明这些组合器的表达方式。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号