A Lazy Desugaring System for Evaluating Programs with Sugars

被引:1
|
作者
Yang, Ziyi [1 ]
Xiao, Yushuo [2 ,3 ]
Guan, Zhichao [2 ,3 ]
Hu, Zhenjiang [2 ,3 ]
机构
[1] Natl Univ Singapore, Sch Comp, Singapore, Singapore
[2] Minist Educ, Key Lab High Confidence Software Technol, Beijing, Peoples R China
[3] Peking Univ, Sch Comp Sci, Beijing, Peoples R China
关键词
D O I
10.1007/978-3-030-99461-7_14
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Extending a programming language with syntactic sugars is common practice in language design. Given a core language, one can define a surface language on top of it with sugars. We propose a lazy desugaring system, which can generate the evaluation sequences of sugar programs in the syntax of the surface language. Specifically, we define an evaluation strategy on a mixed language which combines syntactic sugars with the core language. We formulate two properties, emulation and laziness, and prove that the evaluation strategy produces correct evaluation sequences. Besides, we have implemented a system based on this novel method and demonstrate its usefulness with several examples.
引用
收藏
页码:243 / 261
页数:19
相关论文
共 50 条
  • [21] Compiling lazy functional programs to Java']Java bytecode
    Meehan, G
    Joy, M
    SOFTWARE-PRACTICE & EXPERIENCE, 1999, 29 (07): : 617 - 645
  • [22] Securing Concurrent Lazy Programs Against Information Leakage
    Vassena, Marco
    Breitner, Joachim
    Russo, Alejandro
    2017 IEEE 30TH COMPUTER SECURITY FOUNDATIONS SYMPOSIUM (CSF), 2017, : 37 - 52
  • [23] Formal Reasoning About Lazy-STM Programs
    Li, Yong
    Zhang, Yu
    Chen, Yi-Yun
    Fu, Ming
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2010, 25 (04) : 841 - 852
  • [24] Formal Reasoning About Lazy-STM Programs
    Yong Li
    Yu Zhang
    Yi-Yun Chen
    Ming Fu
    Journal of Computer Science and Technology, 2010, 25 : 841 - 852
  • [25] Formal Reasoning About Lazy-STM Programs
    李勇
    张昱
    陈意云
    付明
    Journal of Computer Science & Technology, 2010, 25 (04) : 841 - 852
  • [26] Preserving sharing in the partial evaluation of lazy functional programs
    Fischer, Sebastian
    Silva, Josep
    Tamarit, Salvador
    Vidal, German
    LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2008, 4915 : 74 - +
  • [27] Exploiting Justifications for Lazy Grounding of Answer Set Programs
    Bogaerts, Bart
    Weinzierl, Antonius
    PROCEEDINGS OF THE TWENTY-SEVENTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2018, : 1737 - 1745
  • [28] Lazy Sequentialization for the Safety Verification of Unbounded Concurrent Programs
    Nguyen, Truc L.
    Fischer, Bernd
    La Torre, Salvatore
    Parlato, Gennaro
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS, ATVA 2016, 2016, 9938 : 174 - 191
  • [29] Efficient Lazy Evaluation of Rule-Based Programs
    Van Weert, Peter
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2010, 22 (11) : 1521 - 1534
  • [30] Profiling and Analysis of Object Lazy Allocation in Java']Java Programs
    Shi, Jianjun
    Ji, Weixing
    Zhang, Lulu
    Gao, Yujin
    Zhang, Han
    Qing, Duzheng
    2016 17TH IEEE/ACIS INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ARTIFICIAL INTELLIGENCE, NETWORKING AND PARALLEL/DISTRIBUTED COMPUTING (SNPD), 2016, : 591 - 596