File Download

There are no files associated with this item.

  Links for fulltext
     (May Require Subscription)
Supplementary

Article: Castor: Programming with extensible generative visitors

TitleCastor: Programming with extensible generative visitors
Authors
KeywordsModularity
Visitor pattern
Pattern matching
Metaprogramming
OOP
Issue Date2020
PublisherElsevier BV. The Journal's web site is located at http://www.elsevier.com/locate/scico
Citation
Science of Computer Programming, 2020, v. 193, p. article no. 102449 How to Cite?
AbstractMuch recent work on type-safe extensibility for Object-Oriented languages has focused on design patterns that require modest type system features. Examples of such design patterns include Object Algebras, Extensible Visitors, Finally Tagless interpreters, or Polymorphic Embeddings. Those techniques, which often use a functional style, can solve basic forms of the Expression Problem. However, they have important limitations. This paper presents Castor: a Scala framework for programming with extensible, generative visitors. Castor has several advantages over previous approaches. Firstly, Castor comes with support for (type-safe) pattern matching to complement its visitors with a concise notation to express operations. Secondly, Castor supports type-safe interpreters (à la Finally Tagless), but with additional support for pattern matching and a generally recursive style. Thirdly, Castor enables many operations to be defined using an imperative style, which is significantly more performant than a functional style (especially in the JVM platform). Finally, functional techniques usually only support tree structures well, but graph structures are poorly supported. Castor supports type-safe extensible programming on graph structures. The key to Castor's usability is the use of annotations to automatically generate large amounts of boilerplate code to simplify programming with extensible visitors. To illustrate the applicability of Castor we present several applications and two case studies. The first case study compares the ability of Castor for modularizing the interpreters from the “Types and Programming Languages” book with previous modularization work. The second case study on UML activity diagrams illustrates the imperative aspects of Castor, as well as its support for hierarchical datatypes and graphs.
Persistent Identifierhttp://hdl.handle.net/10722/301342
ISSN
2022 Impact Factor: 1.3
2020 SCImago Journal Rankings: 0.313
ISI Accession Number ID

 

DC FieldValueLanguage
dc.contributor.authorZHANG, W-
dc.contributor.authorDos Santos Oliveira, BCDS-
dc.date.accessioned2021-07-27T08:09:40Z-
dc.date.available2021-07-27T08:09:40Z-
dc.date.issued2020-
dc.identifier.citationScience of Computer Programming, 2020, v. 193, p. article no. 102449-
dc.identifier.issn0167-6423-
dc.identifier.urihttp://hdl.handle.net/10722/301342-
dc.description.abstractMuch recent work on type-safe extensibility for Object-Oriented languages has focused on design patterns that require modest type system features. Examples of such design patterns include Object Algebras, Extensible Visitors, Finally Tagless interpreters, or Polymorphic Embeddings. Those techniques, which often use a functional style, can solve basic forms of the Expression Problem. However, they have important limitations. This paper presents Castor: a Scala framework for programming with extensible, generative visitors. Castor has several advantages over previous approaches. Firstly, Castor comes with support for (type-safe) pattern matching to complement its visitors with a concise notation to express operations. Secondly, Castor supports type-safe interpreters (à la Finally Tagless), but with additional support for pattern matching and a generally recursive style. Thirdly, Castor enables many operations to be defined using an imperative style, which is significantly more performant than a functional style (especially in the JVM platform). Finally, functional techniques usually only support tree structures well, but graph structures are poorly supported. Castor supports type-safe extensible programming on graph structures. The key to Castor's usability is the use of annotations to automatically generate large amounts of boilerplate code to simplify programming with extensible visitors. To illustrate the applicability of Castor we present several applications and two case studies. The first case study compares the ability of Castor for modularizing the interpreters from the “Types and Programming Languages” book with previous modularization work. The second case study on UML activity diagrams illustrates the imperative aspects of Castor, as well as its support for hierarchical datatypes and graphs.-
dc.languageeng-
dc.publisherElsevier BV. The Journal's web site is located at http://www.elsevier.com/locate/scico-
dc.relation.ispartofScience of Computer Programming-
dc.subjectModularity-
dc.subjectVisitor pattern-
dc.subjectPattern matching-
dc.subjectMetaprogramming-
dc.subjectOOP-
dc.titleCastor: Programming with extensible generative visitors-
dc.typeArticle-
dc.identifier.emailDos Santos Oliveira, BCDS: bruno@cs.hku.hk-
dc.identifier.authorityDos Santos Oliveira, BCDS=rp01786-
dc.description.naturelink_to_subscribed_fulltext-
dc.identifier.doi10.1016/j.scico.2020.102449-
dc.identifier.scopuseid_2-s2.0-85082606755-
dc.identifier.hkuros323735-
dc.identifier.volume193-
dc.identifier.spagearticle no. 102449-
dc.identifier.epagearticle no. 102449-
dc.identifier.isiWOS:000528192000004-
dc.publisher.placeNetherlands-

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats