Metamorphic-Evidence Arbitration for Compiler-in-the-Loop Objective-C-to-Swift Migration
Keywords:
program translation, metamorphic testing, Swift, compiler feedback, candidate selection, reproducible evaluationAbstract
Cross-language migration requires distinguishing target-language well-formedness from behavior preservation. A compiler can reject ill-typed code but cannot reject a compiling implementation whose semantics diverge on untested inputs. This paper develops an evidence-constrained candidate arbiter that extends the ArchMigrate-Swift compiler-in-the-loop migration workflow with family-specific metamorphic relations. It checks transformations of candidate outputs without relying on reference outputs for the derived inputs. We implemented the system with a deterministic Objective-C-to-Swift migration generator and executed actual Swift 6.2.1 compilation and evaluation. In 64 controlled variants from eight semantic families, public-test arbitration with three sparse public inputs passed 32/64 held-out suites and relation-aware arbitration passed 64/64. Compiler repair raised success from 24/64 to 32/64. Independently compiled Objective-C and Swift reference programs agreed on 1,920/1,920 executions. An adversarial suite of 64 branch-triggered mutants passed the finite metamorphic checks but failed all hidden suites, exposing a decisive coverage limitation. The evidence supports relation-aware selection for specified mutation classes, not general-purpose migration accuracy.
Downloads
References
1. Apple Inc., “Migrating your Objective-C code to Swift,” Apple Developer Documentation, accessed Oct. 2026.
2. Apple Inc., “Importing Objective-C into Swift,” Apple Developer Documentation, accessed Oct. 2026.
3. B. Rozière, M.-A. Lachaux, L. Chanussot, and G. Lample, “Unsupervised translation of programming languages,” in Adv. Neural Inf. Process. Syst., vol. 33, 2020.
4. B. Rozière et al., “Leveraging automated unit tests for unsupervised code translation,” in Proc. ICLR, 2022.
5. W. Shang, J.-S. Yang, G. Ding, and S. Yang, “ArchMigrate-Swift: A compiler-in-the-loop retrieval-augmented multi-agent framework for Objective-C-to-Swift migration,” Trans. Comput. Sci. Intell. Syst. Res., vol. 13, pp. 275–285, 2026, doi: 10.62051/khg1am73.
6. F. Zhou, “Moment-constrained side-force allocation for wind-assisted merchant ships: Hydrodynamic performance of retractable anti-leeway fins and flap rudders,” Innovation and Technology Studies, vol. 3, no. 1, pp. 27–41, 2026.
7. R. Puri et al., “CodeNet: A large-scale AI for code dataset for learning a diversity of coding tasks,” in NeurIPS Datasets Benchmarks, 2021.
8. M. Zhu et al., “XLCoST: A benchmark dataset for cross-lingual code intelligence,” arXiv:2206.08474, 2022.
9. M. A. M. Khan et al., “xCodeEval: An execution-based large-scale multilingual multitask benchmark for code understanding, generation, translation and retrieval,” in Proc. ACL, pp. 6766–6805, 2024, doi: 10.18653/v1/2024.acl-long.367.
10. S. Ren et al., “CodeBLEU: A method for automatic evaluation of code synthesis,” arXiv:2009.10297, 2020.
11. Z. Feng et al., “CodeBERT: A pre-trained model for programming and natural languages,” in Findings EMNLP, pp. 1536–1547, 2020.
12. J. Wang, Y. Ge, J. Liu, and B. Jiang, “Early warning of liquidity stress in U.S. banks with seasonally aligned frailty hazards and delayed-feedback conformal alarms,” Journal of Trends in Finance and Economics, vol. 1, no. 1, pp. 85–100, 2024.
13. Y. Wang, W. Wang, S. Joty, and S. C. H. Hoi, “CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation,” in Proc. EMNLP, pp. 8696–8708, 2021, doi: 10.18653/v1/2021.emnlp-main.685.
14. W. U. Ahmad, S. Chakraborty, B. Ray, and K.-W. Chang, “Unified pre-training for program understanding and generation,” in Proc. NAACL-HLT, pp. 2655–2668, 2021, doi: 10.18653/v1/2021.naacl-main.211.
15. A. Madaan et al., “Self-Refine: Iterative refinement with self-feedback,” in Adv. Neural Inf. Process. Syst., vol. 36, 2023.
16. N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao, “Reflexion: Language agents with verbal reinforcement learning,” in Adv. Neural Inf. Process. Syst., vol. 36, 2023.
17. I. Bouzenia, P. Devanbu, and M. Pradel, “RepairAgent: An autonomous, LLM-based agent for program repair,” in Proc. IEEE/ACM ICSE, 2025, doi: 10.1109/ICSE55347.2025.00157.
18. Q. Wu et al., “AutoGen: Enabling next-gen LLM applications via multi-agent conversation,” in Proc. COLM, 2024.
19. S. Hong et al., “MetaGPT: Meta programming for a multi-agent collaborative framework,” in Proc. ICLR, 2024.
20. C. Qian et al., “ChatDev: Communicative agents for software development,” in Proc. ACL, pp. 15174–15186, 2024, doi: 10.18653/v1/2024.acl-long.810.
21. X. Yue and R. Zhu, “An explainable hybrid machine learning framework for cash-flow-conditioned multi-horizon liquidity risk early warning: An SME-oriented benchmark study,” World Journal of Management Science, vol. 2, no. 1, pp. 63–72, 2024.
22. T. Y. Chen, S. C. Cheung, and S. M. Yiu, “Metamorphic testing: A new approach for generating next test cases,” Tech. Rep. HKUST-CS98-01, 1998.
23. S. Segura, G. Fraser, A. B. Sánchez, and A. Ruiz-Cortés, “A survey on metamorphic testing,” IEEE Trans. Softw. Eng., vol. 42, no. 9, pp. 805–824, 2016, doi: 10.1109/TSE.2016.2532875.
24. J. Chen, X. Han, X. Zhang, and Y. Yang, “Exact concept-level explanations for early detection of financial misstatements,” Eurasia Journal of Science and Technology, vol. 5, no. 2, pp. 34–48, 2023.
25. Q. McNemar, “Note on the sampling error of the difference between correlated proportions or percentages,” Psychometrika, vol. 12, no. 2, pp. 153–157, 1947, doi: 10.1007/BF02295996.
26. B. Efron and R. J. Tibshirani, An Introduction to the Bootstrap. Chapman & Hall, 1993.
27. W. Zhao, T. Chen, B. Wang, and Z. Shen, “PIPE-RAG: An Execution-Guided Retrieval and Reuse Framework for Reliable Machine Learning Pipeline Code Generation,” WEP Transactions on Computer Science and Intelligent Systems Research, vol. 13, pp. 286–297, 2026.
28. H. Zhang, “A Verification-Guided Multi-Agent Framework for Reliable RTL Generation and Optimization,” WEP Transactions on Computer Science and Intelligent Systems Research, vol. 13, pp. 260–274, 2026.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Chloe Park, Kai Davis

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This article is licensed under the Creative Commons Attribution 4.0 International License. This license permits use, sharing, and adaptation of the article for non-commercial purposes, provided the original authors and source are properly credited.
Alternatively, you may choose other Creative Commons licenses based on your preferences:
-
CC Attribution-NonCommercial-NoDerivatives 4.0: This license allows others to download the works and share them with others as long as they credit the author, but they can’t change them in any way or use them commercially.
-
CC Attribution-NonCommercial 4.0: This license allows others to remix, tweak, and build upon the work non-commercially, as long as they credit the author, but they cannot use the material for commercial purposes.
-
CC Attribution-NonCommercial-ShareAlike 4.0: This allows others to remix, tweak, and build upon the work non-commercially, as long as they credit the author and license their new creations under identical terms.
These terms ensure that your article is freely accessible and usable, while respecting the rights of the original authors.
