首页    期刊浏览 2024年07月08日 星期一
登录注册

文章基本信息

  • 标题:A Simple Solution to Type Specialization
  • 本地全文:下载
  • 作者:Olivier Danvy
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:1998
  • 卷号:5
  • 期号:01
  • 语种:English
  • 出版社:Aarhus University
  • 摘要:Partial evaluation specializes terms, but traditionally thisspecialization does not apply to the type of these terms. As a result, specializing, e.g., an interpreter written in a typed language, which requires a \universal" type to encode expressible values, yields residual programs with type tags all over. Neil Jones has stated that getting rid of these type tags was an open problem, despite possible solutions such as Torben Mogensen's \constructor specialization." To solve this problem, John Hughes has proposed a new paradigm for partial evaluation, \Type Specialization," based on type inference instead of being based on symbolic interpretation. Type Specialization is very elegant in principle but it also appears non-trivial in practice. Stating the problem in terms of types instead of in terms of type encodings suggests a very simple type-directed solution, namely, to use a projection from the universal type to the specic type of the residual program. Standard partial evaluation then yields a residual programwithout type tags, simply and eciently.
国家哲学社会科学文献中心版权所有