File Download
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.4230/LIPIcs.ECOOP.2017.29
- Scopus: eid_2-s2.0-85037815140
Supplementary
-
Citations:
- Scopus: 0
- Appears in Collections:
Conference Paper: EVF: An Extensible and Expressive Visitor Framework for Programming Language Reuse
Title | EVF: An Extensible and Expressive Visitor Framework for Programming Language Reuse |
---|---|
Authors | |
Keywords | Visitor Pattern Object Algebras Modularity Domain-Specific Languages |
Issue Date | 2017 |
Publisher | Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik |
Citation | The 31st European Conference on Object-Oriented Programming (ECOOP 2017), Barcelona, Spain, 18-23 June 2017. In In Müller, P (ed.). LIPICS - Leibniz International Proceedings in Informatics, 2017, v. 74, article no. 29; pp. 29:1–29:32 How to Cite? |
Abstract | Object Algebras are a design pattern that enables extensibility, modularity, and reuse in mainstream object-oriented languages such as Java. The theoretical foundations of Object Algebras are rooted on Church encodings of datatypes, which are in turn closely related to folds in functional programming. Unfortunately, it is well-known that certain programs are difficult to write, and may incur performance penalties when using Church-encodings/folds. This paper presents EVF: an extensible and expressive Java Visitor framework. The visitors supported by EVF generalize Object Algebras and enable writing programs using a generally recursive style rather than folds. The use of such generally recursive style enables users to more naturally write programs, which would otherwise require contrived workarounds using a fold-like structure. EVF visitors retain the type-safe extensibility of Object Algebras. The key advance in EVF is a novel technique to support extensible external visitors. Extensible external visitors are able to control traversals with direct access to the data structure being traversed, allowing dependent operations to be defined modularly without the need of advanced type system features. To make EVF practical, the framework employs annotations to automatically generate large amounts of boilerplate code related to visitors and traversals. To illustrate the applicability of EVF we conduct a case study, which refactors a large number of non-modular interpreters from the “Types and Programming Languages” (TAPL) book. Using EVF we are able to create a modular software product line (SPL) of the TAPL interpreters, enabling sharing of large portions of code and features. The TAPL software product line contains several modular operations, which would be non-trivial to define with standard Object Algebras. |
Description | ECOOP 2017 ECOOP Research Papers: Language and Library Design |
Persistent Identifier | http://hdl.handle.net/10722/301423 |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Zhang, W | - |
dc.contributor.author | Dos Santos Oliveira, BC | - |
dc.date.accessioned | 2021-07-27T08:10:51Z | - |
dc.date.available | 2021-07-27T08:10:51Z | - |
dc.date.issued | 2017 | - |
dc.identifier.citation | The 31st European Conference on Object-Oriented Programming (ECOOP 2017), Barcelona, Spain, 18-23 June 2017. In In Müller, P (ed.). LIPICS - Leibniz International Proceedings in Informatics, 2017, v. 74, article no. 29; pp. 29:1–29:32 | - |
dc.identifier.uri | http://hdl.handle.net/10722/301423 | - |
dc.description | ECOOP 2017 ECOOP Research Papers: Language and Library Design | - |
dc.description.abstract | Object Algebras are a design pattern that enables extensibility, modularity, and reuse in mainstream object-oriented languages such as Java. The theoretical foundations of Object Algebras are rooted on Church encodings of datatypes, which are in turn closely related to folds in functional programming. Unfortunately, it is well-known that certain programs are difficult to write, and may incur performance penalties when using Church-encodings/folds. This paper presents EVF: an extensible and expressive Java Visitor framework. The visitors supported by EVF generalize Object Algebras and enable writing programs using a generally recursive style rather than folds. The use of such generally recursive style enables users to more naturally write programs, which would otherwise require contrived workarounds using a fold-like structure. EVF visitors retain the type-safe extensibility of Object Algebras. The key advance in EVF is a novel technique to support extensible external visitors. Extensible external visitors are able to control traversals with direct access to the data structure being traversed, allowing dependent operations to be defined modularly without the need of advanced type system features. To make EVF practical, the framework employs annotations to automatically generate large amounts of boilerplate code related to visitors and traversals. To illustrate the applicability of EVF we conduct a case study, which refactors a large number of non-modular interpreters from the “Types and Programming Languages” (TAPL) book. Using EVF we are able to create a modular software product line (SPL) of the TAPL interpreters, enabling sharing of large portions of code and features. The TAPL software product line contains several modular operations, which would be non-trivial to define with standard Object Algebras. | - |
dc.language | eng | - |
dc.publisher | Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik | - |
dc.relation.ispartof | European Conference on Object-Oriented Programming (ECOOP), 2017 | - |
dc.relation.ispartof | IPICS - Leibniz International Proceedings in Informatics | - |
dc.rights | This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. | - |
dc.rights | © Weixin Zhang and Bruno C. d. S. Oliveira | - |
dc.subject | Visitor Pattern | - |
dc.subject | Object Algebras | - |
dc.subject | Modularity | - |
dc.subject | Domain-Specific Languages | - |
dc.title | EVF: An Extensible and Expressive Visitor Framework for Programming Language Reuse | - |
dc.type | Conference_Paper | - |
dc.identifier.email | Dos Santos Oliveira, BC: bruno@cs.hku.hk | - |
dc.identifier.authority | Dos Santos Oliveira, BC=rp01786 | - |
dc.description.nature | published_or_final_version | - |
dc.identifier.doi | 10.4230/LIPIcs.ECOOP.2017.29 | - |
dc.identifier.scopus | eid_2-s2.0-85037815140 | - |
dc.identifier.hkuros | 323717 | - |
dc.identifier.volume | 74 | - |
dc.identifier.spage | 29:1 | - |
dc.identifier.epage | 29:32 | - |
dc.identifier.eissn | 1868-8969 | - |
dc.publisher.place | Dagstuhl, Germany | - |