Repository navigation
Description
[P7] OpenSCENARIO DSL Frontend — tracking
Tracking issue for pillar P7. See docs/roadmap/roadmap.md.
Objective
A grammar-based parser (ANTLR4 C++ runtime, BSD), AST, symbol resolution and type system for ASAM OpenSCENARIO DSL 2.x, able to load and check the finalized standard library and concrete scenario files with actionable diagnostics — shipping scena-check for DSL files (DSL §7; coverage: docs/roadmap/coverage/osc-dsl-coverage.md). Constraint (keep) and coverage constructs are parsed and checked but not solved. Out of scope: external-method binding to host code (diagnosed as unsupported when invoked), constraint solving (F4), any execution (P8).
Sprints
- p7-s1 — DSL grammar & lexer (ANTLR4) ([p7-s1] DSL grammar & lexer (ANTLR4) #39)
- p7-s2 — Parser & AST ([p7-s2] Parser & AST #40)
- p7-s3 — Symbols & type system ([p7-s3] Symbols & type system #41)
- p7-s4 — Expressions, constraints & coverage (check-only) ([p7-s4] Expressions, constraints & coverage (check-only) #42)
- p7-s5 — Standard library checking & scena-check ([p7-s5] Standard library checking & scena-check #43)
Pillar exit criteria
- The DSL standard library type-checks with zero errors
- Spec-annex-derived example files parse and check with precise diagnostics (section-number citations — the DSL spec defines no rule IDs)
-
scena-checkexits nonzero with actionable messages on seeded error corpora
Status (2026-08-02 continuous-improvement audit): all P7 sprints merged; the standard library type-checks clean; scena-check corpus green. Residual: #110 (overloaded enum literals not resolved by expected type, §7.3.3) means a scenario copied verbatim from the spec (at: start) fails to check — the "spec-annex-derived examples check" exit criterion is not honestly met until it lands.
Activity
JArmandoAnaya commentedon Aug 2, 2026
P7 — OpenSCENARIO DSL Frontend: complete
All five sprints are merged and their issues closed. Scena parses, resolves and
type-checks ASAM OpenSCENARIO DSL 2.x against the full bundled §8 standard
library, and reports what it finds through four surfaces.
3e80312b3382ace17ebc27bc8673scena-check01263bc→84f993fp7-s5 landed in nine slices, because §8 is printed as ~160 parameter tables and
each chapter needed 800–2000 lines of specification read before a line of DSL
could be written:
osc.standard.typesmapactor + §8.15 traffic lightsscena-checkCLIscn_check_dsl_*+ Pythoncheck_dsl_*Exit criteria
diagnostics, pinned declaration by declaration in
dsl_stdlib_test.cpp.scena-checkcorpus green. 18 subprocess tests over the CLI, withexit codes split along the Status model's line: 0 ok, 2 usage, 3 the
source did not check, 4 the input could not be read.
bindings, an example run in CI and the parity audit together, as
CONTRIBUTING.mdrequires. The audit now covers the frontend entrypoints, not just
Enginemethods, so a future frontend function cannotreach one surface and quietly miss the others.
ASan+UBSan, clang-format, the determinism trace and the golden suite.
Deliberate exclusions, each recorded
to fixed values are accepted with an
UnsupportedFeaturewarning rather thanapproximated — reporting beats guessing where determinism is at stake. Same
treatment for coverage collection,
sample()andevery.excluded.
file (ADR-0029), and embedded as chunked raw literals — MSVC caps a single
string literal at 16380 bytes, and this keeps the library independent of any
install prefix.
prints the kph factor as
0.277777778, so36kph == 10mpsis false.Conformance beats tidiness; pinned by test.
rule_idempty, becausethe DSL standard defines no
asam.net:rule identifiers. Asserted, notassumed.
Three defects found in ASAM OpenSCENARIO DSL 2.2.0
Each resolved by asking which surface the rest of the chapter corroborates, and
each pinned by a test so the resolution stays visible:
state_equalprototype says
extend traffic_light:while the heading, the prose andTable 319 all say
traffic_light_group.set_group_bulb_state's firstparameter is typed
traffic_lightwhile its own description says "group".The parameter table is what a conforming scenario is written against, so it
is carried verbatim and the inconsistency recorded.
movable_object.change_speed,movable_object.keep_speedandvehicle.change_lane; §8.9 declares modifiers of exactly those names forexactly those actors, and a qualified behavior name identifies one
declaration. Those three take §7.3.12.3's unassociated form, the only
spelling that exists and does not collide.
Known gap carried into P8
#100 — an actor-associated modifier cannot be applied, in either position
§7.3.12.4.1 defines. The declarations are well-formed and checked; the
application side is not. It predates these chapters and p8-s3 (#46) depends on
it, so it is the next thing to land.
ADRs: 0027 (hand-written lexer/parser), 0028 (the type model), 0029 (the bundled
library). Leaving this issue open per repo convention.