License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/OASIcs.EVCS.2023.20
URN: urn:nbn:de:0030-drops-177906
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2023/17790/
Go to the corresponding OASIcs Volume Portal


Lepper, Markus ; Trancón y Widemann, Baltasar

Visitor Optimization Revisited - Realizing Traversal Graph Pruning by Runtime Bytecode Generation

pdf-format:
OASIcs-EVCS-2023-20.pdf (0.7 MB)


Abstract

Visitors and Rewriters are a well-known and powerful design pattern for processing regular data structures in a declarative way, while still writing imperative code. The authors' "umod" model generator creates Java data models from a concise and algebraic notation, including code for visitor skeleton classes according to traversal annotations. User visitors are derived from these, overriding selected generated methods with payload code. All branches of the visiting trajectory that are not affected can thus be safely pruned according to control flow analysis. In the first version [Markus Lepper and Baltasar Trancón y Widemann, 2011], the pruning was implemented by dynamic case distinction. Here we have developed a new solution employing code generation at runtime.

BibTeX - Entry

@InProceedings{lepper_et_al:OASIcs.EVCS.2023.20,
  author =	{Lepper, Markus and Tranc\'{o}n y Widemann, Baltasar},
  title =	{{Visitor Optimization Revisited - Realizing Traversal Graph Pruning by Runtime Bytecode Generation}},
  booktitle =	{Eelco Visser Commemorative Symposium (EVCS 2023)},
  pages =	{20:1--20:12},
  series =	{Open Access Series in Informatics (OASIcs)},
  ISBN =	{978-3-95977-267-9},
  ISSN =	{2190-6807},
  year =	{2023},
  volume =	{109},
  editor =	{L\"{a}mmel, Ralf and Mosses, Peter D. and Steimann, Friedrich},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2023/17790},
  URN =		{urn:nbn:de:0030-drops-177906},
  doi =		{10.4230/OASIcs.EVCS.2023.20},
  annote =	{Keywords: Visitor Pattern, Generative Programming, Control Flow Analysis, Reflection, Runtime Code Generation}
}

Keywords: Visitor Pattern, Generative Programming, Control Flow Analysis, Reflection, Runtime Code Generation
Collection: Eelco Visser Commemorative Symposium (EVCS 2023)
Issue Date: 2023
Date of publication: 21.03.2023
Supplementary Material: Software (Source Code): http://bandm.eu


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI