首页> 外文会议>ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation >Monadic Combinators for 'Putback' Style Bidirectional Programming
【24h】

Monadic Combinators for 'Putback' Style Bidirectional Programming

机译:Monadic组合器“Putback”风格双向编程

获取原文

摘要

Bidirectional transformations, in particular lenses, are programs with a forward get transformation and a backward putback transformation that keep source and view data types synchronized. Several bidirectional programming languages exist to aid programmers in writing a (sort of) forward transformation, and deriving a backward transformation for free. However, the maintainability offered by such languages comes at the cost of expressiveness and (more importantly) predictability because the ambiguity of synchronization - handled by the putback transformation - is solved by default strategies over which programmers have little control. In this paper, we argue that controlling such ambiguity is essential for bidirectional transformations and propose a novel language in which programmers write a (sort of) putback transformation, and get the unique get transformation for free. Like traditional bidirectional languages, our put-oriented language allows reasoning about the correctness of defined transformations from the properties of their building blocks. But it allows programmers to describe the behavior of a bidirectional transformation much more precisely, while retaining the maintainability of writing a single program. We demonstrate the practical power of the new approach through a series of examples, ranging from simple ones that illustrate traditional lenses to complex ones for which our putback-based approach is central to specifying nontrivial update strategies.
机译:双向变换,特别是镜头,是前进导致转换的程序和保持源和视图数据类型同步的后向逾越变换。存在几种双向编程语言,以帮助编写(有种)转向转换,并为右前转换提供免费。然而,这种语言提供的可维护性以表达性的成本和(更重要的是)可预测性,因为通过遮盖转换处理的同步的模糊性 - 通过默认策略来解决,程序员对程序员没有控制。在本文中,我们认为,控制这种模糊性对双向转换至关重要,并提出一种新的语言,程序员写入(有种)逾距改造,并获得独特的变换。与传统的双向语言一样,我们面向的语言可以推理来自其构建块的属性的定义变换的正确性。但它允许程序员更精确地描述双向变换的行为,同时保留写入单个程序的可维护性。我们通过一系列示例展示了新方法的实用能力,从简单的示例中,从简单的示例说明传统镜头到复杂的镜头,我们的逾越镜头是指定非竞争更新策略的核心。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号