Write a Blog >>
GPCE 2019
Sun 20 - Fri 25 October 2019 Athens, Greece
co-located with SPLASH 2019
Mon 21 Oct 2019 14:30 - 15:00 at Ground floor conference room - Meta Chair(s): Shigeru Chiba

This paper presents a technique for realizing reflection in attribute grammars. It is implemented and evaluated in the Silver attribute grammar system in the form of a reflect function mapping typed syntax trees and other values into a generic representation and a reify function for the inverse mapping. This is especially useful in meta-programming systems in which syntax trees are properly typed, both in the meta-language of the system and in the implementation to which the meta-language is translated. This is the case in Silver, a strongly typed language that translates to Java.

We demonstrates its usefulness in several ways. The first is in an extension to Silver for writing language extensions for the AbleC extensible C specification. This allows language developers to specify complete C syntax trees using the concrete syntax of C, with typed holes, instead of writing abstract syntax trees, saving almost 18,000 lines of specifications. Secondly, a scrap-your-boilerplate style substitution mechanism is also described. The third use is in serialization and deserialization of the interface files Silver generates to support separate compilation; a custom interface language was replaced by a generic reflection-based implementation saving around 2,000 lines of specifications. Finally, an experimental implementation of staged interpreters for a small staged functional language is discussed.

Mon 21 Oct
Times are displayed in time zone: (GMT+03:00) Beirut change

14:00 - 15:30: GPCE 2019 - Meta at Ground floor conference room
Chair(s): Shigeru ChibaGraduate School of Information Science and Technology, The University of Tokyo
gpce-2019-papers14:00 - 14:30
Alen StojanovETH Zurich, Tiark RompfPurdue University, Markus PüschelETH Zürich
gpce-2019-papers14:30 - 15:00
Lucas KramerUniversity of Minnesota, Ted KaminskiUniversity of Minnesota, Eric Van WykUniversity of Minnesota, USA
DOI Pre-print
gpce-2019-papers15:00 - 15:20
Amir ShaikhhaUniversity of Oxford