Covariant conversions (coco): A design pattern for type-safe modular software evolution in object-oriented systems
Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
Documents
- Covariant Conversions (CoCo)
Final published version, 2.17 MB, PDF document
Software evolution is an essential challenge for all software engineers, typically addressed solely using code versioning systems and language-specific code analysis tools. Most versioning systems view the evolution of a system as a directed acyclic graph of steps, with independent branches that could be merged. What these systems fail to provide is the ability to ensure stable APIs or that each subsequent evolution represents a cohesive extension yielding a valid system. Modular software evolution ensures that APIs remain stable, which is achieved by ensuring that only additional methods, fields, and data types are added, while treating existing modules through blackbox interfaces. Even with these restrictions, it must be possible to add new variations, fields, and methods without extensive duplication of prior module code. In contrast to most literature, our focus is on ensuring modular software evolution using mainstream object-oriented programming languages, instead of resorting to novel language extensions. We present a novel CoCo design pattern that supports type-safe covariantly overridden convert methods to transform earlier data type instances into their newest evolutionary representation to access operations that had been added later. CoCo supports both binary methods and producer methods. We validate and contrast our approach using a well-known compiler construction case study that other researchers have also investigated for modular evolution. Our resulting implementation relies on less boilerplate code, is completely type-safe, and allows clients to use normal object-oriented calling conventions. We also compare CoCo with existing approaches to the Expression Problem. We conclude by discussing how CoCo could change the direction of currently proposed Java language extensions to support closed-world assumptions about data types, as borrowed from functional programming.
Original language | English |
---|---|
Title of host publication | 35th European Conference on Object-Oriented Programming, ECOOP 2021 |
Editors | Anders Moller, Manu Sridharan |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
Publication date | 1 Jul 2021 |
Pages | 1-25 |
Article number | 4 |
ISBN (Electronic) | 9783959771900 |
DOIs | |
Publication status | Published - 1 Jul 2021 |
Event | 35th European Conference on Object-Oriented Programming, ECOOP 2021 - Virtual, Aarhus, Denmark Duration: 11 Jul 2021 → 17 Jul 2021 |
Conference
Conference | 35th European Conference on Object-Oriented Programming, ECOOP 2021 |
---|---|
Land | Denmark |
By | Virtual, Aarhus |
Periode | 11/07/2021 → 17/07/2021 |
Sponsor | AITO |
Series | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 194 |
ISSN | 1868-8969 |
- Binary method, Expression problem, Producer method, Software evolution, Type safety
Research areas
Number of downloads are based on statistics from Google Scholar and www.ku.dk
ID: 296248521