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:
| Phase | Description |
|---|---|
walking | File enumeration and extension classification |
metadata | Build system and framework detection |
fingerprinting | Compliance pattern fingerprint extraction |
grc-scan | GRC violation scanning |
graph | Module dependency graph construction |
call-graph | Intra-project function call graph |
api-surface | API endpoint detection |
schema | Data schema and type extraction |
tech-debt | Tech debt analysis across 33 categories |
pairing | Cross-project unit matching for multi-project sessions |
complete | Discovery 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
| Category | Description |
|---|---|
god-unit | High cyclomatic complexity combined with high line count |
dead-code | Functions or paragraphs never called within the project |
code-clone | Near-duplicate code blocks across files |
magic-number | Hardcoded numeric literals with no symbolic name |
hardcoded-credential | Password, key, or token value in source |
hardcoded-url | Production URLs embedded in source |
deep-nesting | Control flow nested beyond threshold |
long-parameter-list | Functions with excessive parameter count |
missing-error-handling | No error handling in I/O-intensive units |
commented-out-code | Large blocks of commented-out code |
todo-fixme | TODO, FIXME, or HACK markers |
implicit-type-coercion | Type precision risk from implicit conversions |
unbounded-loop | Loop with no visible termination condition |
copy-paste-cobol | Identical COBOL paragraph bodies |
goto-usage | GOTO or GOBACK in non-entry context |
global-state | Mutable global or package-level state |
no-unit-tests | No detected test coverage |
Firmware / Embedded (IEC 61508 / MISRA-C)
| Category | Description |
|---|---|
unsafe-pointer-arithmetic | Raw MMIO pointer cast (MISRA Rule 11.4) |
isr-reentrance-risk | ISR accesses shared data without critical section |
misra-c-critical-violation | MISRA-C mandatory rule violation |
hardware-dependency | Logic tightly coupled to MCU register address |
watchdog-gap | Missing watchdog refresh (IEC 61508 requirement) |
Automotive (ISO 26262 / AUTOSAR)
| Category | Description |
|---|---|
autosar-rte-dependency | AUTOSAR Classic RTE with no Adaptive mapping |
e2e-protection-gap | E2E CRC or counter missing |
asil-decomposition-break | ASIL-D decomposition without formal rationale |
can-signal-scaling-mismatch | DBC factor/offset not preserved in translation |
Telecom (3GPP / GSMA)
| Category | Description |
|---|---|
security-key-material | 3GPP AS/NAS keys inline in source |
protocol-state-machine-break | Non-serialisable RRC/NAS state machine |
ttcn3-verdict-suppression | INCONC verdict without linked test reference |
Energy / Critical Infrastructure
| Category | Description |
|---|---|
goose-protection-relay | IEC 61850 GOOSE bridged via TCP/MQTT (prohibited) |
dnp3-secure-auth-gap | DNP3 SA_CHALLENGE response missing |
sis-sil-downgrade | SIS/ESD change that would reduce SIL rating |
Compliance Framework Detection
Discovery detects regulated patterns associated with these frameworks:
| Framework | Domain |
|---|---|
iec-61508 | Functional Safety (SIL 1–4) |
iec-62443 | Industrial Cybersecurity (SL 1–4) |
iec-61131 | PLC Programming Standards |
misra-c | MISRA C:2012 / C:2023 language subset |
autosar | AUTOSAR Classic and Adaptive Platform |
iso-26262 | Automotive Functional Safety (ASIL A–D) |
iec-61850 | Substation Automation (GOOSE, SV, MMS) |
iec-61511 | Process Industry Functional Safety |
iec-62061 | Safety of Machinery Control Systems |
iso-13849 | Performance 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 dependenciesMigration 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
Last edited