Write a Blog >>
APLAS 2019
Sun 1 - Wed 4 December 2019 Bali, Indonesia
Tue 3 Dec 2019 10:30 - 11:00 at Bali Room - Language Design and Implementation Chair(s): Sandrine Blazy

Meta-interpreters in Prolog are a powerful and elegant way to implement language extensions and non-standard semantics. But how can we bring the benefits of Prolog-style meta-interpreters to systems that combine functional and logic programming? In Prolog, a program can access its own structure via reflection, and meta-interpreters are simple to implement because the “pure” core language is small—not so, in larger systems that combine different paradigms.

In this paper, we present a particular kind of functional logic meta- programming, based on embedding a small first-order logic system in an expressive host language. Embedded logic engines are not new, as exemplified by various systems including miniKanren in Scheme and LogicT in Haskell. However, previous embedded systems generally lack meta- programming capabilities in the sense of meta-interpretation.

Instead of relying on reflection for meta-programming, we show how to adapt popular multi-stage programming techniques to a logic program- ming setting and use the embedded logic to generate reified first-order structures, which are again simple to interpret. Our system has an appealing power-to-weight ratio, based on the simple and general notion of dynamically scoped mutable variables. We also show how, in many cases, non-standard semantics can be realized without explicit reification and interpretation, but instead by customizing program execution through the host language. As a key example, we extend our system with a tabling/memoization facility. The need to interact with mutable variables renders this is a highly nontrivial challenge, and the crucial insight is to extract symbolic representations of their side effects from memoized rules. We demonstrate that multiple independent semantic modifications can be combined successfully in our system, for example tabling and tracing.

Tue 3 Dec
Times are displayed in time zone: (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi change

10:30 - 12:00: Research Papers - Language Design and Implementation at Bali Room
Chair(s): Sandrine BlazyUniv Rennes- IRISA
aplas-2019-papers10:30 - 11:00
Nada AminHarvard University, William E. ByrdUniversity of Alabama at Birmingham, USA, Tiark RompfPurdue University
aplas-2019-papers11:00 - 11:30
Daan LeijenMicrosoft Research, USA, Ben ZornMicrosoft, Leonardo De MouraMicrosoft Research, n.n.
aplas-2019-papers11:30 - 12:00
Yutaka NagashimaData61, Australia