Declarative Scenario-based Testing with RoadLogic
This work addresses the need for systematic scenario-based testing in autonomous driving, offering an open-source solution to bridge declarative specifications and simulations, though it is incremental as it builds on existing languages and frameworks.
The paper tackles the problem of generating concrete, executable simulations from declarative scenario specifications for autonomous vehicle testing, presenting RoadLogic which uses Answer Set Programming and motion planning to produce realistic, specification-satisfying simulations within minutes.
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 OpenSCENARIO DSL (OS2), raise the abstraction level but lack systematic methods for instantiating concrete, specification-compliant scenarios as simulations. 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 as simulations 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.