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 条
  • [41] Testing and tracing lazy functional programs using QuickCheck and Hat
    Claessen, K
    Runciman, C
    Chitil, O
    Hughes, J
    Wallace, M
    ADVANCED FUNCTIONAL PROGRAMMING, 2003, 2638 : 59 - 99
  • [42] LAZY TASK CREATION - A TECHNIQUE FOR INCREASING THE GRANULARITY OF PARALLEL PROGRAMS
    MOHR, E
    KRANZ, DA
    HALSTEAD, RH
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 1991, 2 (03) : 264 - 280
  • [43] EVALUATING MULTIDISCIPLINARY PROGRAMS
    BRIDGEWATER, PB
    MCDONALD, RJ
    JOURNAL OF ENVIRONMENTAL EDUCATION, 1984, 15 (02): : 28 - 31
  • [44] EVALUATING MANPOWER PROGRAMS
    MANGUM, GL
    MONTHLY LABOR REVIEW, 1968, 91 (02) : 21 - 22
  • [45] EVALUATING THE BREAKTHROUGH PROGRAMS
    SAXE, RW
    JOURNAL OF TEACHER EDUCATION, 1965, 16 (02) : 202 - 209
  • [46] EVALUATING COLLABORATIVE PROGRAMS
    HARTLEY, K
    MARTIN, S
    DEFENCE ECONOMICS, 1993, 4 (02): : 195 - 211
  • [47] EVALUATING AGRICULTURAL PROGRAMS
    YOUNG, HC
    GIBSON, RH
    GROWTH AND CHANGE, 1971, 2 (03) : 42 - 46
  • [48] EVALUATING SOCIAL PROGRAMS
    LEVITAN, SA
    SOCIETY, 1977, 14 (04) : 66 - 68
  • [49] EVALUATING HEALTH PROGRAMS
    DENISTON, OL
    ROSENSTOCK, IM
    PUBLIC HEALTH REPORTS, 1970, 85 (09) : 835 - 840
  • [50] A learning system based on lazy metareasoning
    Houeland T.G.
    Aamodt A.
    Houeland, Tor Gunnar (houeland@idi.ntnu.no), 2018, Springer Verlag (07) : 129 - 146