Kayak: Safe Semantic Refactoring to Java Streams
Cristina David, Pascal Kesseli, Daniel Kroening

TL;DR
Kayak is a semantics-driven tool that automatically refactors Java code to use Streams, enabling more precise and complex transformations than traditional syntax-driven methods.
Contribution
This paper introduces Kayak, a novel semantics-based refactoring approach that leverages automated program synthesis to improve Java code transformation to Streams.
Findings
Semantics-driven refactorings are more precise than syntax-driven ones.
Kayak successfully refactors complex Java code to Streams.
Experimental results show improved rewriting capabilities.
Abstract
Refactorings are structured changes to existing software that leave its externally observable behaviour unchanged. Their intent is to improve readability, performance or other non-behavioural properties. State-of-the-art automatic refactoring tools are syntax-driven and, therefore, overly conservative. In this paper we explore semantics-driven refactoring, which enables much more sophisticated refactoring schemata. As an exemplar of this broader idea, we present Kayak, an automatic refactoring tool that transforms Java with external iteration over collections into code that uses Streams, a new abstraction introduced by Java 8. Our refactoring procedure performs semantic reasoning and search in the space of possible refactorings using automated program synthesis. Our experimental results support the conjecture that semantics-driven refactorings are more precise and are able to rewrite…
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 · Software System Performance and Reliability · Software Testing and Debugging Techniques
