Annex C: (normative) Checker rules
Checker rule concept
Checker rules are semantic and syntactic requirements that shall be applied to a scenario. ASAM OpenSCENARIO defines a basic set of rules that enforce compliance with the standard, as well as additional rules with recommendations in accordance with ASAM OpenSCENARIO. Rules consist of a name, an UID (a unique identifier of the check), and a description that specifies the requirements for the scenario.
Rule UID Concepts
The UID is a string which encapsulates a sequence of concepts that allow to identify immediately a rule across the different domains. The concepts are ordered and separated via the separation character :
.
The concepts for the rule UID are:
-
Emanating Entity: a domain name for the entity (organization or company) that declares the rule UID
-
Standard: a short string that represents the standard or the domain to which the rule is applied
-
Definition Setting: the version of the standard or the domain to which the rule appears or is applied for the first time
-
Rule Full Name: the full name of the rule, as dot-separated, snake_lower_case string. The full name of a rule is composed by the rule set, a categorization for the rule, and the rule name, a unique string inside the categorization. The rule set can be nested (meaning that it can be defined as an arbitrary sequence of dot-separated names, while the name is the snake_case string after the last dot of the full name)
To provide a visual description for a rule UID:
<emanating-entity>:<standard>:x.y.z:rule_set.for_rules.rule_name
UIDs are designed to be queried, e.g., implementations may use UNIX pattern matching.
C.1 Rule-set general
C.1.1 file_ending
- Name
-
file_ending
- UID
-
asam.net:xosc:1.0.0:general.file_ending
- Description
-
Scenario descriptions should have the file extension
.xosc
.
C.1.2 animation_constraint_pedestrian
- Name
-
animation_constraint_pedestrian
- UID
-
asam.net:xosc:1.2.0:general.animation_constraint_pedestrian
- Description
-
According to table 11: If a
ScenarioObject
is of typePedestrian
,
thenComponentAnimation
shall not be used asAnimationType
.
C.1.3 animation_constraint_vehicle
- Name
-
animation_constraint_vehicle
- UID
-
asam.net:xosc:1.2.0:general.animation_constraint_vehicle
- Description
-
According to table 11: If a
ScenarioObject
is of typeVehicle
,
thenPedestrianAnimation
shall not be used asAnimationType
.
C.1.4 animation_constraint_misc_object_external_reference
- Name
-
animation_constraint_misc_object_external_reference
- UID
-
asam.net:xosc:1.2.0:general.animation_constraint_misc_object_external_reference
- Description
-
According to table 11: If a
ScenarioObject
is of typeMiscObject
orExternalObjectReference
,
thenComponentAnimation
andPedestrianAnimation
shall not be used asAnimationType
.
C.2 Rule-set data type
C.2.1 distances_are_not_negative
- Name
-
distances_are_not_negative
- UID
-
asam.net:xosc:1.1.0:data_type.distances_are_not_negative
- Description
-
Distances in ASAM OpenSCENARIO XML should be greater than or equal to zero (\(\mathbb{R}^+_0\)).
C.2.2 condition_delay_not_negative
- Name
-
condition_delay_not_negative
- UID
-
asam.net:xosc:1.0.0:data_type.condition_delay_not_negative
- Description
-
The condition delay shall be non negative.
C.2.3 phase_duration_positive
- Name
-
phase_duration_positive
- UID
-
asam.net:xosc:1.0.0:data_type.phase_duration_positive
- Description
-
The attribute
duration
in the complex typePhase
shall contain non-negative values.
C.2.4 time_format
- Name
-
time_format
- UID
-
asam.net:xosc:1.0.0:data_type.time_format
- Description
-
In ASAM OpenSCENARIO, the use of date and time is restricted to the ISO 8601 [4] Basic Notation. The following format pattern shall be used:
yyyy-MM-dd 'T' HH:mm:ss '.' FFFZ
.
C.2.5 variable_correctly_typed
- Name
-
variable_correctly_typed
- UID
-
asam.net:xosc:1.2.0:data_type.variable_correctly_typed
- Description
-
It shall be possible to convert the value in
VariableDeclaration
,VariableAction
, andVariableCondition
to the type of the declared variable.
C.2.6 variable_modification_or_comparison_possible
- Name
-
variable_modification_or_comparison_possible
- UID
-
asam.net:xosc:1.2.0:data_type.variable_modification_or_comparison_possible
- Description
-
-
A
VariableModifyAction
shall only act on int, unsignedInt, unsignedShort or double types. -
For
VariableCondition
, if the data type of the referenced variable is string, then the rule attribute shall be 'equal' or 'not-equal'.
-
C.3 Rule-set distance
C.3.1 lateral_distance_disconnection
- Name
-
lateral_distance_disconnection
- UID
-
asam.net:xosc:1.2.0:distance.lateral_distance_disconnection
- Description
-
In the case, reference lines of connected roads along the chain are not contiguous, the lateral distance is not meaningful and therefore undefined. Thus, a lateral distance relation should not be used.
C.4 Rule-set naming
C.4.1 no_double_colon_prefix_in_names
- Name
-
no_double_colon_prefix_in_names
- UID
-
asam.net:xosc:1.0.0:naming.no_double_colon_prefix_in_names
- Description
-
The
::
shall not be used in names itself.
C.4.2 parameter_declaration_name_prefix_reserved
- Name
-
parameter_declaration_name_prefix_reserved
- UID
-
asam.net:xosc:1.0.0:naming.parameter_declaration_name_prefix_reserved
- Description
-
Parameter names starting with
OSC
are reserved for special use in future versions of ASAM OpenSCENARIO. The prefixOSC
shall not be used at all.
C.4.3 parameter_declaration_parameter_name
- Name
-
parameter_declaration_parameter_name
- UID
-
asam.net:xosc:1.1.0:naming.parameter_declaration_parameter_name
- Description
-
The parameter name shall match the regular expression
[A-Za-z_][A-Za-z0-9_]*
.
C.4.4 unique_element_names_on_same_level
- Name
-
unique_element_names_on_same_level
- UID
-
asam.net:xosc:1.0.0:naming.unique_element_names_on_same_level
- Description
-
Element names at each level shall be unique at that level. There shall be no more than one element with the same name at the same level (within the same directly enclosing element).
For example, within one story, every act shall use a unique name ("MyStory1": "MyAct1", "MyAct2"…), but the names of the acts may be reused in another story ("MyStory2": "MyAct1", "MyAct2"…).
C.5 Rule-set parameters
C.5.1 parameter_declaration_parameter_scope
- Name
-
parameter_declaration_parameter_scope
- UID
-
asam.net:xosc:1.1.0:parameters.parameter_declaration_parameter_scope
- Description
-
The parameter shall not be used out of scope. The scope of a parameter is the subtree rooted in the element where the
ParameterDeclaration
is located.
C.5.2 parameter_declaration_parameter_reference_deadlocks
- Name
-
parameter_declaration_parameter_reference_deadlocks
- UID
-
asam.net:xosc:1.1.0:parameters.parameter_declaration_parameter_reference_deadlocks
- Description
-
The chaining of parameters or mutual references should not result in self references as this can easily lead to deadlocks.
C.6 Rule-set positioning
C.6.1 geodetic_datum_defined
- Name
-
geodetic_datum_defined
- UID
-
asam.net:xosc:1.1.0:positioning.geodetic_datum_defined
- Description
-
If a scenario uses a geo position, then the referenced road network shall define a geodetic datum.
If coordinates of positions are derived from the geographic coordinate system, the road network definition shall specify the map projection system type involved and provide its mandatory parameters.
C.6.2 longitudinal_distance_requirements
- Name
-
longitudinal_distance_requirements
- UID
-
asam.net:xosc:1.2.0:positioning.longitudinal_distance_requirements
- Description
-
When a longitudinal distance in the road coordinate system needs to be calculated (e.g. in
DistanceCondition
orRelativeDistanceCondition
), it shall be possible to calculate a route between start and target position as a chain of consecutive road reference lines (s-axes).
C.6.3 lateral_distance_requirements
- Name
-
lateral_distance_requirements
- UID
-
asam.net:xosc:1.2.0:positioning.lateral_distance_requirements
- Description
-
When a lateral distance in the road coordinate system needs to be calculated (e.g. in
DistanceCondition
orRelativeDistanceCondition
), it shall be possible to calculate a route between start and target position as a chain of consecutive, continuous road reference lines (s-axes).
C.6.4 distance_action_trajectory_reachability
- Name
-
distance_action_trajectory_reachability
- UID
-
asam.net:xosc:1.2.0:positioning.distance_action_trajectory_reachability
- Description
-
The distance in a
LongitudinalDistanceAction
when usingtrajectory
asCoordinateSystem
shall be less or equal to the arc length of the trajectory.
C.6.5 positions_shall_not_introduce_dependency_cycles
- Name
-
positions_shall_not_introduce_dependency_cycles
- UID
-
asam.net:xosc:1.0.0:positioning.positions_shall_not_introduce_dependency_cycles
- Description
-
Positions (like
RelativeWorldPosition
,RelativeObjectPosition
,RelativeRoadPosition
,RelativeLanePosition
,TrajectoryPosition
, orRoutePosition
) shall not introduce a dependency cycle that cannot be resolved.
C.6.6 road_lane_offset_in_bounds
- Name
-
road_lane_offset_in_bounds
- UID
-
asam.net:xosc:1.0.0:positioning.road_lane_offset_in_bounds
- Description
-
If a
Position
is used, which refers to a road and/or lane of the road network, then the given s-coordinate shall be within the boundaries of the referenced road or lane, and the t-cordinate or offset should be within the boundaries of the referenced road or lane.
C.7 Rule-set reference control
C.7.1 road_network_availability
- Name
-
road_network_availability
- UID
-
asam.net:xosc:1.0.0:reference_control.road_network_availability
- Description
-
If a
LogicFile
orSceneGraphFile
element is defined, thefilepath
attribute should point to a resolvable file.
C.7.2 road_network_reference
- Name
-
road_network_reference
- UID
-
asam.net:xosc:1.0.0:reference_control.road_network_reference
- Description
-
ASAM OpenSCENARIO allows a road network to be linked. This is optional, because the scenario is also valid without a defined road network. In most cases, however, an unspecified road network will be a mistake that the user would like to see highlighted. Therefore, in the
RoadNetwork
element aLogicFile
reference should be present.
C.7.3 road_lane_exists
- Name
-
road_lane_exists
- UID
-
asam.net:xosc:1.0.0:reference_control.road_lane_exists
- Description
-
If a position is used, which refers to a road and/or lane of the road network, then the given road id or lane id shall exist in the referenced road network.
C.7.4 controller_assignment
- Name
-
controller_assignment
- UID
-
asam.net:xosc:1.0.0:reference_control.controller_assignment
- Description
-
A
ScenarioObject
containing aMiscObject
or anExternalObjectReference
shall not have anObjectController
assigned.
C.7.5 controller_ambiguity
- Name
-
controller_ambiguity
- UID
-
asam.net:xosc:1.2.0:reference_control.controller_ambiguity
- Description
-
For backward compatibility, ASAM OpenSCENARIO XML allows to omit the
controllerRef
if only a single controller is assigned to the concerned entity attribute (no matter if implicitly or explicitly). If multiple controllers are assigned to a singleScenarioObject
, then thecontrollerRef
attribute inActivateControllerAction
andAssignControllerAction
shall be present.This is expected to be addressed in one of the follow-up major versions, where the attribute shall be defined as mandatory to exclude an ambiguity in specifying the referenced controller.
C.7.6 lightstateaction_light_type
- Name
-
lightstateaction_light_type
- UID
-
asam.net:xosc:1.2.0:reference_control.lightstateaction_light_type
- Description
-
According to table 11 if the actor of a
LightStateAction
is not of typeVehicle
, then the light typeVehicleLight
shall not be used.
C.7.7 lightstateaction_lightstate_on_off
- Name
-
lightstateaction_lightstate_on_off
- UID
-
asam.net:xosc:1.2.0:reference_control.lightstateaction_lightstate_on_off
- Description
-
If the light state
On
orOff
is used, then the attributesflashingOnDuration
andflashingOffDuration
should not be set.
C.7.8 lightstateaction_lightstate_flashing
- Name
-
lightstateaction_lightstate_flashing
- UID
-
asam.net:xosc:1.2.0:reference_control.lightstateaction_lightstate_flashing
- Description
-
If the light state
flashing
is used, then the attributesflashingOnDuration
andflashingOffDuration
should be set.
C.7.9 resolvable_variable_reference
- Name
-
resolvable_variable_reference
- UID
-
asam.net:xosc:1.2.0:reference_control.resolvable_variable_reference
- Description
-
If a variable is referenced from a
VariableCondition
orVariableAction
, then aVariableDeclaration
with the referencedname
attribute shall exist within theScenarioDefinition
.
C.7.10 traffic_signal_condition_references
- Name
-
traffic_signal_condition_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_condition_references
- Description
-
The attribute
name
inTrafficSignalCondition
shall reference a valid element (element exists and of correct type) within the referenced road network file.
C.7.11 traffic_signal_controller_action_references
- Name
-
traffic_signal_controller_action_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_controller_action_references
- Description
-
The attribute
phase
inTrafficSignalControllerAction
shall reference a valid element (element exists and of correct type) within the scenario. The attributetrafficSignalControllerRef
inTrafficSignalControllerAction
shall reference a valid element (TrafficSignalController
with the referencedname
exists) within the scenario.
C.7.12 traffic_signal_controller_condition_references
- Name
-
traffic_signal_controller_condition_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_controller_condition_references
- Description
-
The attribute
phase
inTrafficSignalControllerCondition
shall reference a valid element (element of this type and with this name exists) within the scenario. The attributetrafficSignalControllerRef
inTrafficSignalControllerCondition
shall reference a valid element (element exists and of correct type) within the referenced road network file.
C.7.13 traffic_signal_controller_references
- Name
-
traffic_signal_controller_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_controller_references
- Description
-
The attribute
reference
inTrafficSignalController
shall reference an existingTrafficSignalController
with the givenname
within the scenario. The attributename
inTrafficSignalController
can reference a valid element (element exists and of correct type) within the referenced road network file.
C.7.14 traffic_signal_state_action_references
- Name
-
traffic_signal_state_action_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_state_action_references
- Description
-
The attribute 'name' in 'TrafficSignalStateAction' shall reference a valid element (element exists and of correct type) within the referenced road network file.
C.7.15 traffic_signal_state_references
- Name
-
traffic_signal_state_references
- UID
-
asam.net:xosc:1.0.0:reference_control.traffic_signal_state_references
- Description
-
The attribute
trafficSignalId
inTrafficSignalState
shall reference a valid element (element exists and of correct type) within the referenced road network file.
C.7.16 check_varied_parameters
- Name
-
check_varied_parameters
- UID
-
asam.net:xosc:1.0.0:reference_control.check_varied_parameters
- Description
-
In
DeterministicSingleParameterDistribution
andStochasticDistribution
theparameterName
attribute shall reference an existingParameterDeclaration
with the givenname
in the referencedscenarioFile
of the enclosingParameterValueDistribution
. InParameterAssignment
theparameterRef
attribute shall reference an existingParameterDeclaration
with the givenname
in the referenced catalog (used inCatalogReference
) or scenario (used inParameterValueSet
).
C.7.17 single_or_multi_parameters
- Name
-
single_or_multi_parameters
- UID
-
asam.net:xosc:1.1.0:reference_control.single_or_multi_parameters
- Description
-
Single-parameter and multi-parameter distributions may be used in the same parameter value distribution file, but they shall not contain the same value for
parameterName
andparameterRef
.
C.7.18 catalog_reference_resolvability
- Name
-
catalog_reference_resolvability
- UID
-
asam.net:xosc:1.0.0:reference_control.catalog_reference_resolvability
- Description
-
In a
CatalogReference
thecatalogName
attribute and theentryName
attribute shall reference a valid catalog and entry within that catalog.
C.7.19 catalogs_referenced_by_directory
- Name
-
catalogs_referenced_by_directory
- UID
-
asam.net:xosc:1.0.0:reference_control.catalogs_referenced_by_directory
- Description
-
Directories specified in
CatalogLocations
shall exist. For further information see Resolving catalog references.
C.7.20 resolvable_storyboard_element_ref
- Name
-
resolvable_storyboard_element_ref
- UID
-
asam.net:xosc:1.0.0:reference_control.resolvable_storyboard_element_ref
- Description
-
In a
StoryboardElementStateCondition
the attributestoryboardElementRef
shall point to an existing element of the correspondingstoryboardElementType
and shall be uniquely resolvable.
C.7.21 references_to_scenario_object
- Name
-
references_to_scenario_object
- UID
-
asam.net:xosc:1.1.0:general.references_to_scenario_object
- Description
-
According to table 11: If a single
ScenarioObject
is referenced in the complex typesActivateControllerAction
,AssignControllerAction
,AssignRouteAction
,LateralDistanceAction
,LaneChangeAction
,LaneOffsetAction
,LongitudinalDistanceAction
,SpeedAction
,SpeedProfileAction
, orSynchronizeAction
via the attributesManeuverGroup.actors
, orPrivate.entityRef
, then the referenced object shall be either of typeVehicle
or of typePedestrian
.
C.7.22 homogeneous_references_to_entity_selection
- Name
-
homogeneous_references_to_entity_selection
- UID
-
asam.net:xosc:1.1.0:general.homogeneous_references_to_entity_selection
- Description
-
According to table 11: If an
EntitySelection
is referenced in the complex typesActivateControllerAction
,AssignControllerAction
,AssignRouteAction
,LateralDistanceAction
,LaneChangeAction
,LaneOffsetAction
,LongitudinalDistanceAction
,SpeedAction
,SpeedProfileAction
, orSynchronizeAction
via the attributesManeuverGroup.actors
, orPrivate.entityRef
, then all of the following conditions shall be met:-
EntitySelection
shall consist of a group of instances. -
All members of the group shall be of the same type of instance.
-
The type of instance shall be either
Vehicle
, orPedestrian
.In colloquial speak: "It shall be a group of vehicles or a group of pedestrians."
-
C.7.23 traffic_name_exists
- Name
-
traffic_name_exists
- UID
-
asam.net:xosc:1.1.0:reference_control.traffic_name_exists
- Description
-
The
TrafficName
used in aTrafficStopAction
shall exist in one of the traffic creation actionsTrafficSourceAction
,TrafficSinkAction
,TrafficSwarmAction
and (>=OSC1.3)TrafficAreaAction
.
C.7.24 override_controller_action_only_allows_vehicles
- Name
-
override_controller_action_only_allows_vehicles
- UID
-
asam.net:xosc:1.0.0:reference_control.override_controller_action_only_allows_vehicles
- Description
-
According to table 11: Only a
ScenarioObject
or anEntitySelection
of typeVehicle
shall be used as actor for anOverrideControllerValueAction
.
C.8 Rule-set routing
C.8.1 ambiguous_route_waypoints
- Name
-
ambiguous_route_waypoints
- UID
-
asam.net:xosc:1.0.0:routing.ambiguous_route_waypoints
- Description
-
When a
Waypoint
of aRoute
is ambiguous then theWaypoint
can be defined inRoad
orLane
position types to be unambiguous.
C.8.2 route_waypoints_locations
- Name
-
route_waypoints_locations
- UID
-
asam.net:xosc:1.0.0:routing.route_waypoints_locations
- Description
-
Route waypoints should not be located in junctions to avoid ambiguity.
C.8.3 cardinality_of_control_points_in_nurbs
- Name
-
cardinality_of_control_points_in_nurbs
- UID
-
asam.net:xosc:1.0.0:routing.cardinality_of_control_points_in_nurbs
- Description
-
The number of
ControlPoint
elements inNurbs
shall be greater than or equal to the order of the curve.
C.8.4 trajectory_timing_exists_if_requested
- Name
-
trajectory_timing_exists_if_requested
- UID
-
asam.net:xosc:1.0.0:routing.trajectory_timing_exists_if_requested
- Description
-
If
TimeReference
inFollowTrajectoryAction
specifies that a timing is used, then the timing shall be present in the shape of the trajectory.
C.8.5 offset_should_be_less_than_trajectory_length
- Name
-
offset_should_be_less_than_trajectory_length
- UID
-
asam.net:xosc:1.1.0:routing.offset_should_be_less_than_trajectory_length
- Description
-
If
initialDistanceOffset
is used, its value shall be less or equal to the arc length of the trajectory. This cannot be checked statically if any of the positions in use are relative.
C.9 Rule-set scenario logic
C.9.1 invalid_elements_if_no_road_network
- Name
-
invalid_elements_if_no_road_network
- UID
-
asam.net:xosc:1.0.0:scenario_logic.invalid_elements_if_no_road_network
- Description
-
If no road network (
logicFile
) is defined in the scenario, the scenario shall not use one of the following elements:-
RoadPosition
-
LanePosition
-
GeoPosition
-
LaneChangeAction
-
InfrastructureAction
-
EndOfRoadCondition
-
OffroadCondition
-
TrafficSignalAction
-
TrafficSignalCondition
-
TrafficSignalControllerCondition
-
TrafficSignalController
-
C.9.2 controller_activation
- Name
-
controller_activation
- UID
-
asam.net:xosc:1.2.0:scenario_logic.controller_activation
- Description
-
A controller referenced in an
ActivateControllerAction
or anAssignControllerAction
shall not be activated in a domain where it is not defined through thecontrollerType
.
C.9.3 targetspeed_maxspeed_speedprofileaction
- Name
-
targetspeed_maxspeed_speedprofileaction
- UID
-
asam.net:xosc:1.2.0:scenario_logic.targetspeed_maxspeed_speedprofileaction
- Description
-
If
followingMode
isfollow
and noentityRef
is specified in theSpeedProfileAction
, then thespeed
attribute of eachSpeedProfileEntry
should not exceed themaxSpeed
defined in the performance of the actor.
C.9.4 targetspeed_maxspeed_general
- Name
-
targetspeed_maxspeed_general
- UID
-
asam.net:xosc:1.2.0:scenario_logic.targetspeed_maxspeed_general
- Description
-
If the
followingMode
attribute in aSpeedAction
for a vehicle actor is set tofollow
, theSpeedActionTarget
should not exceed the vehicle’smaxSpeed
attribute value.
C.9.5 trajectory_curvature_vs_steering_angle
- Name
-
trajectory_curvature_vs_steering_angle
- UID
-
asam.net:xosc:1.0.0:scenario_logic.trajectory_curvature_vs_steering_angle
- Description
-
If a
FollowTrajectoryAction
is used for an actor of typeVehicle
, the shape is notPolyline
and thefollowingMode
attribute has the valuefollow
, then the minimum radius of the given trajectory should not be less than the turning cycle of the defined actor according to its axle attributes.
C.10 Rule-set XML
C.10.1 valid_schema
- Name
-
valid_schema
- UID
-
asam.net:xosc:1.0.0:xml.valid_schema
- Description
-
Based on the determined version of the checked file (Element
FileHeader
, attributesrevMajor
andrevMinor
), it shall comply with the schema of the detected version. (ASAM OpenSCENARIO XML provides the XSD schema to which valid files shall conform.)
C.11 Rule-set expressions
C.11.1 evaluation_of_expressions_possible
- Name
-
evaluation_of_expressions_possible
- UID
-
asam.net:xosc:1.1.0:expressions.evaluation_of_expressions_possible
- Description
-
The evaluation of expressions shall be possible according to this standard (ASAM OpenSCENARIO expressions are built on literals and parameters).
-
Remark 1: Operators are exclusively supported for numerical (int, unsignedInt, unsignedShort, and double) and boolean data types. They are not defined for string, dateTime, or other data types.
-
Remark 2: A type mismatch occurs if the expected type (according to the model attribute) and the actual type (result of the expression) differ. A type error occurs if a type mismatch cannot be resolved by an implicit conversion.
-
Remark 3: When a catalog is referenced, the
ParameterAssignment
element withinCatalogReference
may be used to override these defaults. → The type conformance and validity of expressions must be valid for these references.
-
C.11.2 allowed_operators
- Name
-
allowed_operators
- UID
-
asam.net:xosc:1.1.0:expressions.allowed_operators
- Description
-
Expressions in ASAM OpenSCENARIO XML shall only use the following operators:
round
,floor
,ceil
,sqrt
,pow
,*
,/
,%
,+
,-
,not
,and
,or
,sin
,cos
,tan
,asin
,acos
,atan
,sign
,abs
,max
,min
.
C.11.3 arguments_of_operators
- Name
-
arguments_of_operators
- UID
-
asam.net:xosc:1.1.0:expressions.arguments_of_operators
- Description
-
The arguments of the operators
round
,floor
,ceil
,sqrt
,sin
,cos
,tan
,asin
,acos
,atan
,sign
,abs
,max
,min
, andpow
shall be given after the operator name and shall be surrounded by parentheses.
C.11.4 type_of_boolean
- Name
-
type_of_boolean
- UID
-
asam.net:xosc:1.1.0:expressions.type_of_boolean
- Description
-
An arithmetic function shall not be used in an expression where a Boolean value is expected. ASAM OpenSCENARIO allows Boolean literals to be given as
0
,1
,true
, andfalse
.
C.11.5 type_casting
- Name
-
type_casting
- UID
-
asam.net:xosc:1.1.0:expressions.type_casting
- Description
-
Other implicit type conversion than:
-
Integer values (signed and unsigned) may be implicitly converted to double values.
-
Integer literals can be implicitly converted to any integer data type shall not be used.
-
Instead, the ASAM OpenSCENARIO allows for type conversion from double to int via the operators round
, floor
, and ceil
.
C.11.6 nan_or_infinity
- Name
-
nan_or_infinity
- UID
-
asam.net:xosc:1.1.0:expressions.nan_or_infinity
- Description
-
Expressions where IEEE_754-2019 [13] defines the result
NaN
orInfinity
shall result in an error.
C.11.7 arithmetic_errors
- Name
-
arithmetic_errors
- UID
-
asam.net:xosc:1.1.0:expressions.arithmetic_errors
- Description
-
Expressions in ASAM OpenSCENARIO shall be free of arithmetic errors (division by zero, sqrt of a negative value, …).