7.1 Introduction

7.1.1 Scope

This language reference manual provides the normative description of the ASAM OpenSCENARIO domain-specific language.

It forms a part of the overall ASAM OpenSCENARIO standard specification, besides other parts, like the domain model specification, domain model extension guidelines, scenario creation guidelines, and the migration guidelines.

This reference manual specifies the syntax and semantics of the ASAM OpenSCENARIO domain-specific language. It is to be understood in combination with the other specification parts: The domain model specification, in particular, which gives the definition of all domain-specific types that can be employed with the language.

The language reference manual is structured into the following sections:

  1. Section 7.2, "Language structure and syntax" defines the overall structure and syntax of the language.

  2. Section 7.3, "Types" defines the type system and the various compound type declarations that form the main part of the language.

  3. Section 7.4, "Expressions" defines the expression language, which is employed in various places across the language.

  4. Section 7.5, "Coverage" defines the measurement and coverage mechanisms of the language.

  5. Section 7.6, "Semantics" provides the overall formal semantics of the language through the use of denotational trace semantics.

  6. Section 7.7, "Library mechanisms" defines the mechanisms that the language provides for library creation and use.

7.1.2 Language overview

In order to verify the safety and functionality of an autonomous vehicle (AV) or an advanced driver assistance system (ADAS), its behavior needs to be observed in various situations or scenarios.

A scenario is a timed sequence of actions by one or more actors. Typical actors in scenarios might include vehicles, pedestrians, the environment, and the AV itself.

ASAM OpenSCENARIO is aimed at supporting the creation, execution, and observation of scenarios across the complex challenge of AV simulation, verification, and validation.

More specifically, ASAM OpenSCENARIO aims to support scenarios ranging from simple to complex, and from abstract to concrete.

The domain-specific language described in Section 7, "Language reference manual" is intended to form a core basis for achieving those goals as a central part of the overall ASAM OpenSCENARIO specification. Domain-specific language

The ASAM OpenSCENARIO language is a domain-specific language: It was developed from the ground up to support the specification of scenarios.

It is centered in its definitions around the domain of AV/ADAS development, validation, and verification.

It supports a human-readable Python-like syntax, that provides for a lower learning curve for domain experts while supporting a domain model that is directly recognizable by domain experts.

The concepts that were integrated into the language are all directly applicable to the domain at hand, whereas purely implementation-centric features were avoided wherever possible. Declarative language

The ASAM OpenSCENARIO language is a declarative language: It is describing "what should happen", rather than focusing on "how it should be performed".

For example, the language can describe a vehicle changing its velocity from 30 kph to 90 kph. Any profile of this velocity change matches the declarative description (see Section 7.6, "Semantics").

The ASAM OpenSCENARIO language is designed to support a wide span of abstraction levels. These levels can vary from an abstract scenario description down to very concrete and detailed scenarios.

An abstract scenario description includes very few specific values, like target speeds, or specific positions: It leaves those values open to further refinement in concretizations of the abstract scenario. In a very concrete scenario, however, all the values are set and defined, leaving no value open for interpretation.

The language supports abstraction and concretization of scenarios through its parameter, constraint, and modifier mechanisms. Scenario variation

By allowing the specification of scenarios with higher levels of abstraction, the ASAM OpenSCENARIO language supports the derivation of a variety of concrete scenarios from those abstract descriptions.

It supports this specifically through the incremental refinement of parameter values via constraints, constraint aggregation, and the ability to randomize parameter values within the given constraint bounds.

Typical parameters that may vary include:

  • Speed

  • Vehicle type

  • Lighting conditions

  • …​

In a similar manner, a user can randomize or control the overlap of multiple scenarios in a scenario mix or parallel composition. Hierarchical scenario composition

The ASAM OpenSCENARIO language supports the composition of scenarios hierarchically from other scenarios.

This allows for the reuse of existing scenarios, as well as the incremental build-up of more complex scenarios from simpler pieces.

Through its composition operators, in combination with the event system, the language allows for emergent behavior from composed scenarios in a controlled fashion. Modification of object behavior and properties

The ASAM OpenSCENARIO language is an object-oriented and aspect-oriented language.

This means that the user can modify the behavior or other aspects of some or all instances of an object, whether user-defined or system-supplied.

The objects in the case of the ASAM OpenSCENARIO language can be actors, actions, scenarios, modifiers, or simple data structures.

The mechanisms used to modify objects allow for the original descriptions to remain undisturbed while adapting objects to a particular scenario or purpose. In this way reuse and incremental development of libraries is supported. Standard actors and extensibility

The ASAM OpenSCENARIO language is used to:

  • Identify actors

  • Capture behavior of actors in scenarios

For simplification and productivity, the ASAM OpenSCENARIO domain model provides some predefined actors, like vehicles, routes, or environmental conditions.

The ASAM OpenSCENARIO domain model also provides basic actions that are associated with those actors, such as drive().

Starting from this basis, users can define new actors and actions, or refine existing ones. These extensions can then be packaged into reusable libraries, distributed, and used in the definition of complex scenarios or even higher-level libraries. Scenario monitoring

The declarative nature of the ASAM OpenSCENARIO language provides for the duality of a scenario specification: It can be taken as a prescription of what scenario to execute. It can, however, also be looked at as a specification of what scenario should have happened.

The language also provides for the specification of measurement points, as described in Section 7.5, "Coverage".

With this monitoring it is possible to determine whether the criteria for successful completion of a scenario have been met.

A scenario of ASAM OpenSCENARIO can also contain coverage recording and aggregation constructs in order to aggregate data from successful scenario executions.

Assuming that you have specified goals for each scenario or type of scenario, you can easily identify scenarios that require more testing.