Generating mutually recursive definitions

Jeremy Yallop, Oleg Kiselyov

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

4 Citations (Scopus)

Abstract

Many functional programs - state machines [Krishnamurthi 2006], top-down and bottom-up parsers [Hinze and Paterson 2003; Hutton and Meijer 1996], evaluators [Abelson et al. 1984], GUI initialization graphs [Syme 2006], &c. - are conveniently expressed as groups of mutually recursive bindings. One therefore expects program generators, such as those written in MetaOCaml, to be able to build programs with mutual recursion. Unfortunately, currently MetaOCaml can only build recursive groups whose size is hard-coded in the generating program. The general case requires something other than quotation, and seemingly weakens static guarantees on the resulting code. We describe the challenges and propose a new language construct for assuredly generating binding groups of arbitrary size - illustrating with a collection of examples for mutual, n-ary, heterogeneous, value and polymorphic recursion.

Original languageEnglish
Title of host publicationPEPM 2019 - Proceedings of the 2019 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2019
EditorsManuel Hermenegildo, Atsushi Igarashi
PublisherAssociation for Computing Machinery, Inc
Pages75-81
Number of pages7
ISBN (Electronic)9781450362269
DOIs
Publication statusPublished - 2019 Jan 14
Event2019 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2019, in affiliation with the annual Symposium on Principles of Programming Languages, POPL 2019 - Cascais, Portugal
Duration: 2019 Jan 142019 Jan 15

Publication series

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

Conference

Conference2019 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2019, in affiliation with the annual Symposium on Principles of Programming Languages, POPL 2019
Country/TerritoryPortugal
CityCascais
Period19/1/1419/1/15

Keywords

  • Fixed points
  • Metaprogramming
  • Multi-stage programming
  • Recursion

ASJC Scopus subject areas

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

Fingerprint

Dive into the research topics of 'Generating mutually recursive definitions'. Together they form a unique fingerprint.

Cite this