Applicative bidirectional programming

Applicative bidirectional programming
复制标题

应用双向编程

DOI:
10.1017/s0956796818000096
复制
发表时间:
2018
影响因子:
1.1
通讯作者:
Meng Wang
Meng Wang
中科院分区:
计算机科学2区
文献类型:
--
作者:
Kazutaka Matsuda;Meng Wang

文献摘要

相似文献

双向转换是源数据对象和视图数据对象之间的一对映射,每个方向一个。当视图被修改时,源根据某些规律进行相应的更新。减少双向转换的开发和维护工作的一种方法是使用专门的语言,其中通过构造生成的程序是双向的,从而产生了双向编程的范例。在本文中,我们为应用程序风格和高阶双向编程开发了一个框架,在这个框架中,我们可以用标准函数式语言将双向转换编写为单向程序,从而开放了对以前只有传统单向语言才能使用的语言特性的访问。我们的框架实质上连接了两种非常不同的双向编程方法,即透镜框架和Voigtländer的语义双向化,创建了一种能够从两者中获益的新编程风格。
A bidirectional transformation is a pair of mappings between source and view data objects, one in each direction. When the view is modified, the source is updated accordingly with respect to some laws. One way to reduce the development and maintenance effort of bidirectional transformations is to have specialized languages in which the resulting programs are bidirectional by construction—giving rise to the paradigm of bidirectional programming. In this paper, we develop a framework for applicative-style and higher-order bidirectional programming, in which we can write bidirectional transformations as unidirectional programs in standard functional languages, opening up access to the bundle of language features previously only available to conventional unidirectional languages. Our framework essentially bridges two very different approaches of bidirectional programming, namely the lens framework and Voigtländer's semantic bidirectionalization, creating a new programming style that is able to obtain benefits from both.