← Latest papers
💻 computer science

Applying LLMs for Automated Extraction of Decision Logic from Source Code into DMN Models

This paper proposes and evaluates a four-stage LLM-based approach for automatically extracting decision logic from Java source code into DMN models, demonstrating technical feasibility while highlighting that semantic extraction of decision rules remains challenging and best serves as an intermediate representation for human validation rather than a final business logic artifact.

Original authors: Annemae van de Hoef, Harald Vranken, Sam Leewis, Koen Smit

Published 2026-11-13
📖 5 min read🧠 Deep dive

Original authors: Annemae van de Hoef, Harald Vranken, Sam Leewis, Koen Smit

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Software systems are the invisible engines that power modern life, from the tax calculations that fund public services to the insurance algorithms that determine who receives benefits. Over decades, these systems accumulate layers of changes, much like an old building that has been renovated countless times without a single updated blueprint. The original builders often leave, and the documentation fades, leaving behind a complex structure where the rules for making critical business decisions are buried deep within lines of code. This creates a dangerous situation: maintaining these systems becomes incredibly expensive, and trying to update them risks breaking the very logic that keeps them running. For organizations, the challenge is not just to keep the lights on, but to understand the hidden rules that govern their operations so they can be safely modernized.

To solve this, researchers have long looked for ways to translate the messy, technical language of computer code into clear, visual diagrams that humans can read. One such standard is called a Decision Model and Notation, which acts like a flowchart for business rules, showing exactly what information is needed to make a choice and what the outcome should be. However, creating these diagrams by hand is slow and difficult, especially when the rules are scattered across thousands of lines of code. Recently, a new type of artificial intelligence known as a large language model has emerged. These systems are trained on vast amounts of text and code, allowing them to understand context and patterns in ways that older software could not. The question researchers asked was simple yet profound: could these intelligent systems read a piece of software and automatically draw the decision map for us?

A team of researchers from universities in the Netherlands set out to test this possibility. They built a specialized tool designed to take a single file of Java code—a common programming language—and run it through a four-step process powered by artificial intelligence. The goal was to see if the machine could first find the specific parts of the code where decisions are made, then figure out what information those decisions depend on, and finally translate all of that into a standard decision diagram. They tested their tool on ten different examples, ranging from small snippets of code to larger files containing nearly three thousand lines of programming. Some of these examples contained clear business rules, while others were included specifically to see if the tool would mistakenly find rules where none existed.

The results showed that the approach is technically possible, but the journey is not a straight line. The first step, where the system had to identify which parts of the code represented a decision, worked quite well. By breaking the task down into smaller, simpler questions for the artificial intelligence, the researchers found that the system could correctly spot the relevant functions in most cases. The final step, which involved taking the structured information the system had gathered and formatting it into the final diagram file, also worked reliably. Once the system had the pieces, it could assemble them correctly.

However, the middle steps proved to be much more difficult. When the system tried to figure out exactly what information was needed for a decision or to write out the specific rules for how a decision should be made, it struggled. The artificial intelligence often missed subtle details or interpreted the code in ways that were technically different from the original intent, even if the general meaning was similar. For instance, in one complex example with nearly three thousand lines of code, the system successfully identified the main decisions and the inputs they required. It produced a diagram that looked correct and contained the right logic, but it included extra details or used slightly different wording than the human-made reference. The researchers noted that while the machine's output was not a perfect copy, it captured the essence of the logic well enough to be useful as a starting point for human experts.

The study also highlighted a significant practical hurdle: time. The artificial intelligence models took anywhere from three to thirty-four minutes to process a single file, depending on the model used and the complexity of the code. This delay means that while the technology works, it is not yet fast enough to be used for instant, interactive analysis of massive software systems. The researchers concluded that these tools should not be viewed as a replacement for human experts who can validate and refine the results. Instead, the best use for this technology is to act as a powerful assistant. It can do the heavy lifting of scanning through code and producing a draft of the decision logic, which a human can then review, correct, and finalize.

Ultimately, the research demonstrates that we are on the verge of being able to automate the initial stages of understanding complex software. The technology can successfully extract the hidden rules of a system and present them in a clear, standardized format. However, the path from raw code to a fully validated business model still requires human judgment. The artificial intelligence provides a map of the territory, but it is up to the experts to ensure the map is accurate and to decide how to navigate the changes ahead. This approach offers a promising way to tackle the growing problem of legacy systems, turning opaque code into transparent logic that can be maintained and improved for years to come.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →