Transformations between Composite and Visitor implementations in Java
Akram Ajouli (LINA, INRIA - EMN), Julien Cohen (LINA), Jean-Claude, Royer (LINA, INRIA - EMN)

TL;DR
This paper explores automated refactoring transformations between Composite and Visitor design patterns in Java, analyzing how implementation variations affect these transformations and validating them through case studies on JHotDraw.
Contribution
It introduces a systematic approach for transforming between Composite and Visitor structures, considering implementation variations and automating the process.
Findings
Transformation preconditions vary with implementation choices
Automated transformation is feasible for real-world code
Variations impact the complexity of refactoring
Abstract
Basic automated refactoring operations can be chained to perform complex structure transformations. This is useful for recovering the initial architecture of a source code which has been degenerated with successive evolutions during its maintenance lifetime. This is also useful for changing the structure of a program so that a maintenance task at hand becomes modular when it would be initially crosscutting. We focus on programs structured according to Composite and Visitor design patterns, which have dual properties with respect to modularity. We consider a refactoring-based round-trip transformation between these two structures and we study how that transformation is impacted by four variations in the implementation of these patterns. We validate that study by computing the smallest preconditions for the resulting transformations. We also automate the transformation and apply it to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Logic, programming, and type systems · Advanced Software Engineering Methodologies
