Synthesizing replacement classes
Malavika Samak, Deokhwan Kim, Martin C. Rinard
Abstract
We present a new technique for automatically synthesizing replacement classes. The technique starts with an original class O and a potential replacement class R, then uses R to synthesize a new class that implements the same interface and provides the same functionality as O. Critically, our technique works with a synthesized inter-class equivalence predicate between the states of O and R. It uses this predicate to ensure that original and synthesized methods leave corresponding O and R objects in equivalent states. The predicate therefore enables the technique to synthesize individual replacement methods in isolation while still obtaining a replacement class that leaves the original and replacement objects in equivalent states after arbitrarily long method invocation sequences. We have implemented the technique as part of a tool, named Mas , and evaluated it using open-source Java classes. The results highlight the effectiveness of Mas in synthesizing replacement classes.
CCS Concepts: • Software and its engineering → Programming by example; Object oriented frameworks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 345f013f-44e5-45e8-b7bd-2c1479975c23Cited by top-tier papers8
- Semantic Code Refactoring for Abstract Data TypesShankara Pailoor, Yuepeng Wang, Isil DilligPOPL 2024 · 13 citations
- Complexity-guided container replacement synthesisChengpeng Wang, Peisen Yao, Wensheng Tang, Qingkai Shi et al.OOPSLA 2022 · 11 citations
- Program Sketching by Automatically Generating Mocks from TestsNate F. F. Bragg, Jeffrey S. Foster, Cody Roux, Armando Solar-LezamaCAV 2021 · 4 citations
- SIRO: Empowering Version Compatibility in Intermediate Representations via Program SynthesisBowen Zhang, Wei Chen, Peisen Yao, Chengpeng Wang et al.ASPLOS 2024 · 4 citations
- Verifying Data Constraint Equivalence in FinTech SystemsChengpeng Wang, Gang Fan, Peisen Yao, Fuxiong Pan et al.ICSE 2023 · 4 citations
Related papers
- APIfix: output-oriented program synthesis for combating breaking changes in librariesXiang Gao, Arjun Radhakrishna, Gustavo Soares, Ridwan Shariffdeen et al.OOPSLA 2021 · 17 citations
- Synthesizing Object State Transformers for Dynamic Software UpdatesZelin Zhao, Yanyan Jiang, Chang Xu, Tianxiao Gu et al.ICSE 2021 · 9 citations
- From Custom Logic to APIs: Understanding and Recommending API Replacement RefactoringsBridget Nyirongo, Yanjie Jiang, Yuxia Zhang, Hui LiuISSTA 2026
- Abstraction-Aware Inference of Metamorphic RelationsAgustín Nolasco, Facundo Molina, Renzo Degiovanni, Alessandra Gorla et al.FSE 2024 · 4 citations
- Equivalent Mutants in the Wild: Identifying and Efficiently Suppressing Equivalent Mutants for Java ProgramsBenjamin Kushigian, Samuel J. Kaufman, Ryan Featherman, Hannah Potter et al.ISSTA 2024 · 3 citations
