{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,29]],"date-time":"2026-11-29T20:56:45Z","timestamp":1795985805636,"version":"4.11.3"},"reference-count":39,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2025,7,25]],"date-time":"2025-07-25T00:00:00Z","timestamp":1753401600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Comput. Sci."],"abstract":"<jats:p>Large language models (LLMs) have been extensively researched for programming-related tasks, including program summarisation, over recent years. However, the task of abstracting formal specifications from code using LLMs has been less explored. Precise program analysis approaches based on model-driven reverse engineering (MDRE) have also been researched, and in this paper we compare the results of the LLM and MDRE approaches on tasks of abstracting Python and Java programs to the OCL formal language. We also define a combined approach which achieves improved results.<\/jats:p>","DOI":"10.3389\/fcomp.2025.1516410","type":"journal-article","created":{"date-parts":[[2025,7,25]],"date-time":"2025-07-25T06:17:39Z","timestamp":1753424259000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":9,"title":["A comparison of large language models and model-driven reverse engineering for reverse engineering"],"prefix":"10.3389","volume":"7","author":[{"given":"Hanan","family":"Siala","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Kevin","family":"Lano","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2025,7,25]]},"reference":[{"key":"B1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2108.11590","article-title":"AVATAR: a parallel corpus for Java-Python program translation","author":"Ahmad","year":"2023","journal-title":"arXiv"},{"key":"B2","doi-asserted-by":"crossref","DOI":"10.1109\/SANER64311.2025.00090","article-title":"\u201cMDRE-LLM: a tool for analysing and applying LLMs in software reverse engineering,\u201d","volume-title":"SANER \u201825","author":"Boronat","year":"2025"},{"key":"B3","doi-asserted-by":"publisher","first-page":"253","DOI":"10.1049\/sej.1993.0031","article-title":"A compendium of formal techniques for software maintenance","volume":"8","author":"Bowen","year":"","journal-title":"IEE\/BCS Softw. Eng. J"},{"key":"B4","doi-asserted-by":"publisher","first-page":"679","DOI":"10.1016\/0950-5849(93)90083-F","article-title":"Formal specifications in software maintenance: from code to Z++ and back again","volume":"35","author":"Bowen","year":"","journal-title":"Inf. Softw. Technol"},{"key":"B5","doi-asserted-by":"publisher","first-page":"162","DOI":"10.1016\/j.scico.2013.10.003","article-title":"On OCL-based imperative languages","volume":"92","author":"Buttner","year":"2014","journal-title":"Sci. Comput. Program"},{"key":"B6","first-page":"2552","article-title":"\u201cTree-to-tree neural networks for program translation,\u201d","volume-title":"Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS'18","author":"Chen","year":"2018"},{"key":"B7","article-title":"\u201cBridging KDM and ASTM for model-driven software modernization,\u201d","author":"Deltombe","year":"2012","journal-title":"SEKE"},{"key":"B8","article-title":"\u201cQLoRA: efficient fine-tuning of quantized LLMs,\u201d","volume-title":"Advances in Neural Information Processing Systems, Vol. 36","author":"Dettmers","year":"2024"},{"key":"B9","doi-asserted-by":"crossref","DOI":"10.1145\/3643795.3648388","article-title":"\u201cTranslation of low-resource COBOL to logically-correct and readable Java leveraging high-resource Java refinement,\u201d","volume-title":"LLM4Code","author":"Gandhi","year":"2024"},{"key":"B10","article-title":"\u201cGraphCodeBERT: pre-training code representations with dataflow,\u201d","volume-title":"ICLR 2021","author":"Guo","year":"2021"},{"key":"B11","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2308.10620","article-title":"LLMs for software engineering: a systematic literature review","author":"Hou","year":"2023","journal-title":"arXiv"},{"key":"B12","article-title":"\u201cLoRA: low-rank adaptation of large language models,\u201d","volume-title":"ICLR 2022","author":"Hu","year":"2022"},{"key":"B13","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2306.06755","article-title":"Attention, compilation, and solver-based symbolic analysis are all you need","author":"Jana","year":"2023","journal-title":"arXiv"},{"key":"B14","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2310.06825","article-title":"Mistral 7b","author":"Jiang","year":"2023","journal-title":"arXiv"},{"key":"B15","first-page":"1","article-title":"\u201cAgile software modernization to the service cloud,\u201d","volume-title":"ICIW 2013","author":"Krasteva","year":"2013"},{"key":"B16","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2006.03511","article-title":"Unsupervised translation of programming languages","author":"Lachaux","year":"2020","journal-title":"arXiv"},{"key":"B17","doi-asserted-by":"publisher","first-page":"559","DOI":"10.1007\/s11334-024-00568-z","article-title":"Agile model-driven re-engineering","volume":"20","author":"Lano","year":"2024","journal-title":"Innov. Syst. Softw. Eng"},{"key":"B18","doi-asserted-by":"crossref","DOI":"10.1145\/3550356.3561565","article-title":"\u201cOCL libraries for software specification and representation,\u201d","volume-title":"OCL 2022, MODELS 2022 Companion Proceedings","author":"Lano","year":"2022"},{"key":"B19","doi-asserted-by":"publisher","first-page":"265","DOI":"10.1023\/A:1008708927260","article-title":"Mapping procedural patterns to object-oriented design patterns","volume":"6","author":"Lano","year":"1999","journal-title":"Autom. Softw. Eng"},{"key":"B20","doi-asserted-by":"publisher","first-page":"20","DOI":"10.1007\/s10515-024-00419-y","article-title":"Using MDE to automate software language translation","volume":"31","author":"Lano","year":"","journal-title":"Autom. Softw. Eng"},{"key":"B21","doi-asserted-by":"crossref","DOI":"10.1145\/3652620.3687824","article-title":"\u201cUsing OCL for verified re-engineering,\u201d","volume-title":"MoDeVVa 2024, MODELS 2024","author":"Lano","year":""},{"key":"B22","doi-asserted-by":"publisher","first-page":"112002","DOI":"10.1016\/j.jss.2024.112002","article-title":"Few-shot code translation via task-adapted prompt learning","volume":"212","author":"Li","year":"2024","journal-title":"J. Syst. Softw"},{"key":"B23","doi-asserted-by":"crossref","DOI":"10.1109\/CMPSAC.1997.625024","article-title":"\u201cFormal methods for the re-engineering of computing systems,\u201d","volume-title":"Compsac \u201897","author":"Liu","year":"1997"},{"key":"B24","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv:2302.10812","article-title":"On ML-based program translation: perils and promises","author":"Malyaya","year":"2023","journal-title":"arXiv"},{"key":"B25","first-page":"583","article-title":"\u201cCOBOL to Java and newspapers still get delivered,\u201d","volume-title":"Proceedings IEEE International Conference on Software Maintenance and Evolution","author":"Marco","year":"2018"},{"key":"B26","first-page":"585","article-title":"\u201cDivide-and-conquer approach for multi-phase statistical migration for source code,\u201d","volume-title":"Proceedings of the 30th IEEE\/ACM International Conference on Automated Software Engineering, ASE '15","author":"Nguyen","year":"2015"},{"key":"B27","year":"2014","journal-title":"Object Constraint Language (OCL) 2.4 Specification"},{"key":"B28","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2308.02828","article-title":"LLM is like a box of chocolates: the non-determinism of ChatGPT in code generation","author":"Ouyang","year":"2023","journal-title":"arXiv"},{"key":"B29","doi-asserted-by":"crossref","DOI":"10.1007\/978-3-642-13688-7_12","article-title":"\u201cImplementing business process recovery patterns through QVT transformations,\u201d","volume-title":"ICMT 2010","author":"Perez-Castillo","year":"2010"},{"key":"B30","doi-asserted-by":"publisher","first-page":"519","DOI":"10.1016\/j.csi.2011.02.007","article-title":"Knowledge discovery metamodel ISO\/IEC 19506: a standard to modernize legacy systems","volume":"33","author":"Perez-Castillo","year":"2011","journal-title":"Comput. Standar Interfaces"},{"key":"B31","doi-asserted-by":"crossref","DOI":"10.1145\/3639478.3639797","article-title":"\u201cEnhancing model-driven reverse-engineering using machine learning,\u201d","volume-title":"Doctorial Symposium, ICSE 2024","author":"Siala","year":"2024"},{"key":"B32","article-title":"\u201cUsing LLMs to extract OCL specifications from Java and Python programs: an empirical study,\u201d","volume-title":"Proceedings of the STAF 2025 Workshops: OCL 2025","author":"Siala","year":"2025"},{"key":"B33","doi-asserted-by":"publisher","first-page":"62558","DOI":"10.1109\/ACCESS.2024.3394732","article-title":"Model-driven approaches for reverse engineering-a systematic literature review","volume":"12","author":"Siala","year":"2024","journal-title":"IEEE Access"},{"key":"B34","first-page":"1","article-title":"\u201cMigrating from COBOL to Java: a report from the field,\u201d","volume-title":"IEEE Proc. of 26th ICSM","author":"Sneed","year":"2011"},{"key":"B35","article-title":"\u201cInverse transformation of software from code to specification,\u201d","volume-title":"IEEE Conf. Soft. Maintenance","author":"Sneed","year":"1987"},{"key":"B36","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2207.03578","article-title":"Code translations with compiler representations","author":"Szafraniec","year":"2023","journal-title":"arXiv"},{"key":"B37","doi-asserted-by":"publisher","first-page":"471","DOI":"10.3390\/sym14030471","article-title":"A survey of automated code summarization","volume":"14","author":"Zhang","year":"2022","journal-title":"Symmetry"},{"key":"B38","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2303.18223","article-title":"A survey of large language models","author":"Zhao","year":"2023","journal-title":"arXiv"},{"key":"B39","doi-asserted-by":"publisher","first-page":"11783","DOI":"10.1609\/aaai.v36i10.21434","article-title":"Multilingual code snippets training for program translation","volume":"36","author":"Zhu","year":"2022","journal-title":"Proc. AAAI Conf. Artif. Intell"}],"container-title":["Frontiers in Computer Science"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fcomp.2025.1516410\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,7,25]],"date-time":"2025-07-25T06:17:44Z","timestamp":1753424264000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fcomp.2025.1516410\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,7,25]]},"references-count":39,"alternative-id":["10.3389\/fcomp.2025.1516410"],"URL":"https:\/\/doi.org\/10.3389\/fcomp.2025.1516410","relation":{},"ISSN":["2624-9898"],"issn-type":[{"value":"2624-9898","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,7,25]]},"article-number":"1516410"}}