Documentation Index
Fetch the complete documentation index at: https://mintlify.com/acdeveloper-sci/fortriage/llms.txt
Use this file to discover all available pages before exploring further.
The Drill-down tab provides a detailed view of a single Fortran unit. Select any unit from the searchable dropdown to inspect its full metric profile across four sections: Complexity, Coupling, Density, and Reachability. All metrics are sourced from report_consolidated.csv, the richest per-unit output produced by the Forti4D analysis. If no analysis has been run yet, the tab shows an informational message directing you to the Overview tab.
Selecting a Unit
The unit selector dropdown is populated from every row in report_consolidated.csv for the current run, sorted alphabetically by unit name. Each option is formatted as:
For example: COMPUTE_FLUX (solver_core.f90).
When you click a row in the Overview table, it pre-selects the corresponding unit in the Drill-down tab. The (file, unit) pair is passed as a modal handoff through session state — the Drill-down dropdown opens directly on that unit so you can move from the ranked table to the detailed profile in one click.
When no modal handoff is active, the dropdown defaults to the alphabetically first unit in the corpus.
The header section identifies the selected unit at a glance:
- Unit name — rendered as a subheading
- File and type — shown as a caption in the format
file.f90 · TYPE where TYPE is SUBROUTINE, FUNCTION, PROGRAM, MODULE, BLOCK DATA, etc.
- Tier badge — a colored badge cross-referenced from
report_prioritization.csv using the (File, Unit) composite key
| Tier | Badge Color |
|---|
| CRITICAL | Red #D64545 |
| HIGH | Orange #E8874A |
| MEDIUM | Yellow #E8C547 |
| LOW | Blue #5B9BD5 |
| DEAD_CODE | Gray #9AA5B1 |
- Score — the numeric risk score from
report_prioritization.csv for this unit
If a unit exists in the consolidated report but has no matching row in the prioritization report, both the tier badge and the score degrade gracefully to — rather than raising an error.
Complexity
Each metric is rendered as a proportional bar — the bar fill represents the unit’s value relative to the maximum value for that column across the entire corpus, giving immediate visual context without requiring you to know the raw scale.
| Metric | Column | Description |
|---|
| Cyclomatic Complexity | CC | Number of independent execution paths through the unit. Higher values indicate more branching logic and harder-to-test code. |
| Lines of code | LOC | Total line count including blanks and comments. |
| Net lines of code | SLOC_net | Source lines with blank lines and comment lines excluded — a cleaner measure of substantive code volume. |
Coupling
| Metric | Column | Description |
|---|
| Fan-In | Fan_In | Number of other units in the corpus that call this unit. High fan-in means many units depend on this one — changes here ripple widely. |
| Fan-Out | Fan_Out | Number of units this unit calls. High fan-out indicates a coordinator or orchestrator that is coupled to many subordinate units. |
| Common coupling vars | N_Common_Blocks | Count of COMMON block variables shared with other units. COMMON blocks are a legacy coupling mechanism that makes data dependencies implicit and fragile. |
Density
| Metric | Column | Description |
|---|
| Comment ratio | Pct_Comment | Percentage of total lines that are comments. Very low ratios may flag undocumented legacy routines; shown with a % suffix. |
| Complexity density (CC/SLOC) | CC_SLOC | Cyclomatic Complexity divided by net source lines — a normalized measure of how tightly packed the branching logic is within the unit’s actual code. |
Reachability
The Reachability section answers a single critical question: is this unit actually on an execution path?
Status badge — one of three values, color-coded:
| Status | Color | Meaning |
|---|
REACHABLE | Blue #5B9BD5 | At least one entry point can reach this unit through the call graph |
UNREACHABLE | Red #D64545 | No execution path from any entry point reaches this unit |
ENTRY_POINT | Orange #E8874A | This unit itself is a top-level entry point (e.g. a PROGRAM or explicitly designated entry) |
Via Entry Points — when the unit is REACHABLE, a chip list shows the specific entry-point unit names through which it can be reached. Entry points are extracted from the Via_Entry_Points column (semicolon-delimited) and rendered as individual chips.
Pct_Legacy — a proportional bar showing what percentage of this unit’s constructs are legacy-style (GOTO statements, COMMON blocks, EQUIVALENCE statements, and similar pre-modern Fortran idioms). Shown with a % suffix, normalized against the corpus maximum.
Units with UNREACHABLE status and a high Score are ideal candidates for elimination. They carry risk in the prioritization ranking but are not on any live execution path — removing them entirely is safer and faster than refactoring, and it reduces the corpus scope for every subsequent migration step.