A Pure Meta-interpreter for Flat GHC, a Concurrent Constraint Language

  • Authors:
  • Kazunori Ueda

  • Affiliations:
  • -

  • Venue:
  • Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, Part I
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper discusses the construction of a meta-interpreter of Flat GHC, one of the simplest and earliest concurrent constraint languages.Meta-interpretation has a long history in logic programming, and has been applied extensively to building programming systems, adding functionalities, modifying operational semantics and evaluation strategies, and so on. Our objective, in contrast, is to design the pair of (i) a representation of programs suitable for code mobility and (ii) a pure interpreter (or virtual machine) of the represented code, bearing networked applications of concurrent constraint programming in mind. This is more challenging than it might seem; indeed, meta-interpreters of many programming languages achieved their objectives by adding small primitives into the languages and exploiting their functionalities. A meta-interpreter in a pure, simple concurrent language is useful because it is fully amenable to theoretical support including partial evaluation.After a number of trials and errors, we have arrived at treecode, a groundterm representation of Flat GHC programs that can be easily interpreted, transmitted over the network, and converted back to the original syntax. The paper describes how the interpreter works, where the subtleties lie, and what its design implies. It also describes how the interpreter, given the treecode of a program, is partially evaluated to the original program by the unfold/fold transformation system for Flat GHC.