Using LLMs to Extract OCL Specifications from Java and Python Programs:An Empirical Study
Year: 2025
Type: conference-paper
Abstract: 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. 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.
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7124669700
FWCI:
Cites:
Cited by:
Related to:
