Hidden Logic and Isolated Knowledge
The D-Flow FM calculation kernel is largely written in Fortran. As the senior developers and domain experts who wrote the original code retired or left the organization, a gap emerged in historical context and direct insight into undocumented dependencies (hidden logic).
To gain a complete understanding of the existing software architecture, Deltares now has insight into:
- Exact call trees, dependencies, and the use of global variables (global state).
- The consistency in content between the written Fortran code and the official technical documentation (TechRef PDFs).
- A drastic reduction in the time developers need to investigate complex code paths.
Re:App Reverse Architecting
In collaboration with SUE, a “Reverse Architecting ” project was carried out to fully analyze and map the D-Flow FM kernel using Re:App, SUE’s AI-driven application modernization solution.

The following steps were carried out during this project:
-
Code & Context Ingestion The entire Fortran codebase—comprising 6 million lines of code, CMake build configurations, utility libraries, and technical documentation—was ingested into Re:App.
-
Knowledge Graph & Hybrid Search SUE configured a hybrid search architecture within Re:App. Source code elements, such as subroutines and variables, were directly linked to relevant documentation excerpts and hydrological formulas.
-
Specialized Subagents To maintain strict context boundaries and ensure the accuracy of responses, specialized subagents were deployed for specific tasks, such as automatically generating visual Mermaid call-tree diagrams.
-
Knowledge Verification by Domain Experts Deltares developers tested and validated the analyzed architecture for accuracy using the Re:App chat interface.
"With Re:App Reverse Architecting , SUE has given us exactly the insight we needed into our decades-old software. It unlocks crucial domain knowledge and transforms millions of lines of complex code into a clear, navigable architecture."
A codebase built entirely using reverse engineering
The D-Flow FM calculation kernel has been successfully and fully reverse-engineered. The results were evaluated based on strict success criteria. In doing so, Re:App proved to be significantly better at answering overarching architectural questions than standard developer tools such as GitHub Copilot:
- Comprehensive Analysis of the Codebase (vs. Copilot’s Local Context): While traditional AI assistants run into context limitations when asked about entire applications, Re:App can effortlessly analyze top-level entry points and complex inter-module dependencies across the entire repository.
- Direct Link Between Code and Documentation: Re:App links source code directly to internal coding guidelines and technical reference manuals (PDFs). Questions about domain formulas are answered immediately with precise source references.
- Hallucination-Free Analysis: Thanks to its Knowledge Graph integration, Re:App references only subroutines and files that actually exist, thereby eliminating AI hallucinations.
- Spot-On Architectural Insights: In addition to providing concise, easy-to-understand overviews of long routines, the system proactively and accurately identifies hidden architectural inconsistencies between modules.
- Significant time savings: Analyzing complex code paths, which used to take hours or days using manual search methods such as
grep, now provide an accurate answer in just a few seconds.
Let's Talk
Let's Talk
* required