51WORLD'S PRESENTATION AT ASAM INTERNATIONAL CONFERENCE 2022

Page 1

51WORLD’s Presentation

Zuqiu(James) Mao, Senior software development manager, 51WORLD

OpenSCENARIO2.0

Scenario Description Language and Its Application

Part II

Agenda • OpenSCENARIO 2.0 Compiler Implementation • OpenSCENARIO 2.0 Grammar Check Tool • OpenSCENARIO 2.0 Extension - 51SDL • OpenSCENARIO 2.0 Migration and Compatibility

How does OpenSCENARIO2.0 work as DSL?

Double Lane Changer Sample

Classical Compilers – Three Stages

OpenSCENARIO2 requires a full compiler

image from OSC2 IF by BOSCH
OpenSCENARIO2.0 Scenario Compiler DSL Script Semantic Model Syntax Tree Script Engine Grammar - EBNF Lexical & Syntax Parser Semantic Parser & VM Compiler Frontend - Antlr4 Compiler Backend - Scenario Engine Domain Model State Machine Standard Library Preprocess Standard Library
Open Source Grammar Check Tool with EBNF of OpenSCENARIO2.0 • Implementation: • Use Antlr4 grammar to implement EBNF of specification • Useful • Useful for OpenSCENARIO 2.0 programmers • Useful for Simulation Implementers Lexical & Syntax check Semantic check More… Basic Check - early Advanced Check - later Antlr4 version of EBNF has been already open source: https://github.com/51WORLD/osc2checker.git

Grammar check : osc2checker & Visual Studio Code

Backend - Virtual Machine Instruction format: ego.drive EVMCode_GetUpVal Ax:0 C:0 EVMCode_PushMemberFunction A:0 Bx:12 EVMCode_Push Aex:1 EVMCode_Push Aex:5 EVMCode_Push Aex:2 EVMCode_Call Ax:65532 C:0 EVMCode_CoroutineAutoReturn Ax:0 C:0 Instruction Sample:

OpenSCENARIO2.0 Demo – Double Lane Changer

OSC2.0 Extension - 51SDL • Entry point extension • top.main • OSC1.2 migration extension • OSC1.2 domain model directly translated to OSC2.0 grammar for full compatible • Utility extension • print • Turing complete extension • Support for and if for library implementation

OSC2.0 Extension – OSC1.2 Domain Model

Inter-tool Compatibility - with MathWorks

51Sim-One
RoadRunner
Enquiry: pr-intl@51aes.com; Website: www.51aes.com or www.51sim.com Thank You!

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.