An Efficient Composition of Bidirectional Programs by Memoization and Lazy Update

被引:1
|
作者
Tsushima, Kanae [1 ,2 ]
Trong, Bach Nguyen [1 ,2 ]
Gluck, Robert [3 ]
Hu, Zhenjiang [4 ]
机构
[1] Natl Inst Informat, Tokyo, Japan
[2] Grad Univ Adv Studies SOKENDAI, Hayama, Kanagawa, Japan
[3] Univ Copenhagen, Copenhagen, Denmark
[4] Peking Univ, Beijing, Peoples R China
关键词
Bidirectional transformation; Implementation technique; Efficiency; Optimization; Tupling;
D O I
10.1007/978-3-030-59025-3_10
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Bidirectional transformations (BX) are a solution to the view update problem and widely used for synchronizing data. The semantics and correctness of bidirectional programs have been investigated intensively during the past years, but their efficiency and optimization are not yet fully understood. In this paper, as a first step, we study different evaluation methods to optimize their evaluation. We focus on the interpretive evaluation of BX compositions because we found that these compositions are an important cause of redundant computations if the compositions are not right associative. For evaluating BX compositions efficiently, we investigate two memoization methods. The first method, minBiGUL m, uses memoization, which improves the runtime of many BX programs by keeping intermediate results for later reuse. A disadvantage is the familiar tradeoff for keeping and searching values in a table. When inputs become large, the overhead increases and the effectiveness decreases. To deal with large inputs, we introduce the second method, xpg, that uses tupling, lazy update and lazy evaluation as optimizations. Lazy updates delay updates in closures and enables them to use them later. Both evaluation methods were fully implemented for minBiGUL. The experimental results show that our methods are faster than the original method of BiGUL for the non-right associative compositions.
引用
收藏
页码:159 / 178
页数:20
相关论文
共 50 条
  • [1] LAZY UPDATE - AN EFFICIENT IMPLEMENTATION OF LRU STACKS
    BARRIGA, L
    AYANI, R
    INFORMATION PROCESSING LETTERS, 1995, 54 (02) : 81 - 84
  • [2] Story of Your Lazy Function's Life: A Bidirectional Demand Semantics for Mechanized Cost Analysis of Lazy Programs
    Xia, Li-yao
    Israel, Laura
    Kramarz, Maite
    Coltharp, Nicholas
    Claessen, Koen
    Weirich, Stephanie
    Li, Yao
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2024, 8 (ICFP):
  • [3] Efficient Lazy Evaluation of Rule-Based Programs
    Van Weert, Peter
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2010, 22 (11) : 1521 - 1534
  • [4] LAZY DEBUGGING OF LAZY FUNCTIONAL PROGRAMS
    SNYDER, RM
    NEW GENERATION COMPUTING, 1990, 8 (02) : 139 - 161
  • [5] Synthesizing Efficient Memoization Algorithms
    Sun, Yican
    Peng, Xuanyu
    Xiong, Yingfei
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (OOPSLA):
  • [6] LAZY WRITER UPDATE
    WELSH, T
    INTERFACE AGE, 1983, 8 (08): : 17 - 17
  • [7] Efficient simulation of wireless networks using lazy MAC state update
    Lee, YJ
    Riley, GF
    Workshop on Principles of Advanced and Distributed Simulation, Proceedings, 2005, : 131 - 140
  • [8] Skipping CNN Convolutions Through Efficient Memoization
    de Moura, Rafael Fao
    Santos, Paulo C.
    de Lima, Joao Paulo C.
    Alves, Marco A. Z.
    Beck, Antonio C. S.
    Carro, Luigi
    EMBEDDED COMPUTER SYSTEMS: ARCHITECTURES, MODELING, AND SIMULATION, SAMOS 2019, 2019, 11733 : 65 - 76
  • [9] Lazy Programs Leak Secrets
    Buiras, Pablo
    Russo, Alejandro
    SECURE IT SYSTEMS, NORDSEC 2013, 2013, 8208 : 116 - 122
  • [10] Specialization of lazy functional logic programs
    Alpuente, M
    Falaschi, M
    Julian, P
    Vidal, G
    ACM SIGPLAN NOTICES, 1997, 32 (12) : 151 - 162