Skip to content
Preprint

Towards Automated Domain Model Extraction from Source Code using Heuristics and Open-Source LLMs

Aug 2026 · 1 citation · 54 references
Computer Science

TL;DR

This paper proposes an automated approach to extract domain models from source code using lightweight, locally deployable LLMs and achieves high F1-scores on a dataset of ten projects, each comprising a curated domain model and its corresponding implementation, while remaining fully executable on locally deployable LLMs.

Abstract

Large language models (LLMs) have recently shown strong capabilities for code understanding, making them promising for reverse engineering domain models from source code. However, state-ofthe- art proprietary LLMs cannot be used in many industrial contexts due to privacy and confidentiality constraints, while compact open-source LLMs that can run locally are limited by their context window and cannot process large code bases directly. In this paper, we propose an automated approach to extract domain models from source code using lightweight, locally deployable LLMs. Our method combines structural and semantic heuristics with iterative LLM-based reasoning to overcome context limitations. By progressively analyzing ranked subsets of code elements, the approach identifies domain concepts and refines domain boundaries without requiring full-system context. Our approach achieves high F1-scores on a dataset of ten projects, each comprising a curated domain model and its corresponding implementation, while remaining fully executable on locally deployable LLMs. This makes it particularly suitable for reverse engineering tasks in privacy-sensitive industrial environments.

View source

Similar papers

Conference Jul 2026

Operationalizing Large Language Models for Automated Software Requirement Interpretation and Change Impact Analysis

In fast-evolving software systems, effective 'natural language requirements parsing' and downstream change effect analysis capability across a multitude of codes represents low-hanging-fruit in this regard. We present a structured framework to deploy Large Language Models (LLMs) for automating two essential software en...

Nithya Krishnan, Kumaran Ramanujam, Suresh Babu Narra et al. · 0 citations
#small language model Book Open access Oct 2026

The impact of Software Model Slicing on Software Model Completion with Large Language Models

The results show that appropriate model slicing significantly improves completion correctness while simultaneously reducing token usage across several structural and semantic evaluation metrics, and establish model slicing as a key factor in LLM-based model completion and provide guidance for effective context selectio...

Alisa Welter, Benedict Bliem, Omer Iqbal et al. · 0 citations
Jul 2026

Evaluating Incompatible Third-party Library API Usage in LLM-based Code Completion

An automated framework that builds a versioned TPL API Knowledge Base and a large-scale benchmark that proposes two lightweight solutions, Real-time Detection and Lightweight Repair, to mitigate ITAUs and provide a foundation for more compatibility-aware code generation in evolving software ecosystems.

Li Lin, Yaorui Fei, Yunfeng Shen et al. · 0 citations
Review Aug 2026

Code Refinement with Repository Context: How Far are We?

A high-quality benchmark of 1,000 code refinement instances from 328 Python, Java, and JavaScript repositories that focused on one of the most challenging code refinement scenarios that strictly requires repository-level knowledge reasoning, and a straightforward method, RepoRefiner, which retrieves repository-level co...

Ke Wang, Peng Lan, Jia-Kun Liu et al. · 1 citation
Preprint Aug 2026

Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation

DyRetriever is an efficient context retrieval method via partial dependency graphs that uses an LLM to first select a set of entry-point functions and then perform multi-hop reasoning along the code dependency graph, eliminating manually designed rules and enabling flexibility across scenarios.

Zhongxin Liu, Zhonghao Jiang, Zhi-Fan Ye et al. · 1 citation
Open access Aug 2026

Optimizing Context and Cost in LLM‐Based Unit Test Generation: A Study on External Dependency Retrieval Strategies

A systematic empirical study of multiple strategies for context enrichment and optimization in LLM‐based unit test generation, conducted on seven diverse projects (three open‐source and four proprietary industrial systems), encompassing 261 distinct methods establish this optimized context strategy as a cost‐effective...

Javier Ferrer, Francisco Chicano · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.