TC-Verifier: Trans-Compiler-Based Code Translator Verifier with Model-Checking
Open Access
- 29 April 2025
- journal article
- research article
- Published by MDPI AG in Applied System Innovation
- Vol. 8 (3) , 60
Abstract
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.Keywords
Funding Information
- TU Wien
This publication has 21 references indexed in Scilit:
- Small Step Incremental Verification of Compilers2024
- A New AI Literacy For The Algorithmic Age: Prompt Engineering Or Eductional Promptization?2024
- GPT understands, tooAI Open, 2024
- Mutation analysis for evaluating code translationEmpirical Software Engineering, 2023
- Does BLEU Score Work for Code Migration?2019
- Modular, Correct Compilation with Automatic Soundness Proofs2018
- Modelling the Hybrid ERTMS/ETCS Level 3 Case Study in SpinLecture Notes in Computer Science, 2018
- The role of model checking in software engineeringFrontiers of Computer Science, 2018
- The HACMS program: using formal methods to eliminate exploitable bugsPhilosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 2017
- Developing UPPAAL over 15 yearsSoftware: Practice and Experience, 2011