Data di Pubblicazione:
2023
Citazione:
On the granularity of linguistic reuse / F. Bertolotti, W. Cazzola, L. Favalli. - In: THE JOURNAL OF SYSTEMS AND SOFTWARE. - ISSN 0164-1212. - 202:(2023), pp. 111704.1-111704.16. [10.1016/j.jss.2023.111704]
Abstract:
Programming languages are complex software systems integrated across an ecosystem of different
applications such as language compilers or interpreters but also an integrated development environ-
ment comprehensive of syntax highlighting, code completion, error recovery, and a debugger. The
complexity of language ecosystems can be faced using language workbenches—i.e., tools that tackle
the development of programming languages, domain specific languages and their ecosystems in a
modular way.
As with any other software system, one of the priorities that developers struggle to achieve when
developing programming languages is reusability. After all, the capacity to easily reuse and adapt
existing components to new scenarios can dramatically improve development times. Therefore, as
programming languages offer features to reuse existing code, language workbenches should offer tools
to reuse existing language assets. However, reusability can be achieved in many different ways.
In this work, we identify six forms of linguistic reusability, ordered by level of granularity: (i) sub-
languages composition, (ii) language features composition, (iii) syntax and semantics assets composition,
(iv) semantic assets composition, (v) actions composition, and. (vi) action extension. We use these
mechanisms to extend the taxonomy of language composition proposed by Erdweg et al. To show a
concrete application of this taxonomy, we evaluate the capabilities provided by the Neverlang language
workbench with regards to our taxonomy and extend it by adding explicit support for any granularity
level that was originally not supported. This is done by instantiating two levels of reusability as
actual operators—desugaring, and delegation. We evaluate these operators against the clone-and-own
approach, which was the only form of reuse at that level of granularity prior to the introduction of
explicit operators. We show that with the clone-and-own approach the design quality of the source
code is negatively affected. We conclude that language workbenches can benefit from the introduction
of mechanisms to explicitly support reuse at all granularity levels.
Tipologia IRIS:
01 - Articolo su periodico
Keywords:
Reuse and evolution; Language evolution; Domain specific languages; Feature modularity; Language product lines; Language composition;
Elenco autori:
F. Bertolotti, W. Cazzola, L. Favalli
Link alla scheda completa:
Link al Full Text: