TC-Verifier: Trans-Compiler-Based Code Translator Verifier with Model-Checking
Code-to-code translation, a critical domain in software engineering, increasingly utilizes trans-compilers to translate between high-level languages. Traditionally, the fidelity of such translations has been evaluated using the BLEU score, which predominantly measures token similarity between the generated output and the ground truth. However, this metric falls short of assessing the methodologies underlying the translation processes and only evaluates the translations that are tested. To bridge this gap, this paper introduces an innovative architecture, “TC-Verifier”, to formally employ the Uppaal Model-checker to verify trans-compiler-based code translators. We applied the proposed architecture to a trans-compiler translating between Swift and Java, providing insights into the verified and unverified aspects of the translation process. Our findings illuminate the strengths and limitations of using Model-checking for formal verification in code translation. Notably, the examined trans-compiler reached a verification success rate of 50.74% for the grammar rules and productions modeled. This study underscores the gaps in trans-compiler-based translations and suggests that these gaps could potentially be addressed by integrating Large Language Models (LLMs) in future work.
Authors
- Nahla Elaraby (ORCID: https://orcid.org/0000-0002-6867-8673)
- Walaa Medhat (ORCID: https://orcid.org/0000-0001-9482-8412)
- Amira T. Mahmoud (ORCID: https://orcid.org/0000-0002-1702-6544)
- Hala H. Zayed (ORCID: https://orcid.org/0000-0001-6779-7577)
- Ahmed H. Yousef (ORCID: https://orcid.org/0000-0002-7799-9233)
- Sahar Selim (ORCID: https://orcid.org/0000-0002-9886-1364)
Institutions
- Ain Shams University (EG)
- University of Vienna (AT)
- Cairo University (EG)
- TU Wien (AT)
- Benha University (EG)
- Canadian International College (EG)
- Egypt University of Informatics
- Nile University (EG)
Publication Details
- Journal
- Applied System Innovation
- Published
- 2025-04-29
- DOI
- https://doi.org/10.3390/asi8030060
- Citations
- 1
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.31
Funders
- Technische Universität Wien
- OeAD-GmbH