Skip to content

TTCN-3 test-execution runtime (interpreter + ntt exec) and ETSI conformance gate#776

Open
rafael2knokia wants to merge 1 commit into
masterfrom
ntt-titan
Open

TTCN-3 test-execution runtime (interpreter + ntt exec) and ETSI conformance gate#776
rafael2knokia wants to merge 1 commit into
masterfrom
ntt-titan

Conversation

@rafael2knokia

@rafael2knokia rafael2knokia commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

This branch grows ntt from a TTCN-3 front-end (parser / LSP / tooling)
into a full TTCN-3 test-execution toolchain in Go: a tree-walking
interpreter and an ntt exec runtime that can compile, execute and
verdict real TTCN-3 test suites, validated against the ETSI TTCN-3
conformance suite.

ETSI conformance: 4788 / 4948 matched (97.22%), tracked as a CI-style
regression gate.

Large branch (304 commits) intended to land via squash-merge into a
single commit on master; the per-commit history — including the
conformance-slice chain — stays on the branch for reference. No new
external dependencies
: go.mod / go.sum are unchanged from master.

What's included

  • Interpreter (interpreter/) — tree-walking evaluation of modules,
    testcases, functions/altsteps, templates, alt/interleave, ports
    (message and procedure-based communication), timers, components, and
    TTCN-3 object orientation (classes, inheritance, nested classes).
  • Execution runtime (runtime/, runtime/exec/) — testcase
    executor, verdict handling, port/queue model, config (--cfg,
    [MODULE_PARAMETERS]), reporting, and a C ABI / cgo bridge so C/C++
    test ports can be driven from the Go runtime.
  • Codecs (runtime/codec/) — JSON and XML/XER encode/decode paths
    plus RAW encvalue/decvalue round-tripping.
  • Semantic analysis (ttcn3/semantic/) — additional static checks
    (attributes, parametrization, restrictions, type rules, …) surfaced
    through ntt check.
  • Conformance harness (conformance.go) — runs the ETSI suite,
    classifies each file's outcome against its @verdict annotation, and
    gates regressions against a committed baseline
    (testdata/conformance-baseline.json).

Testing

  • Full conformance run, gated at --regress 0.5 against the baseline,
    with a per-file diff requiring zero regressions for every change.
  • A product TTCN-3 suite is used as a runtime canary and stays green
    (17 pass / 0 fail / 2 expected inconc) across changes.
  • go test ./... for the touched packages, including dedicated unit
    tests for the structural-type-compatibility coercion.

Status & remaining work

97.22% is the practical zero-regression ceiling for incremental work; the
remaining ~137 misses are documented with a per-cluster triage in
docs/conformance/remaining-work.md.
They need dedicated deep features (concurrent multi-PTC alt scheduling,
union-alternative tracking, a real RAW codec, procedure-signature
qualification) or are contradictory / mislabeled suite fixtures left
intentionally as-is. The miss inventory and per-slice history live
alongside it under docs/conformance/.

%INT_SW_CHANGE
%AI=CLAUDE
Co-Authored-By: Claude Fable 5 noreply@anthropic.com

🤖 Generated with Claude Code

@rafael2knokia rafael2knokia requested a review from 5nord June 16, 2026 10:41
@rafael2knokia rafael2knokia marked this pull request as ready for review June 16, 2026 10:46
rafael2knokia added a commit that referenced this pull request Jun 23, 2026
A shared, async-collaboration starting point (for Matthias + upstream
ntt, agents welcome) to align the branch with the rest of ntt:

- Inventory: the branch is ~99.6% additive (122,746 ins / 488 del, 437
  files) - it extends the parser/LSP and adds interpreter/runtime/exec/
  codec/port/conformance, not a rewrite. Current state: 97.22%
  conformance, PR #776 mergeable.
- Hard-constraint assessment (evidence-backed):
  - LSP for ETSI users: extended, not changed - low risk.
  - Go-to-definition <100ms: off the heavy path (LookupWithDB, not
    Analyze); position lookup ~25-30us/op, 0 allocs.
  - Diagnostics: full 156-check Analyze per change is the perf
    watch-item on huge files - to benchmark/debounce.
  - ntt run / internal-tool coexistence: run.go + exec.go both exist;
    new rejections from 156 checks - to reconcile.
- Open questions, goals/checklist, and the async-collaboration + gating
  conventions.

No code change.

%INT_NO_SW_CHANGE
%AI=CLAUDE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rmance gate

Grow ntt from a TTCN-3 front-end (parser / LSP / tooling) into a full
TTCN-3 test-execution toolchain in Go: a tree-walking interpreter and an
`ntt exec` runtime that compile, execute and verdict TTCN-3 test suites,
validated against the ETSI TTCN-3 conformance suite (4788/4948, 97.22%).

- interpreter/        tree-walking eval: testcases, templates, alt/interleave,
                      ports (message + procedure), timers, components, OO classes
- runtime/, runtime/exec/  testcase executor, verdicts, port/queue model, --cfg,
                      reporting, C-ABI/cgo bridge and a pure-Go (goport) port binding
- runtime/codec/      JSON, XML/XER, RAW encvalue/decvalue
- ttcn3/semantic/     additional static checks surfaced via `ntt check`
- ttcn3/syntax/       parser extensions (classes, new node kinds)
- internal/lsp/       rename, signature help, workspace symbols, type definition,
                      organize imports, folding, references (Go-to-def off the
                      heavy path; position lookup is microseconds)
- conformance.go      ETSI suite harness gating regressions vs a committed baseline
- docs/               conformance roadmap, Go-only embedding, C/C++ test ports

Additive by design (go.mod/go.sum unchanged from master); the execution
engine is not on the front-end hot path unless explicitly invoked. This
branch is squashed for now; a reviewable per-subsystem commit split is
planned as a follow-up.

%INT_SW_CHANGE
%AI=CLAUDE
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant