How scenic-foundation/scenic works
Scenic compiles probabilistic scenario descriptions and generates scenes for cyber-physical systems; users can then run scenarios through simulator interfaces. The graph preserves the compiler, scene-modeling, constraints, dynamics, driving-road, and simulation stages, plus core evaluation layers. The README establishes the product workflow, while source-index references support the cited internal links. Several listed capabilities—especially syntax translation internals and simulator integrations—were not sampled, so their connections are omitted rather than inferred.
Main entry points: scenarios.py Dynamic scenarios · __init__.py Scenic API · simulators.py Simulation runtime · roads.py Driving roads
Components 23
Language and Compilation
- Scenic API
src/scenic/__init__.py - Scenario translator
src/scenic/syntax/translator.py - Language veneer
src/scenic/syntax/veneer.py
Scene Modeling
- Distributions
src/scenic/core/distributions.py - Lazy evaluation
src/scenic/core/lazy_eval.py - Type support
src/scenic/core/type_support.py - Vectors
src/scenic/core/vectors.py - Geometry
src/scenic/core/geometry.py - Regions
src/scenic/core/regions.py - Scene objects
src/scenic/core/object_types.py - Shapes
src/scenic/core/shapes.py
Constraints and Dynamics
- Requirements
src/scenic/core/requirements.py - Dynamic scenarios
src/scenic/core/dynamics/scenarios.py - Actions
src/scenic/core/dynamics/actions.py - Behaviors and invocables
src/scenic/core/dynamics/invocables.py
Simulation and Domains
- Serialization
src/scenic/core/serialization.py - Simulation runtime
src/scenic/core/simulators.py - Driving roads
src/scenic/domains/driving/roads.py - OpenDRIVE parser
src/scenic/formats/opendrive/xodr_parser.py - CARLA adapter
src/scenic/simulators/carla/simulator.py - MetaDrive adapter
src/scenic/simulators/metadrive/simulator.py - Newtonian adapter
src/scenic/simulators/newtonian/simulator.py
Other components
- Scenario author
Connections 8
- Scenario author → Scenic API: uses
- Scenic API → Scenario translator: exposes
src/scenic/__init__.py - Dynamic scenarios → Requirements: uses
src/scenic/core/dynamics/scenarios.py - Dynamic scenarios → Actions: uses
src/scenic/core/dynamics/scenarios.py - Dynamic scenarios → Behaviors and invocables: uses
src/scenic/core/dynamics/scenarios.py - Driving roads → OpenDRIVE parser: parses with
src/scenic/domains/driving/roads.py - MetaDrive adapter → Simulation runtime: implements
src/scenic/simulators/metadrive/simulator.py - Newtonian adapter → Simulation runtime: implements
src/scenic/simulators/newtonian/simulator.py