Modular Interpreters For The Masses: Implicit Context Propagation Using Object Algebras

Abstract : Modular interpreters have the potential to achieve component-based language development: instead of writing language interpreters from scratch, they can be assembled from reusable, semantic building blocks. Unfortunately, traditional language interpreters are hard to extend because different language constructs may require different interpreter signatures. For instance, arithmetic interpreters produce a value without any context information, whereas binding constructs require an additional environment. In this paper, we present a practical solution to this problem based on implicit context propagation. By structuring denotational-style interpreters as Object Algebras, base interpreters can be retroactively lifted into new interpreters that have an extended signature. The additional parameters are implicitly propagated behind the scenes, through the evaluation of the base interpreter. Interpreter lifting enables a flexible style of component-based language development. The technique works in mainstream object-oriented languages, does not sacrifice type safety or separate compilation, and can be easily automated. We illustrate implicit context propagation using a modular definition of Featherweight Java and its extension to support side-effects.
Type de document :
Communication dans un congrès
Kästner, C. and Gokhālé, A. GPCE 2015 - Proceedings of the 2015 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, 2015, Pittsburgh, United States. ACM, pp.171 - 180, 2015, ACM International Conference Proceeding Series. 〈10.1145/2814204.2814209〉
Liste complète des métadonnées

https://hal.inria.fr/hal-01261476
Contributeur : Tijs Van Der Storm <>
Soumis le : lundi 25 janvier 2016 - 14:06:34
Dernière modification le : mercredi 20 décembre 2017 - 17:42:01

Lien texte intégral

Identifiants

Collections

Citation

Pablo A. Inostroza Valdera, Tijs Van Der Storm. Modular Interpreters For The Masses: Implicit Context Propagation Using Object Algebras. Kästner, C. and Gokhālé, A. GPCE 2015 - Proceedings of the 2015 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, 2015, Pittsburgh, United States. ACM, pp.171 - 180, 2015, ACM International Conference Proceeding Series. 〈10.1145/2814204.2814209〉. 〈hal-01261476〉

Partager

Métriques

Consultations de la notice

106