Sciweavers

OOPSLA
2015
Springer

Scrap your boilerplate with object algebras

8 years 11 days ago
Scrap your boilerplate with object algebras
ng complex Abstract Syntax Trees (ASTs) typically requires large amounts of tedious boilerplate code. For many operations most of the code simply walks the structure, and only a small portion of the code implements the functionality that motivated the traversal in the first place. This paper presents a type-safe Java framework called Shy that removes much of this boilerplate code. In Shy Object Algebras are used to describe complex and extensible AST structures. Using Java annotations Shy generates generic boilerplate code for various types of traversals. For a concrete traversal, users of Shy can then inherit from the generated code and override only the interesting cases. Consequently, the amount of code that users need to write is significantly smaller. Moreover, traversals using the Shy framework are also much more structure shy, becoming more adaptive to future changes or extensions to the AST structure. To prove the effectiveness of the approach, we applied Shy in the implemen...
Haoyuan Zhang, Zewei Chu, Bruno C. d. S. Oliveira,
Added 16 Apr 2016
Updated 16 Apr 2016
Type Journal
Year 2015
Where OOPSLA
Authors Haoyuan Zhang, Zewei Chu, Bruno C. d. S. Oliveira, Tijs van der Storm
Comments (0)