Skip to main content

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:
unit_name (file.f90)
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
TierBadge Color
CRITICALRed #D64545
HIGHOrange #E8874A
MEDIUMYellow #E8C547
LOWBlue #5B9BD5
DEAD_CODEGray #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.
MetricColumnDescription
Cyclomatic ComplexityCCNumber of independent execution paths through the unit. Higher values indicate more branching logic and harder-to-test code.
Lines of codeLOCTotal line count including blanks and comments.
Net lines of codeSLOC_netSource lines with blank lines and comment lines excluded — a cleaner measure of substantive code volume.

Coupling

MetricColumnDescription
Fan-InFan_InNumber 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-OutFan_OutNumber of units this unit calls. High fan-out indicates a coordinator or orchestrator that is coupled to many subordinate units.
Common coupling varsN_Common_BlocksCount of COMMON block variables shared with other units. COMMON blocks are a legacy coupling mechanism that makes data dependencies implicit and fragile.

Density

MetricColumnDescription
Comment ratioPct_CommentPercentage of total lines that are comments. Very low ratios may flag undocumented legacy routines; shown with a % suffix.
Complexity density (CC/SLOC)CC_SLOCCyclomatic 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:
StatusColorMeaning
REACHABLEBlue #5B9BD5At least one entry point can reach this unit through the call graph
UNREACHABLERed #D64545No execution path from any entry point reaches this unit
ENTRY_POINTOrange #E8874AThis 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.

Build docs developers (and LLMs) love