Efficient Embedding of Strategic Attribute Grammars via Memoization
Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former, relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques.
Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have implemented our memoized embedding as the Ztrategic library and we benchmarked it against the state-of-the-art Strafunski and Kiama libraries. Our first results show that we are competitive against those two well established libraries.
Tue 17 JanDisplayed time zone: Eastern Time (US & Canada) change
16:00 - 17:30
2 online talksPEPM at Scollay
Chair(s): Edwin Brady University of St Andrews, UK
|Efficient Embedding of Strategic Attribute Grammars via MemoizationRemote|
José Nuno Macedo University of Minho, Emanuel Rodrigues HASLab & INESC TEC, University of Minho, Marcos Viera University of the Republic, Uruguay, João Saraiva
|Towards a Reflection for Effect HandlersRecorded|
Youyou Cong Tokyo Institute of Technology, Kenichi Asai Ochanomizu University
Jens Palsberg University of California, Los Angeles (UCLA), Edwin Brady University of St Andrews, UK