Neural Inverse is Open Source →
DocsDiscovery

Discovery (Stage 1)

Discovery is the first stage of every modernisation session. It scans the source project and builds a complete picture of what needs to be migrated — languages, dependencies, compliance exposures, tech debt, and migration units.

Discovery runs automatically after session initialisation. It does not modify any files.

Discovery Phases

Discovery runs through 11 sequential phases:

PhaseDescription
walkingFile enumeration and extension classification
metadataBuild system and framework detection
fingerprintingCompliance pattern fingerprint extraction
grc-scanGRC violation scanning
graphModule dependency graph construction
call-graphIntra-project function call graph
api-surfaceAPI endpoint detection
schemaData schema and type extraction
tech-debtTech debt analysis across 33 categories
pairingCross-project unit matching for multi-project sessions
completeDiscovery finished

Language Detection

The IDE detects languages via file extensions, shebang lines, and content heuristics.

Supported legacy languages: COBOL, PL/I, RPG (AS/400), Natural (Adabas), FORTRAN, Ada, Perl, VB6, PowerBuilder, MUMPS, ABAP, Delphi

Embedded and firmware: C, C++, ARM Assembly, AVR Assembly, IEC 61131-3 (Ladder Logic, Structured Text, IL, FBD), AUTOSAR ARXML, SVD register maps, Linker scripts, CAN DBC

Telecom: TTCN-3, ASN.1

Modern targets: Java, TypeScript, JavaScript, Python, C#, Go, Rust, Kotlin, Scala, and more

Tech Debt Analysis

Discovery detects 33 categories of tech debt across generic, firmware, automotive, telecom, and energy domains.

Generic

CategoryDescription
god-unitHigh cyclomatic complexity combined with high line count
dead-codeFunctions or paragraphs never called within the project
code-cloneNear-duplicate code blocks across files
magic-numberHardcoded numeric literals with no symbolic name
hardcoded-credentialPassword, key, or token value in source
hardcoded-urlProduction URLs embedded in source
deep-nestingControl flow nested beyond threshold
long-parameter-listFunctions with excessive parameter count
missing-error-handlingNo error handling in I/O-intensive units
commented-out-codeLarge blocks of commented-out code
todo-fixmeTODO, FIXME, or HACK markers
implicit-type-coercionType precision risk from implicit conversions
unbounded-loopLoop with no visible termination condition
copy-paste-cobolIdentical COBOL paragraph bodies
goto-usageGOTO or GOBACK in non-entry context
global-stateMutable global or package-level state
no-unit-testsNo detected test coverage

Firmware / Embedded (IEC 61508 / MISRA-C)

CategoryDescription
unsafe-pointer-arithmeticRaw MMIO pointer cast (MISRA Rule 11.4)
isr-reentrance-riskISR accesses shared data without critical section
misra-c-critical-violationMISRA-C mandatory rule violation
hardware-dependencyLogic tightly coupled to MCU register address
watchdog-gapMissing watchdog refresh (IEC 61508 requirement)

Automotive (ISO 26262 / AUTOSAR)

CategoryDescription
autosar-rte-dependencyAUTOSAR Classic RTE with no Adaptive mapping
e2e-protection-gapE2E CRC or counter missing
asil-decomposition-breakASIL-D decomposition without formal rationale
can-signal-scaling-mismatchDBC factor/offset not preserved in translation

Telecom (3GPP / GSMA)

CategoryDescription
security-key-material3GPP AS/NAS keys inline in source
protocol-state-machine-breakNon-serialisable RRC/NAS state machine
ttcn3-verdict-suppressionINCONC verdict without linked test reference

Energy / Critical Infrastructure

CategoryDescription
goose-protection-relayIEC 61850 GOOSE bridged via TCP/MQTT (prohibited)
dnp3-secure-auth-gapDNP3 SA_CHALLENGE response missing
sis-sil-downgradeSIS/ESD change that would reduce SIL rating

Compliance Framework Detection

Discovery detects regulated patterns associated with these frameworks:

FrameworkDomain
iec-61508Functional Safety (SIL 1–4)
iec-62443Industrial Cybersecurity (SL 1–4)
iec-61131PLC Programming Standards
misra-cMISRA C:2012 / C:2023 language subset
autosarAUTOSAR Classic and Adaptive Platform
iso-26262Automotive Functional Safety (ASIL A–D)
iec-61850Substation Automation (GOOSE, SV, MMS)
iec-61511Process Industry Functional Safety
iec-62061Safety of Machinery Control Systems
iso-13849Performance Level (PLd/PLe)

Discovery Statistics

After completion, Discovery reports:

totalFilesWalked          All files enumerated
totalFilesScanned         Files with content analysis
totalUnitsExtracted       Migration units identified
languageDistribution      File counts per language
riskDistribution          Units per risk level (critical/high/medium/low)
effortDistribution        Units per effort band (trivial/small/medium/large/xlarge)
avgFileLines              Average lines per source file
avgUnitComplexity         Average McCabe cyclomatic complexity
largestFileLines          Largest file line count
mostComplexUnitCC         Highest cyclomatic complexity
criticalUnitCount         Units flagged as critical risk
deadCodeUnitCount         Units with no callers
techDebtItemCount         Total tech debt items across all categories
regulatedDataHitCount     Regulated data pattern matches
externalDependencyCount   Unique external module dependencies

Migration Units

Each file or logical module in the source project becomes a migration unit. Units are the atomic unit of translation — one unit is translated, validated, and approved at a time.

Each unit carries:

  • Detected language
  • Risk level: critical | high | medium | low
  • Effort band: trivial | small | medium | large | xlarge
  • Dependency list (other units this unit imports)
  • Compliance fingerprint
  • Tech debt items
  • Regulated data hits

Was this page helpful?

Last edited