Staging beyond terms: Prospects and challenges

Jun Inoue, Oleg Kiselyov, Yukiyoshi Kameyama

Research output: Chapter in Book/Report/Conference proceedingConference contribution

7 Citations (Scopus)

Abstract

Staging is a program generation paradigm with a clean, wellinvestigated semantics which statically ensures that the generated code is always well-typed and well-scoped. Staging is often used for specializing programs to the known properties or parts of data to improve efficiency, but so far it has been limited to generating terms. This short paper describes our ongoing work on extending staging, with its strong safety guarantees, to generation of nonterms, focusing on ML-style modules. The purpose is to map out the promises and challenges, then to pose a question to solicit the community's expertise in evaluating how essential our extensions are for the purpose of applying staging beyond the realm of terms. We demonstrate our extensions' use in specializing functor applications to eliminate its (currently large) overhead in OCaml. We explain the challenges that those extensions bring in and identify a promising line of attack. Unexpectedly, however, it turns out that we can avoid module generation altogether by representing modules, possibly containing abstract types, as polymorphic records. With the help of first-class modules, module specialization reduces to ordinary term specialization, which can be done with conventional staging. The extent to which this hack generalizes is unclear. Thus we have a question to the community: is there a compelling use case for module generation? With these insights and questions, we offer a starting point for a long-term program in the next stage of staging research.

Original languageEnglish
Title of host publicationPEPM 2016 - Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2016
EditorsTiark Rompf, Martin Erwig
PublisherAssociation for Computing Machinery, Inc
Pages103-108
Number of pages6
ISBN (Electronic)9781450340977
DOIs
Publication statusPublished - 2016 Jan 11
Event2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2016 - St. Petersburg, United States
Duration: 2016 Jan 182016 Jan 19

Publication series

NamePEPM 2016 - Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2016

Other

Other2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2016
Country/TerritoryUnited States
CitySt. Petersburg
Period16/1/1816/1/19

Keywords

  • First-class modules
  • Functional programming
  • Multi-stage programming
  • Type optimization
  • Type systems

ASJC Scopus subject areas

  • Computer Vision and Pattern Recognition
  • Software
  • Computer Graphics and Computer-Aided Design

Fingerprint

Dive into the research topics of 'Staging beyond terms: Prospects and challenges'. Together they form a unique fingerprint.

Cite this