Using LLMs to Extract OCL Specifications from Java and Python Programs:An Empirical Study
This paper presents a comprehensive study of the application of several open-source Large Language Models (LLMs) for abstracting Object Constraint Language (OCL) specifications from source code. We aim to provide researchers and developers with insights into the capabilities and limitations of using different LLMs to abstract OCL specifications from code.<br/>We evaluate a collection of open-source LLMs of comparable size (StarCoder2, LLaMA, CodeLlama, Mistral, and DeepSeek) by prompting them to generate OCL specifications for both Java and Python programs. The results show that both Mistral and DeepSeek outperform other LLMs in abstracting OCL specifications from both languages.
Authors
- Kevin; id_orcid 0000-0002-9706-1410 Lano
- Hanan; id_orcid 0009-0003-4693-8707 Siala
Publication Details
- Journal
- Research Portal (King's College London)
- Published
- 2025-06-10
- Primary Topic
- Model-Driven Software Engineering Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00