Scenario-based testing is a key method for cost-effective and safe validation of autonomous vehicles (AVs). Existing approaches rely on imperative scenario definitions, requiring developers to manually enumerate numerous variants to achieve coverage. Declarative languages, such as ASAM OpenSCENARIO DSL (OS2), raise the abstraction level but lack systematic methods for instantiating concrete and specification-compliant scenarios. To our knowledge, currently, no open-source solution provides this capability. We present RoadLogic that bridges declarative OS2 specifications and executable simulations. It uses Answer Set Programming to generate abstract plans satisfying scenario constraints, motion planning to refine the plans into feasible trajectories, and specification-based monitoring to verify correctness. We evaluate RoadLogic on instantiating representative OS2 scenarios executed in the CommonRoad framework. Results show that RoadLogic consistently produces realistic, specification-satisfying simulations within minutes and captures diverse behavioral variants through parameter sampling, thus opening the door to systematic scenario-based testing for autonomous driving systems.
Figures & tables
Figure 1. Visualization of a simulation compliant with the specification in Listing generated by RoadLogic . v1 is the (purple) vehicle performing the overtake, while v2 is the (red) vehicle driving straight. Overtaking scenario with two vehicles on adjacent lanes.
Figure 2. Overview of RoadLogic . Overview diagram of the system.
Figure 3. Symbolic automaton translation rules for OS2 constructs.
Figure 4. Symbolic automaton derived from the overtake scenario Symbolic automaton of the running example.
Figure 5. Selected frames from the ASP model output of the running example. The points in time when the three goals are fulfilled.
Figure 6. Computation time of base pipeline on the scenario benchmark.
Figure 7. Similarity heatmaps for all experiments. Each pair (x-b, x-r) corresponds to one scenario under the base strategy and one under refined settings. All heatmaps share the color scale shown in the bottom left.
Figure 8. Three concrete simulations generated from Scenario 5 using the refined strategy.
Figure 9. Success rate and computation time of pipeline with sampled parameters on the scenario benchmark.
Figure 10. A concrete behavior that satisfies the overtake scenario specification without being an actual overtake.
Professorship of Autonomous Vehicle Systems, TUM School of Engineering and Design, Technical University of Munich, 85748 Garching, Germany; Munich Institute of Robotics and Machine Intelligence (MIRMI) · University College London, London, United Kingdom