{"type":"ScholarlyArticle","title":"Can We Translate Code Better with LLMs and Call Graph Analysis?","authors":[{"name":"Yang Luo","slug":"yang-luo","given":"Yang","family":"Luo","affiliation":""}],"abstract":"This paper proposes an innovative code translation method aimed at addressing the accuracy issues encountered by large language models (LLMs) in translating code of complex large-scale software projects. The method utilizes the Language Server Protocol to obtain the call graph of the entire codebase, and optimizes the input prompt of the LLM accordingly, significantly improving the correctness of translation at the compilation stage. Moreover, this method introduces the bridged debuggers technique based on the Debug Adapter Protocol and dynamic test case generation, effectively fixing runtime errors. Experiments on multiple mainstream datasets demonstrate that, compared to existing code translation methods and LLMs, this method achieves a significant improvement in translation accuracy.","doi":"10.24963/ijcai.2025/848","url":"https://ijcai.org/proceedings/2025/848","pdf":"https://ijcai.org/proceedings/2025/0848.pdf","markdown":"https://ijcai.org/proceedings/2025/848.md","bibtex":"https://ijcai.org/proceedings/2025/bibtex/848","volume":{"slug":"2025","title":"Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2025","url":"https://ijcai.org/proceedings/2025/","year":2025,"location":"Montreal, Canada","dates":"16-22 August 2025","editors":"James Kwok","isbn":"978-1-956792-06-5","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2025"},"section":"Multidisciplinary Topics and Applications","track":"Main Track","number":848,"pages":{"first":7625,"last":7633},"keywords":["Natural Language Processing: NLP: Applications","Data Mining: DM: Mining codebase and software repositories","Natural Language Processing: NLP: Language models","Multidisciplinary Topics and Applications: MTA: Software engineering"],"videos":[],"references":[],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}