[Paper] Declarative Scenario-based Testing with RoadLogic
Source: arXiv - 2603.09455v1
Overview
The paper introduces RoadLogic, an open‑source tool that turns high‑level, declarative driving scenarios written in the OpenSCENARIO DSL (OS2) into concrete, runnable simulations. By automating the generation of realistic traffic situations, RoadLogic aims to make scenario‑based testing of autonomous vehicles (AVs) faster, cheaper, and more systematic.
Key Contributions
- Declarative‑to‑executable pipeline: Bridges OS2 specifications with the CommonRoad simulation environment.
- Answer Set Programming (ASP) engine: Generates abstract “plans” that satisfy all scenario constraints (e.g., road topology, traffic rules, actor relationships).
- Integrated motion planning: Refines ASP plans into feasible vehicle trajectories that respect dynamics and collision avoidance.
- Specification‑based monitoring: Automatically checks that the produced simulation adheres to the original OS2 constraints.
- Open‑source implementation: Provides the first publicly available framework for systematic, declarative scenario instantiation.
Methodology
- Input – Declarative Scenario: Engineers write a scenario in OS2, describing what must happen (e.g., “Vehicle A must overtake Vehicle B on a two‑lane road while staying within speed limits”).
- Constraint Extraction: RoadLogic parses the OS2 file and translates its logical constraints into a set of ASP rules.
- Abstract Plan Generation (ASP): The ASP solver searches for plans—high‑level sequences of actions and relative positions—that satisfy every constraint. Because ASP works on a logical level, it can explore many combinatorial variants quickly.
- Trajectory Synthesis (Motion Planning): Each abstract plan is fed to a motion‑planning module (based on sampling‑based planners and kinematic models) that produces concrete, time‑parameterized trajectories for every actor.
- Simulation Assembly: The trajectories are injected into the CommonRoad simulator, creating a full‑fidelity traffic scene.
- Verification (Monitoring): A runtime monitor re‑evaluates the OS2 constraints against the generated simulation, flagging any violations.
The whole pipeline runs automatically, requiring only the OS2 file as input.
Results & Findings
- Success Rate: RoadLogic generated valid simulations for all 12 benchmark OS2 scenarios drawn from the CommonRoad suite, with zero constraint violations after monitoring.
- Runtime: End‑to‑end generation took between 30 seconds and 4 minutes per scenario, depending on the complexity of the logical constraints and the number of actors.
- Behavioral Diversity: By sampling different ASP answer sets and motion‑planning seeds, RoadLogic produced a wide range of plausible variants (e.g., different overtaking distances, lane‑change timings), enabling richer test coverage without manual scenario enumeration.
- Realism: The resulting trajectories respected vehicle dynamics and produced smooth, collision‑free motions that were indistinguishable from hand‑crafted CommonRoad scenarios in visual inspection.
Practical Implications
- Scalable Test Generation: Teams can write a single high‑level scenario and automatically obtain dozens of concrete test cases, dramatically reducing the manual effort of scenario authoring.
- Continuous Integration: RoadLogic can be plugged into CI pipelines to generate fresh simulation suites on every code change, ensuring regression testing stays up‑to‑date.
- Regulatory Compliance: Declarative specifications align well with safety standards (e.g., ISO 26262, UNECE R155). RoadLogic’s monitoring guarantees that generated tests remain compliant, easing audit processes.
- Cross‑Tool Compatibility: Because the output is a CommonRoad simulation, developers can reuse existing simulation infrastructure, visualization tools, and data‑logging pipelines.
- Research Acceleration: Open‑source availability invites extensions—e.g., adding new motion planners, integrating with other simulators (CARLA, LGSVL), or supporting probabilistic scenario parameters.
Limitations & Future Work
- Scalability to Very Large Scenarios: ASP solving time grows with the number of logical constraints and actors; extremely dense urban scenes may hit performance limits.
- Dynamic Environment Modeling: Current work focuses on static road layouts and predefined actors; handling dynamic weather or sensor noise is left for future extensions.
- Planner Integration: The motion‑planning step uses a generic planner; tighter coupling with AV‑specific planners could improve realism for high‑speed maneuvers.
- User‑Facing Tooling: While the core engine is open source, a polished UI for scenario authoring and result inspection is still under development.
RoadLogic marks a significant step toward making declarative scenario specifications a practical reality for autonomous‑vehicle testing, turning abstract safety requirements into concrete, repeatable simulations with minimal developer effort.
Authors
- Ezio Bartocci
- Alessio Gambi
- Felix Gigler
- Cristinel Mateis
- Dejan Ničković
Paper Information
- arXiv ID: 2603.09455v1
- Categories: cs.SE, cs.AI, cs.LO
- Published: March 10, 2026
- PDF: Download PDF