کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
433194 1441643 2015 31 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
“Bidirectionalization for free” for monomorphic transformations
ترجمه فارسی عنوان
دو طرفه برای آزاد؟ برای تحولات مونومورفیک
کلمات کلیدی
تحول دو طرفه، قضیه آزاد نوع کلاس هاسلل
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی

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. Over the years, a lot of effort has been made to offer better language support for programming such transformations. In particular, a technique known as bidirectionalization is able to analyze and transform unidirectional programs written in general purpose languages, and “bidirectionalize” them.Among others, an approach termed semantic bidirectionalization proposed by Voigtländer stands out in terms of user-friendliness. A unidirectional program can be written using arbitrary language constructs, as long as the function it represents is polymorphic and the language constructs respect parametricity. The free theorems that follow from the polymorphic type of the program allow a kind of forensic examination of the transformation, determining its effect without examining its implementation. This is convenient, as the programmer is not restricted to using a particular syntax; but it does require the transformation to be polymorphic.In this paper, we lift this polymorphism requirement to improve the applicability of semantic bidirectionalization. Concretely, we provide a type class PackMγαμ, which intuitively reads “a concrete datatype γ is abstracted to a type α, and the ‘observations’ made by a transformation on values of type γ are recorded by a monad μ”. With PackM, we turn monomorphic transformations into polymorphic ones that are ready to be bidirectionalized. We demonstrate our technique with case studies of typical applications of bidirectional transformation, namely text processing, XML query and graph transformation, which were commonly considered beyond semantic bidirectionalization because of their monomorphic nature.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Science of Computer Programming - Volume 111, Part 1, 1 November 2015, Pages 79–109
نویسندگان
, ,