首页 | 本学科首页   官方微博 | 高级检索  
     


The essence of eta-expansion in partial evaluation
Authors:Olivier Danvy  Karoline Malmkj?r and Jens Palsberg
Affiliation:(1) Computer Science Department, Aarhus University, Ny Munkegade, DK-8000 Aarhus C, Denmark
Abstract:Selective eta-expansion is a powerful ldquobinding-time improvementrdquo,i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few.In this paper, we describe the problem and the effect of eta-redexes in terms of monovariant binding-time propagation: eta-redexes preserve the static data flow of a source program by interfacingstatic higher-order values in dynamic contexts anddynamic higher-order values in static contexts. They contribute to twodistinct binding-time improvements.We present two extensions of Gomard's monovariant binding-time analysis for the pure lambda-calculus. Our extensions annotateand eta-expand lambda-terms. The first one eta-expands static higher-order values in dynamic contexts. The second also eta-expands dynamic higher-order values in static contexts.As a significant application, we show that our first binding-time analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern one-pass CPS transformer. This binding-time improvement is known, but it is still left unexplained in contemporary literature,e.g., about ldquocps-basedrdquo partial evaluation.We also outline the counterpart of eta-expansion for partially static data structures.
Keywords:Two-level lambda-calculus" target="_blank">gif" alt="lambda" align="BASELINE" BORDER="0">-calculus  binding-time analysis  coercions
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号