forked from BerkeleyLearnVerify/Scenic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
9,951 additions
and
750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
A compiler and scene generator for the Scenic scenario description language. | ||
Please see the [documentation](https://scenic-lang.readthedocs.io/) for installation instructions, as well as tutorials and other information about the Scenic language, its implementation, and its interfaces to various simulators. | ||
|
||
For a description of the language and some of its applications, see [our PLDI 2019 paper](https://arxiv.org/abs/1809.09310). | ||
For a description of the language and some of its applications, see [our PLDI 2019 paper](https://arxiv.org/abs/1809.09310) (*note:* the syntax of Scenic has changed slightly since then). | ||
Scenic was designed and implemented by Daniel J. Fremont, Tommaso Dreossi, Shromona Ghosh, Edward Kim, Xiangyu Yue, Alberto L. Sangiovanni-Vincentelli, and Sanjit A. Seshia. | ||
|
||
If you have any problems using Scenic, please submit an issue to [our GitHub repository](https://github.com/BerkeleyLearnVerify/Scenic) or contact Daniel at <[email protected]>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.. _developing: | ||
|
||
Developing Scenic | ||
================= | ||
|
||
This page covers information useful if you will be developing Scenic, either changing the | ||
language itself or adding new built-in libraries or simulator interfaces. | ||
|
||
Getting Started | ||
--------------- | ||
|
||
Start by cloning our repository on GitHub and installing Poetry as described in | ||
:doc:`quickstart`. When using Poetry to install Scenic in your virtual environment, use | ||
the command :command:`poetry install -E dev` to make sure you get all the dependencies | ||
needed for development. | ||
|
||
Running the Test Suite | ||
---------------------- | ||
|
||
Scenic has an extensive test suite exercising most of the features of the language. We | ||
use the `pytest <https://docs.pytest.org/en/latest/index.html>`_ Python testing tool. To | ||
run the entire test suite, run the command :command:`pytest` inside the virtual | ||
environment. | ||
|
||
Some of the tests are quite slow, e.g. those which test the parsing and construction of | ||
road networks. We add a ``--fast`` option to pytest which skips such tests, while | ||
still covering all of the core features of the language. So it is convenient to often run | ||
:command:`pytest --fast` as a quick check, remembering to run the full :command:`pytest` | ||
before making any final commits. You can also run specific parts of the test suite with a | ||
command like :command:`pytest tests/syntax/test_specifiers.py`, or use pytest's ``-k`` | ||
option to filter by test name, e.g. :command:`pytest -k specifiers`. | ||
|
||
Note that many of Scenic's tests are probabilistic, so in order to reproduce a test | ||
failure you may need to set the random seed. We use the | ||
`pytest-randomly <https://github.com/pytest-dev/pytest-randomly>`_ plugin to help with | ||
this: at the beginning of each run of ``pytest``, it prints out a line like:: | ||
|
||
Using --randomly-seed=344295085 | ||
|
||
Adding this as an option, i.e. running :command:`pytest --randomly-seed=344295085`, will | ||
reproduce the same sequence of tests with the same Python/Scenic random seed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:orphan: | ||
|
||
Glossary | ||
======== | ||
|
||
.. glossary:: | ||
|
||
action | ||
A primitive operation executed by an agent during a single step of a dynamic | ||
simulation. For example, a car might take an action which sets its throttle, or | ||
turns on its headlights. Actions are defined by the simulator interfaces (or | ||
abstract domains like `scenic.domains.driving`) as subclasses of | ||
:obj:`~scenic.core.simulators.Action`. | ||
|
||
dynamic properties | ||
Properties of Scenic objects which are updated at each time step of a dynamic | ||
simulation. The built-in properties representing positions, orientations, | ||
velocities, etc. are all dynamic. See the source code of | ||
:obj:`scenic.domains.driving.model.DrivingObject` for an example of defining a | ||
dynamic property. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,28 +3,60 @@ Welcome to Scenic's documentation! | |
|
||
Scenic is a domain-specific probabilistic programming language for modeling the environments of cyber-physical systems like robots and autonomous cars. | ||
A Scenic program defines a distribution over *scenes*, configurations of physical objects and agents; sampling from this distribution yields concrete scenes which can be simulated to produce training or testing data. | ||
Scenic can also define (probabilistic) policies for dynamic agents, allowing modeling scenarios where agents take actions over time in response to the state of the world. | ||
|
||
Scenic was designed and implemented by Daniel J. Fremont, Tommaso Dreossi, Shromona Ghosh, Xiangyu Yue, Alberto L. Sangiovanni-Vincentelli, and Sanjit A. Seshia. | ||
Scenic was designed and implemented by Daniel J. Fremont, Tommaso Dreossi, Shromona Ghosh, Edward Kim, Xiangyu Yue, Alberto L. Sangiovanni-Vincentelli, and Sanjit A. Seshia. | ||
For a description of the language and some of its applications, see `our PLDI 2019 paper <https://arxiv.org/abs/1809.09310>`_; a more in-depth discussion is in Chapters 5 and 8 of `this thesis <https://people.ucsc.edu/~dfremont/papers/thesis.pdf>`_. | ||
Our :doc:`publications <publications>` page lists additional papers using Scenic. | ||
|
||
.. note:: | ||
|
||
The syntax of Scenic 2.x is not completely backwards-compatible with 1.x, which was used in our papers prior to late 2020. See :doc:`new` for a list of syntax changes and new features. | ||
If your existing code no longer works, install the latest 1.x release from | ||
`GitHub <https://github.com/BerkeleyLearnVerify/Scenic/releases>`__. | ||
|
||
If you have any problems using Scenic, please submit an issue to `our GitHub repository <https://github.com/BerkeleyLearnVerify/Scenic>`_ or contact Daniel at [email protected]. | ||
|
||
Table of Contents | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Introduction | ||
|
||
quickstart | ||
tutorial | ||
tutorial_dynamic | ||
library | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Tutorials | ||
|
||
tutorials/tutorial | ||
tutorials/dynamics | ||
tutorials/composition | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Language and Tool Reference | ||
|
||
syntax_guide | ||
syntax_details | ||
options | ||
developing | ||
internals | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Libraries and Simulators | ||
|
||
libraries | ||
simulators | ||
new_simulator | ||
internals | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: General Information | ||
|
||
new | ||
publications | ||
credits | ||
|
||
|
@@ -33,7 +65,7 @@ Indices and Tables | |
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
* :doc:`glossary` | ||
|
||
License | ||
======= | ||
|
Oops, something went wrong.