verse-lib 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- verse/__init__.py +8 -0
- verse/agents/__init__.py +2 -0
- verse/agents/base_agent.py +93 -0
- verse/agents/example_agent/__init__.py +3 -0
- verse/agents/example_agent/ball_agent.py +43 -0
- verse/agents/example_agent/ballg_agent.py +42 -0
- verse/agents/example_agent/car_agent.py +254 -0
- verse/agents/example_agent/line_agent.py +40 -0
- verse/agents/example_agent/origin_agent.py +183 -0
- verse/agents/example_agent/prarm.json +184 -0
- verse/agents/example_agent/quadrotor_agent.py +249 -0
- verse/agents/example_agent/robot_agent.py +37 -0
- verse/agents/example_agent/sign_agent.py +15 -0
- verse/analysis/__init__.py +6 -0
- verse/analysis/analysis_tree.py +571 -0
- verse/analysis/dryvr.py +320 -0
- verse/analysis/dryvr_disc.py +269 -0
- verse/analysis/incremental.py +402 -0
- verse/analysis/mixmonotone.py +291 -0
- verse/analysis/parsed_wrap/__init__.py +3 -0
- verse/analysis/parsed_wrap/_cache.py +95 -0
- verse/analysis/parsed_wrap/bounded_angular.py +434 -0
- verse/analysis/parsed_wrap/bounded_map.py +53 -0
- verse/analysis/parsed_wrap/bounded_piecewise.py +292 -0
- verse/analysis/parsed_wrap/parser_wrapper.py +454 -0
- verse/analysis/parsed_wrap/sensor_parser.py +582 -0
- verse/analysis/parsed_wrap/wrapper_consts.py +29 -0
- verse/analysis/simulator.py +893 -0
- verse/analysis/verifier.py +1899 -0
- verse/automaton/__init__.py +3 -0
- verse/automaton/guard.py +1348 -0
- verse/automaton/hybrid_automaton.py +34 -0
- verse/automaton/hybrid_io_automaton.py +30 -0
- verse/automaton/reset.py +110 -0
- verse/map/__init__.py +5 -0
- verse/map/example_map/__init__.py +2 -0
- verse/map/example_map/intersection.py +127 -0
- verse/map/example_map/map_tacas.py +262 -0
- verse/map/example_map/simple_map.py +31 -0
- verse/map/example_map/simple_map2.py +188 -0
- verse/map/example_map/simple_map_3d.py +278 -0
- verse/map/lane.py +60 -0
- verse/map/lane_3d.py +78 -0
- verse/map/lane_map.py +120 -0
- verse/map/lane_map_3d.py +293 -0
- verse/map/lane_segment.py +324 -0
- verse/map/lane_segment_3d.py +638 -0
- verse/map/opendrive_parser.py +483 -0
- verse/parser/__init__.py +2 -0
- verse/parser/astunparser.py +989 -0
- verse/parser/parser.py +967 -0
- verse/plotter/__init__.py +23 -0
- verse/plotter/plotter2D.py +2864 -0
- verse/plotter/plotter2D_old.py +223 -0
- verse/plotter/plotter3D.py +147 -0
- verse/plotter/plotter3D_new.py +735 -0
- verse/plotter/plotterStar.py +105 -0
- verse/scenario/__init__.py +2 -0
- verse/scenario/scenario.py +595 -0
- verse/sensor/__init__.py +2 -0
- verse/sensor/base_sensor.py +135 -0
- verse/sensor/base_sensor_stars.py +159 -0
- verse/sensor/example_sensor/__init__.py +0 -0
- verse/sensor/example_sensor/craft_sensor.py +62 -0
- verse/sensor/example_sensor/craft_star_sensor.py +81 -0
- verse/sensor/example_sensor/quadrotor_sensor.py +62 -0
- verse/sensor/example_sensor/single_sensor.py +179 -0
- verse/sensor/example_sensor/thermo_sensor.py +62 -0
- verse/stars/__init__.py +3 -0
- verse/stars/reach_at_star.py +73 -0
- verse/stars/starset.py +889 -0
- verse/stars/startests.py +383 -0
- verse/utils/__init__.py +2 -0
- verse/utils/fixed_points.py +125 -0
- verse/utils/star_diams.py +171 -0
- verse/utils/star_manhattan.py +232 -0
- verse/utils/utils.py +437 -0
- verse_lib-2.0.0.dist-info/METADATA +337 -0
- verse_lib-2.0.0.dist-info/RECORD +82 -0
- verse_lib-2.0.0.dist-info/WHEEL +5 -0
- verse_lib-2.0.0.dist-info/licenses/Licence.txt +16 -0
- verse_lib-2.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: verse-lib
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Verse: reachability analysis and verification of multi-agent hybrid systems, with sensor programs
|
|
5
|
+
Author: Yangge Li, Alex Yuan, Haoqing Zhu, Sayan Mitra, Reliable Autonomy Group, UIUC
|
|
6
|
+
License-Expression: NCSA
|
|
7
|
+
Project-URL: Homepage, https://github.com/AutoVerse-ai/Verse-library
|
|
8
|
+
Project-URL: Documentation, https://autoverse-ai.github.io/Verse-library/
|
|
9
|
+
Project-URL: Issues, https://github.com/AutoVerse-ai/Verse-library/issues
|
|
10
|
+
Keywords: reachability,verification,hybrid systems,multi-agent,cyber-physical systems
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: Licence.txt
|
|
24
|
+
Requires-Dist: numpy>=1.26
|
|
25
|
+
Requires-Dist: scipy>=1.11
|
|
26
|
+
Requires-Dist: sympy>=1.12
|
|
27
|
+
Requires-Dist: matplotlib>=3.7
|
|
28
|
+
Requires-Dist: plotly>=5.18
|
|
29
|
+
Requires-Dist: dash>=2.14
|
|
30
|
+
Requires-Dist: imageio>=2.31
|
|
31
|
+
Requires-Dist: pillow>=10.0
|
|
32
|
+
Requires-Dist: polytope>=0.2.5
|
|
33
|
+
Requires-Dist: z3-solver>=4.12
|
|
34
|
+
Requires-Dist: cvxpy>=1.4
|
|
35
|
+
Requires-Dist: highspy>=1.7
|
|
36
|
+
Requires-Dist: ray>=2.9
|
|
37
|
+
Requires-Dist: networkx>=3.0
|
|
38
|
+
Requires-Dist: graphviz>=0.20
|
|
39
|
+
Requires-Dist: portion>=2.4
|
|
40
|
+
Requires-Dist: Pympler>=1.0
|
|
41
|
+
Requires-Dist: intervaltree>=3.1
|
|
42
|
+
Requires-Dist: astunparse>=1.6.3
|
|
43
|
+
Requires-Dist: six>=1.16
|
|
44
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
45
|
+
Requires-Dist: lxml>=4.9
|
|
46
|
+
Requires-Dist: tqdm>=4.66
|
|
47
|
+
Requires-Dist: typing_extensions>=4.7
|
|
48
|
+
Requires-Dist: torch>=2.2
|
|
49
|
+
Provides-Extra: crown
|
|
50
|
+
Requires-Dist: torch<2.12,>=2.2; extra == "crown"
|
|
51
|
+
Requires-Dist: appdirs>=1.4.4; extra == "crown"
|
|
52
|
+
Requires-Dist: packaging>=20.0; extra == "crown"
|
|
53
|
+
Provides-Extra: export
|
|
54
|
+
Requires-Dist: kaleido>=0.2.1; extra == "export"
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
57
|
+
Requires-Dist: black; extra == "dev"
|
|
58
|
+
Requires-Dist: pylint; extra == "dev"
|
|
59
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
60
|
+
Provides-Extra: docs
|
|
61
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
62
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
63
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
64
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
65
|
+
Dynamic: license-file
|
|
66
|
+
|
|
67
|
+
# Verse
|
|
68
|
+
|
|
69
|
+
Verse is a library for modeling, simulating and verifying scenarios in which several decision-making agents
|
|
70
|
+
interact: cars on a highway, drones on flight corridors, spacecraft approaching a station. Each agent has continuous
|
|
71
|
+
dynamics, written as an ordinary Python simulation function, and decision logic, written in a subset of Python with
|
|
72
|
+
`if` statements over the agent's own state and what it perceives of the others. Verse turns these pieces into a hybrid
|
|
73
|
+
system and computes the reachable set from every branch of their
|
|
74
|
+
decisions. Safety requirements written as `assert` statements in the decision logic are checked on that set.
|
|
75
|
+
|
|
76
|
+
<p align="center">
|
|
77
|
+
<img src="docs/source/figs/gallery/highway_animation.gif" width="95%"/><br/>
|
|
78
|
+
<em>A controlled car approaches a slower car and may change lanes on either side. Solid blocks: where each car can
|
|
79
|
+
be at the time shown (its reachable positions enlarged by the car's footprint); faint trail: earlier reachable sets.</em>
|
|
80
|
+
</p>
|
|
81
|
+
|
|
82
|
+
<table>
|
|
83
|
+
<tr>
|
|
84
|
+
<td width="50%"><img src="docs/source/figs/gallery/spacecraft_reach_avoid.png"/></td>
|
|
85
|
+
<td width="50%"><img src="docs/source/figs/gallery/spacecraft_switch_track.png"/></td>
|
|
86
|
+
</tr>
|
|
87
|
+
<tr>
|
|
88
|
+
<td>Spacecraft reach-avoid: every position the deputy can reach while it approaches the chief and steers around a
|
|
89
|
+
second spacecraft, stacked over 50 minutes (time runs upward).</td>
|
|
90
|
+
<td>Two deputies switching tracks. Each estimates its position from angles-only, ground-station and proximity
|
|
91
|
+
sensors; Verse bounds what those sensors report over the whole reachable set.</td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td><img src="docs/source/figs/gallery/drone_figure8.png"/></td>
|
|
95
|
+
<td><img src="docs/source/figs/gallery/curved_highway.png"/></td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr>
|
|
98
|
+
<td>Two quadrotors on three stacked figure-8 tracks. The first may climb or descend to pass the second; both
|
|
99
|
+
branches are verified.</td>
|
|
100
|
+
<td>A curved three-lane road imported from OpenDRIVE. The controlled car's reachable set splits where it may
|
|
101
|
+
overtake.</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td colspan="2" align="center"><img src="docs/source/figs/gallery/highway.png" width="60%"/></td>
|
|
105
|
+
</tr>
|
|
106
|
+
<tr>
|
|
107
|
+
<td colspan="2">Highway with two controlled cars among five others; each lane change is a branch of the reachable
|
|
108
|
+
set.</td>
|
|
109
|
+
</tr>
|
|
110
|
+
</table>
|
|
111
|
+
|
|
112
|
+
Verse is developed by the [Reliable Autonomy Group](https://mitras.ece.illinois.edu/group.html) at the University of
|
|
113
|
+
Illinois Urbana-Champaign.
|
|
114
|
+
|
|
115
|
+
## What Verse does
|
|
116
|
+
|
|
117
|
+
* **Scenarios from parts.** A scenario combines agents, a map (lanes and tracks, written in Python or imported from
|
|
118
|
+
[OpenDRIVE](https://www.asam.net/standards/detail/opendrive/) files), and a sensor that decides what each agent
|
|
119
|
+
perceives. The same agent can be reused across maps and scenarios.
|
|
120
|
+
* **Simulation and verification.** `scenario.simulate(T, dt)` returns one execution; `scenario.verify(T, dt)` returns
|
|
121
|
+
a tree of reachable sets, one branch per possible sequence of decisions.
|
|
122
|
+
* **Reachability engines.** DryVR (sampled simulations with bloating; the default), mixed-monotone decomposition for
|
|
123
|
+
systems with uncertain inputs, NeuReach, and star sets. The engine is a configuration option.
|
|
124
|
+
* **Sensor programs.** A sensor can compute what the agent perceives with a Python function: range, bearing, field of
|
|
125
|
+
view, noisy position fixes. During verification Verse computes sound bounds on that function's output over every
|
|
126
|
+
reachable state, so decisions that depend on noisy or partial observations are verified exactly as written.
|
|
127
|
+
* **Scale.** Verification can run in parallel with [Ray](https://www.ray.io/) and reuse earlier results incrementally
|
|
128
|
+
when a scenario changes.
|
|
129
|
+
|
|
130
|
+
## Installation
|
|
131
|
+
|
|
132
|
+
Verse needs Python 3.10 or newer and runs on Linux and macOS.
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
pip install verse-lib
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
or, from a clone of this repository (to run the demos and the tutorial),
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
pip install -e .
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Sensor programs and CROWN
|
|
145
|
+
|
|
146
|
+
Bounds on nonlinear sensor functions are computed with [auto_LiRPA](https://github.com/Verified-Intelligence/auto_LiRPA)
|
|
147
|
+
(CROWN). It is optional; without it, the rest of Verse works and a CROWN bound raises an error that says how to install
|
|
148
|
+
it. auto_LiRPA 0.8 is not yet on PyPI, so install it from GitHub:
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
pip install "verse-lib[crown]"
|
|
152
|
+
pip install "auto_LiRPA @ git+https://github.com/Verified-Intelligence/auto_LiRPA.git@e393035"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
auto_LiRPA 0.8 declares Python 3.11 only, but its CROWN bounds are identical on Python 3.10–3.13; on those versions
|
|
156
|
+
add `--ignore-requires-python` to the second command.
|
|
157
|
+
|
|
158
|
+
## A first scenario
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
python demo/ball/ball_bounces.py # simulation
|
|
162
|
+
python demo/highway/m1_1c1n/m1_1c1n_dryvr_ver.py # verification of a lane change
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
A scenario is a few lines of Python. From `demo/highway/m1_1c1n/m1_1c1n_dryvr_ver.py`: car `car1` follows the
|
|
166
|
+
decision logic in `example_controller4.py`, and an NPC car keeps its lane ahead of it.
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from verse import Scenario, ScenarioConfig
|
|
170
|
+
from verse.agents.example_agent import CarAgent, NPCAgent
|
|
171
|
+
from verse.map.example_map.map_tacas import M1
|
|
172
|
+
from verse.plotter.plotter2D import reachtube_tree
|
|
173
|
+
|
|
174
|
+
scenario = Scenario(ScenarioConfig(init_seg_length=1, parallel=False))
|
|
175
|
+
scenario.add_agent(CarAgent("car1", file_name="example_controller4.py",
|
|
176
|
+
initial_state=[[0, -0.5, 0, 1.0], [0.01, 0.5, 0, 1.0]], # box of x, y, heading, speed
|
|
177
|
+
initial_mode=(AgentMode.Normal, TrackMode.T1)))
|
|
178
|
+
scenario.add_agent(NPCAgent("car2", initial_state=[[15, -0.3, 0, 0.5], [15, 0.3, 0, 0.5]],
|
|
179
|
+
initial_mode=(AgentMode.Normal, TrackMode.T1)))
|
|
180
|
+
scenario.set_map(M1()) # three straight lanes
|
|
181
|
+
tree = scenario.verify(40, 0.05) # reachable sets for 40 s, every branch of car1's decisions
|
|
182
|
+
reachtube_tree(tree, M1(), None, 1, 2).show()
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The decision logic is Python over the agent's own state, the states of the others and the map. When a car is close
|
|
186
|
+
ahead, `car1` may switch to either neighboring lane, and it returns to `Normal` once it is in the new lane:
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
def decisionLogic(ego: State, others: List[State], track_map):
|
|
190
|
+
output = copy.deepcopy(ego)
|
|
191
|
+
if ego.agent_mode == AgentMode.Normal:
|
|
192
|
+
if vehicle_front(ego, others, track_map):
|
|
193
|
+
if track_map.h_exist(ego.track_mode, ego.agent_mode, AgentMode.SwitchLeft):
|
|
194
|
+
output.agent_mode = AgentMode.SwitchLeft
|
|
195
|
+
output.track_mode = track_map.h(ego.track_mode, ego.agent_mode, AgentMode.SwitchLeft)
|
|
196
|
+
if vehicle_front(ego, others, track_map):
|
|
197
|
+
if track_map.h_exist(ego.track_mode, ego.agent_mode, AgentMode.SwitchRight):
|
|
198
|
+
output.agent_mode = AgentMode.SwitchRight
|
|
199
|
+
output.track_mode = track_map.h(ego.track_mode, ego.agent_mode, AgentMode.SwitchRight)
|
|
200
|
+
lat_dist = track_map.get_lateral_distance(ego.track_mode, [ego.x, ego.y])
|
|
201
|
+
if ego.agent_mode == AgentMode.SwitchLeft and lat_dist >= 2.5:
|
|
202
|
+
output.agent_mode = AgentMode.Normal
|
|
203
|
+
output.track_mode = track_map.h(ego.track_mode, ego.agent_mode, AgentMode.Normal)
|
|
204
|
+
if ego.agent_mode == AgentMode.SwitchRight and lat_dist <= -2.5:
|
|
205
|
+
output.agent_mode = AgentMode.Normal
|
|
206
|
+
output.track_mode = track_map.h(ego.track_mode, ego.agent_mode, AgentMode.Normal)
|
|
207
|
+
return output
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Both `if` branches can fire from the same state, so verification follows both lane changes.
|
|
211
|
+
|
|
212
|
+
The [tutorial notebook](tutorial/tutorial.ipynb) builds such scenarios step by step, and the
|
|
213
|
+
[documentation](https://autoverse-ai.github.io/Verse-library/) describes agents, maps, sensors and plotting.
|
|
214
|
+
|
|
215
|
+
## Sensors and sensor programs
|
|
216
|
+
|
|
217
|
+
What an agent's decision logic sees is produced by the scenario's sensor. The default `BaseSensor` is omniscient: every
|
|
218
|
+
agent sees the exact state of every other. A custom sensor implements `sense(agent, state_dict, lane_map, simulate)` and
|
|
219
|
+
returns the variables the decision logic reads (`ego.x`, `others.dist`, ...). In simulation they are numbers; in
|
|
220
|
+
verification they are intervals that must contain every value the sensor can report.
|
|
221
|
+
|
|
222
|
+
Computing those intervals by hand is where sensor models usually go wrong. With sensor programs, the sensor is an
|
|
223
|
+
ordinary function and Verse computes the intervals. A field-of-view sensor for a ground robot, from
|
|
224
|
+
`demo/aprod/vis_dubins_rdvz/car_sensor_parser.py`:
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
def vis_sensor_piecewise(psi, phi): # which sector of the field of view the target is in
|
|
228
|
+
if psi >= 0 and psi <= phi:
|
|
229
|
+
return -1
|
|
230
|
+
elif psi < 0 and psi >= -phi:
|
|
231
|
+
return 1
|
|
232
|
+
elif psi > phi:
|
|
233
|
+
return -2
|
|
234
|
+
else:
|
|
235
|
+
return 2
|
|
236
|
+
|
|
237
|
+
def vis_sensor(x, y, x_other, y_other, phi, theta):
|
|
238
|
+
rel_x = x_other - x
|
|
239
|
+
rel_y = y_other - y
|
|
240
|
+
eta = atan2(rel_y, rel_x) # bearing to the target
|
|
241
|
+
psi = minus_angular(eta, theta) # relative to the robot's heading
|
|
242
|
+
obs = vis_sensor_piecewise(psi, phi)
|
|
243
|
+
return obs
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
In the sensor's verification branch, one call bounds the observation over the reachable box:
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
from verse.analysis.parsed_wrap import parse_function
|
|
250
|
+
|
|
251
|
+
bounds, _ = parse_function(vis_sensor, {"x": [(x_lo, x_hi)], "y": [(y_lo, y_hi)], ...}, [vis_sensor_piecewise])
|
|
252
|
+
cont["ego.cur_sense"] = list(bounds["obs"][0])
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`parse_function` walks the function statement by statement. Arithmetic and trigonometry are bounded with CROWN, angles
|
|
256
|
+
with interval arithmetic that handles wrap-around, map queries with the map's own geometry, and piecewise functions with
|
|
257
|
+
Z3. Splitting the input box (`parse_function_array(..., num_splits=3)`) tightens the bounds. Results are cached on disk,
|
|
258
|
+
keyed by the function's source code and its inputs.
|
|
259
|
+
|
|
260
|
+
The spacecraft scenarios in [`demo/spacecraft/`](demo/spacecraft/) use sensor programs for angles-only navigation,
|
|
261
|
+
ground-station fixes and proximity sensing; their README lists the runtimes and the paper results each reproduces.
|
|
262
|
+
|
|
263
|
+
## Examples
|
|
264
|
+
|
|
265
|
+
| Folder | What it shows |
|
|
266
|
+
|---|---|
|
|
267
|
+
| [`demo/spacecraft/`](demo/spacecraft/) | autonomous rendezvous, docking, reach-avoid and track switching with sensor programs |
|
|
268
|
+
| [`demo/highway/`](demo/highway/), [`demo/intersection/`](demo/intersection/), [`demo/AEB/`](demo/AEB/) | cars changing lanes, crossing an intersection, emergency braking |
|
|
269
|
+
| [`demo/quadrotor/`](demo/quadrotor/) | quadrotors on 3-D tracks with neural-network controllers |
|
|
270
|
+
| [`demo/aprod/`](demo/aprod/) | ground robots and cars with field-of-view and multi-agent sensors |
|
|
271
|
+
| [`demo/dryvr_demo/`](demo/dryvr_demo/) | ARCH-COMP benchmarks: Van der Pol, Laub–Loomis, gearbox, 3-D heat, spacecraft rendezvous (also with star sets) |
|
|
272
|
+
| [`demo/fp_demos/`](demo/fp_demos/) | verification that stops at a fixed point (reachable set no longer grows) |
|
|
273
|
+
| [`demo/uncertain_dynamics/`](demo/uncertain_dynamics/) | mixed-monotone reachability with uncertain inputs |
|
|
274
|
+
| [`demo/incremental/`](demo/incremental/) | incremental verification after a change to the decision logic |
|
|
275
|
+
| [`demo/traffic_signalB/`](demo/traffic_signalB/), [`demo/robot_swarm/`](demo/robot_swarm/), [`demo/ball/`](demo/ball/) | a car at a traffic light, a robot swarm, bouncing balls |
|
|
276
|
+
|
|
277
|
+
The figures above are regenerated by `python docs/gallery/make_gallery.py`.
|
|
278
|
+
|
|
279
|
+
## Library structure
|
|
280
|
+
|
|
281
|
+
* `verse/scenario`: scenarios and their configuration
|
|
282
|
+
* `verse/agents`: the agent base class and example agents
|
|
283
|
+
* `verse/map`: lanes, maps and the OpenDRIVE importer
|
|
284
|
+
* `verse/parser`, `verse/automaton`: decision logic to guards and resets
|
|
285
|
+
* `verse/analysis`: simulator, verifier and reachability engines; `analysis/parsed_wrap` is the sensor-program parser
|
|
286
|
+
* `verse/stars`: star sets
|
|
287
|
+
* `verse/plotter`: 2-D and 3-D plots of simulations and reachable sets
|
|
288
|
+
|
|
289
|
+
NeuReach is a git submodule: `git submodule update --init` fetches it.
|
|
290
|
+
|
|
291
|
+
## Development
|
|
292
|
+
|
|
293
|
+
```sh
|
|
294
|
+
pip install -e ".[dev]"
|
|
295
|
+
pre-commit install
|
|
296
|
+
python tests/test_verse.py
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Team
|
|
300
|
+
|
|
301
|
+
Core developers: Yangge Li, Alex Yuan, Haoqing Zhu, Katherine Braught, Sayan Mitra.
|
|
302
|
+
Contributors: Nitish Bhupathi Raju, Keyi Shen, Louis Sungwoo Cho, Daniel Zhuang.
|
|
303
|
+
|
|
304
|
+
## Publications
|
|
305
|
+
|
|
306
|
+
**[Verse: Semantics and Verification of Hybrid Multi-Agent Scenarios](https://arxiv.org/abs/2610.35680).**
|
|
307
|
+
Yangge Li, Katherine Braught, Alex Yuan, Sayan Mitra. arXiv:2610.35680, 2026.
|
|
308
|
+
|
|
309
|
+
**[Formal reasoning for perceptual multi-agent systems: verification, contracts, and synthesis](https://mitras.ece.illinois.edu/research/2026/PhD_YanggeLi.pdf).**
|
|
310
|
+
Yangge Li. PhD dissertation, Department of Electrical and Computer Engineering, University of Illinois Urbana-Champaign,
|
|
311
|
+
2026.
|
|
312
|
+
|
|
313
|
+
**[Tools for formal verification of observation-driven autonomous systems](https://mitras.ece.illinois.edu/research/2026/MS_YUAN2026.pdf).**
|
|
314
|
+
Alex Yuan. MS thesis, Department of Electrical and Computer Engineering, University of Illinois Urbana-Champaign, 2026.
|
|
315
|
+
|
|
316
|
+
**[Verse: A Python library for reasoning about multi-agent hybrid system scenarios](https://link.springer.com/chapter/10.1007/978-3-031-37706-8_18).**
|
|
317
|
+
Yangge Li, Haoqing Zhu, Katherine Braught, Keyi Shen, Sayan Mitra.
|
|
318
|
+
Computer Aided Verification (CAV), LNCS 13964, pages 351–364, 2023.
|
|
319
|
+
|
|
320
|
+
**[Parallel and incremental verification of hybrid automata with Ray and Verse](https://link.springer.com/chapter/10.1007/978-3-031-45329-8_5).**
|
|
321
|
+
Haoqing Zhu, Yangge Li, Keyi Shen, Sayan Mitra.
|
|
322
|
+
Automated Technology for Verification and Analysis (ATVA), 2023.
|
|
323
|
+
|
|
324
|
+
**[Verification of L1 adaptive control using Verse Library: a case study of quadrotors](https://arxiv.org/abs/2303.13819).**
|
|
325
|
+
Lin Song, Yangge Li, Sheng Cheng, Pan Zhao, Sayan Mitra, Naira Hovakimyan.
|
|
326
|
+
Work in Progress Session, International Conference on Cyber-Physical Systems (WiP-ICCPS), 2023.
|
|
327
|
+
|
|
328
|
+
**[Parallelization and incremental algorithms in the Verse hybrid system verification library](https://www.ideals.illinois.edu/items/127392).**
|
|
329
|
+
Haoqing Zhu. Master's thesis, University of Illinois Urbana-Champaign, 2023.
|
|
330
|
+
|
|
331
|
+
## Sponsors
|
|
332
|
+
|
|
333
|
+
[NASA ULI Aviate](https://aviate.illinois.edu/event/nasa-uli-annual-review/)
|
|
334
|
+
|
|
335
|
+
## License
|
|
336
|
+
|
|
337
|
+
University of Illinois/NCSA Open Source License; see [Licence.txt](Licence.txt).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
verse/__init__.py,sha256=B5eHvPZXYoauWPt1fx92ZWaDOOUMueTk0guGpiiBDwU,309
|
|
2
|
+
verse/agents/__init__.py,sha256=_JTul56XW5pvXhB_VLEsaYD9pVlnadnVYcwozNBGSr8,82
|
|
3
|
+
verse/agents/base_agent.py,sha256=hVGpMukdE31qTDeKBcPY4fMB_9zwr2_foMBqKNwDt_E,2866
|
|
4
|
+
verse/agents/example_agent/__init__.py,sha256=pwn_rre10uYdbYcPhZSbTYRcH9cgSduJbhlce3tIqJI,155
|
|
5
|
+
verse/agents/example_agent/ball_agent.py,sha256=JKkKS9vgUnZn4X-zIu7VaISO9R5F9lDvkbRKEQiCrMc,1366
|
|
6
|
+
verse/agents/example_agent/ballg_agent.py,sha256=g363uenhplZNR5g1tA66VU9JEhKpuOQCv0-2l4B9Xx8,1321
|
|
7
|
+
verse/agents/example_agent/car_agent.py,sha256=m-_MWbVzuKeQABKZD_1Eni6hF7rUbiMRMci417XZXPM,8613
|
|
8
|
+
verse/agents/example_agent/line_agent.py,sha256=MFUi-qZ8Pnbh7h4I0xVELSR1QbopdxAB2lGI3Ptcgyw,1286
|
|
9
|
+
verse/agents/example_agent/origin_agent.py,sha256=RW4k-0A_jixER2gVpXXaPfD3iYnbdeUIbZGH4fyqhoU,6127
|
|
10
|
+
verse/agents/example_agent/prarm.json,sha256=MJX2T0P5YNZYRrPdmUJEqif6gdC9FrC7TfK2AY2p67Y,17449
|
|
11
|
+
verse/agents/example_agent/quadrotor_agent.py,sha256=TQ0XiZl7gPiJ0iOydLNl15NIxpEJ2X8buyRLHddIuDQ,8613
|
|
12
|
+
verse/agents/example_agent/robot_agent.py,sha256=Gyp0noYsjikuE2yls5n4ySRkOpebcWScNSnVZLPWMcY,1247
|
|
13
|
+
verse/agents/example_agent/sign_agent.py,sha256=s-Kd9yDywGGKcr1-RQyzbf7ZvGJfS1t8NgVQItD7JQI,519
|
|
14
|
+
verse/analysis/__init__.py,sha256=gAwHThjCDMKrLSeiG3G3acFwvFR8fh6TyGJJo-LIbuI,244
|
|
15
|
+
verse/analysis/analysis_tree.py,sha256=HXBl5GYOjY43O7S3GorJn81SKoufBrzuhCYugSIis0g,22082
|
|
16
|
+
verse/analysis/dryvr.py,sha256=edmYcgGblopwR-BRV59QbIOboklBFRBi0eLkjk9L-wE,12701
|
|
17
|
+
verse/analysis/dryvr_disc.py,sha256=WBmMiPevMQ9zCzswSMRsTn6vYZuxKU5eOswCHn9YPmQ,12103
|
|
18
|
+
verse/analysis/incremental.py,sha256=YEDc4snEj3nyCoGge6DU_S7FV8jjESuW_I82RiC9wgk,14012
|
|
19
|
+
verse/analysis/mixmonotone.py,sha256=rjdExzufdpxpo5tLsKyUCIt1X5mXH4yi0LNj_OHg8t8,10887
|
|
20
|
+
verse/analysis/simulator.py,sha256=0pF5v-Q3jn98zOMLWh_B08gdZYm7Pndha6APKF6O1hg,38867
|
|
21
|
+
verse/analysis/verifier.py,sha256=xV8NQTyNd_oak4UNbfAx9H0Hw6xBe-pdSfm7B6f1VMs,82445
|
|
22
|
+
verse/analysis/parsed_wrap/__init__.py,sha256=8Cn8OMDP6sNDPz4XTn9SalzkyRlE91jhanklnZOghx0,269
|
|
23
|
+
verse/analysis/parsed_wrap/_cache.py,sha256=IOAi95wzZyfNc-4aVmkMGPZ4Q2av3eWn0xqd4cpq2GI,3136
|
|
24
|
+
verse/analysis/parsed_wrap/bounded_angular.py,sha256=OqoILi5NReumQzvqDI5Qcj65m32QiFjaI9CA7RW4ro4,13426
|
|
25
|
+
verse/analysis/parsed_wrap/bounded_map.py,sha256=qu-AfxloGcr7xZaznCv4U6J83zWLbcRj_lE_qDP4Jx0,1897
|
|
26
|
+
verse/analysis/parsed_wrap/bounded_piecewise.py,sha256=9OX5H6Y0zOiwy-QvZdp5XUm0L3LaWdFmP_-PEyYd3To,10776
|
|
27
|
+
verse/analysis/parsed_wrap/parser_wrapper.py,sha256=_HAhwLnrhDJFiIqcvkK97leeAIaAepvTH5esw3rVs5s,18231
|
|
28
|
+
verse/analysis/parsed_wrap/sensor_parser.py,sha256=XnwheFWALnTxXz6PNUesXQlscgXDGmVbNzwnmCU2aXw,22847
|
|
29
|
+
verse/analysis/parsed_wrap/wrapper_consts.py,sha256=9xZzxTwVQ9ULYY-pZCmwspX_1occ-H8_hoA0yUV_7eA,1253
|
|
30
|
+
verse/automaton/__init__.py,sha256=CvVkATNF0t40qX2uNzANFIouWfczqa5RA3lvTM_Hv8k,100
|
|
31
|
+
verse/automaton/guard.py,sha256=YqAa4p0Ipo8Io8cjCm4WYojUOljvMCbT4r603rOskIg,62225
|
|
32
|
+
verse/automaton/hybrid_automaton.py,sha256=-AWAmK5IYetKL0u8EX-sQ8CpJfTO2rxxc_tieE9xYKw,901
|
|
33
|
+
verse/automaton/hybrid_io_automaton.py,sha256=5zPd81KNR6C9yLoy9-gYXB4y28ZbedF6wT3aGq2J-Z4,759
|
|
34
|
+
verse/automaton/reset.py,sha256=0dw-OSOeYKOmUgOZyx1UdO4GsIFO5WT34AnjqRHnB_o,4427
|
|
35
|
+
verse/map/__init__.py,sha256=RzTLKW5o1UwvZSwiY3IyYpyOpNaSLH82ZbOICoZVwqA,238
|
|
36
|
+
verse/map/lane.py,sha256=wujOlbaI2YFJkuBWwkYjeCcdXDrzd3bWQRDppOFq5ro,2103
|
|
37
|
+
verse/map/lane_3d.py,sha256=wsS_YZQGD9m4eVvSgO32OOdEtt0nSUUhBdGIdy7asQ8,2970
|
|
38
|
+
verse/map/lane_map.py,sha256=TvFcs5HaVCmEhkvkiUcbdcViNJOtPXabuauTCx5kzuE,4537
|
|
39
|
+
verse/map/lane_map_3d.py,sha256=cexm2BfThbcgenwi4c5Dy779zRnbIIzLDT2hgwDEUOI,11788
|
|
40
|
+
verse/map/lane_segment.py,sha256=qfN7ox_E6AGjpcfVZgTNBbJMBV7G2Y4gKwPLieCp3dk,10940
|
|
41
|
+
verse/map/lane_segment_3d.py,sha256=9pxjNOLgM3WuQIgSWQMQaQwWPS9b8wAulvayVpxPez0,22588
|
|
42
|
+
verse/map/opendrive_parser.py,sha256=0feRUdULOdpgIceOipKMBFKc7cIq_12ZQCNye8BiI_c,24702
|
|
43
|
+
verse/map/example_map/__init__.py,sha256=04Xdieqwwz8b_SKemhc4nV2zHby1LaIZVTellBygGIg,95
|
|
44
|
+
verse/map/example_map/intersection.py,sha256=B4yLY7Q575u72SeagUPvF0-JXgLS0lT6fApuZIiqacA,5290
|
|
45
|
+
verse/map/example_map/map_tacas.py,sha256=HhVPbqm2cZpMPBHlCzmpx70PxTsY4HedFmIZ8EUmowk,10635
|
|
46
|
+
verse/map/example_map/simple_map.py,sha256=nM2dTaiN0OiMgmcFH9bAHRYU7ueirslrwDGO0BRJLwM,1040
|
|
47
|
+
verse/map/example_map/simple_map2.py,sha256=bsfNlzTdQhkVAdXBUApifFyeCfx_5P4SGAqILQOhiEQ,7394
|
|
48
|
+
verse/map/example_map/simple_map_3d.py,sha256=PVKS7z9Fa9NBoicTVGJMSTNaSQ7_sMqYIlAAh7iMVhE,11512
|
|
49
|
+
verse/parser/__init__.py,sha256=1sQ6LkRKRare_CdxJI_UwPF7CdVthCtW9HDKoZ7E-SI,129
|
|
50
|
+
verse/parser/astunparser.py,sha256=j3AkjAJW7aaEaAx1tpAHmiaHIjDyvhH4Dv_5CQ7MvV0,28824
|
|
51
|
+
verse/parser/parser.py,sha256=K45rhRLM5NmKmh0gCJ93R8-9hU39HbS5TSLOetWPrwc,33772
|
|
52
|
+
verse/plotter/__init__.py,sha256=5V1_obiMW3H-zteJEf01XjUdFrr77srBbM1iWNqDq-U,833
|
|
53
|
+
verse/plotter/plotter2D.py,sha256=0dsLufkY0cCztXVzJcSyWeBs1nfxkS2R1gzea-Zn6C0,113455
|
|
54
|
+
verse/plotter/plotter2D_old.py,sha256=9WgxiILaMH2Up0nxIikqrehZIH4Th1i_MsL35JWraqo,6884
|
|
55
|
+
verse/plotter/plotter3D.py,sha256=MD6otLttUKPv4cuQkIFBmyCphKhd4JbAFcp-vlfWS38,6701
|
|
56
|
+
verse/plotter/plotter3D_new.py,sha256=6nUMmPekFZzUkGcwxNG2CclsJpyJdfBtaqqLEt_a9RE,26128
|
|
57
|
+
verse/plotter/plotterStar.py,sha256=Dnkdi-Y08q42V8noVDjpV_hzD6O8JIG6Ki0MBaM0NVM,3275
|
|
58
|
+
verse/scenario/__init__.py,sha256=7y4_Ifql9Bkkp1zbSackpQl_kkidRhgm-Fci5t_Z8D0,46
|
|
59
|
+
verse/scenario/scenario.py,sha256=L_NsYWJYviQ5DhSxEztMx9Ou6Tn-vR2NWPPNOVLkMJg,25206
|
|
60
|
+
verse/sensor/__init__.py,sha256=XKd7MlDp4-j6lOigNqFa9fD1gk6YiCWzwhxYFu9GQJ0,62
|
|
61
|
+
verse/sensor/base_sensor.py,sha256=CQJXH1WqAXo40STaBI7ystvR53j5PQCpOXZdXTad8LE,5578
|
|
62
|
+
verse/sensor/base_sensor_stars.py,sha256=r11NlzC_9mLSDd9f3LPHfv5B-bmV8EJ9fKkd29Vtgpk,6633
|
|
63
|
+
verse/sensor/example_sensor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
|
+
verse/sensor/example_sensor/craft_sensor.py,sha256=y6aDAiCvqzGEeO8LCCbrDYwfmvNovBV-FUwN7WwmFSk,2209
|
|
65
|
+
verse/sensor/example_sensor/craft_star_sensor.py,sha256=qGbRWYqtU1GZ1bTb6i0xpP3IZNjTpMEtQbr31t1JCQ8,3094
|
|
66
|
+
verse/sensor/example_sensor/quadrotor_sensor.py,sha256=7HBLgulUEMvzVz-q5GxK01KyhxOoCjmhiylbHgmE6KY,2251
|
|
67
|
+
verse/sensor/example_sensor/single_sensor.py,sha256=S2o4V6XeRBXcPQclX8quNlSUXCtEUM3FAba7xlir8Jc,7182
|
|
68
|
+
verse/sensor/example_sensor/thermo_sensor.py,sha256=xVhoza5yd9LIMHA7vyu9eAZF9IlHTle9AwcRzTrmls0,2150
|
|
69
|
+
verse/stars/__init__.py,sha256=m08fxepg0BfeQ65mptzgNnFCrb-juPP0IgTrzWa6Q1w,129
|
|
70
|
+
verse/stars/reach_at_star.py,sha256=MCJEH3PEhmpMb9ZhFGuXVO33OMYtjpzo4G-Hg12oM3Y,2684
|
|
71
|
+
verse/stars/starset.py,sha256=IRSpEviDRbbNeSeQ0dzoVqiWAymeAoKqLbcrUa6dMxA,34626
|
|
72
|
+
verse/stars/startests.py,sha256=ZHOx4wu-7YjeD9X8pNJYZoj6ZhUXT33l-NCA8aS04cU,11326
|
|
73
|
+
verse/utils/__init__.py,sha256=GOGIQHFwTSBG9ExxMYdEdS7oWb7tlr6rE_-BBPv7sgc,58
|
|
74
|
+
verse/utils/fixed_points.py,sha256=k3c7j6mYWYU2qpJl_neWDsHCAVd3ru-YI5adx02cSpA,7522
|
|
75
|
+
verse/utils/star_diams.py,sha256=Yx9ZCSWj8c6ZozEddwqy-WQH8lNui6CHoOnfqUG4zVU,7256
|
|
76
|
+
verse/utils/star_manhattan.py,sha256=zCxcsbKFZtiYWYK92GVwWg-3vXZJFAtOFhakT_tGGJ8,6163
|
|
77
|
+
verse/utils/utils.py,sha256=fKpb9_aoJlDk1lnOCyhcELdwgxY3DrmTio3s4ubNuys,14481
|
|
78
|
+
verse_lib-2.0.0.dist-info/licenses/Licence.txt,sha256=6zh8FxuXcxrUmFd95yGVaPQISx7dzu5p0Bv_FlSFqhk,1724
|
|
79
|
+
verse_lib-2.0.0.dist-info/METADATA,sha256=r3TsVfWSQv1fXqzgLbbcP8H2LceWQcRCZ1ixhoKkmAg,16534
|
|
80
|
+
verse_lib-2.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
81
|
+
verse_lib-2.0.0.dist-info/top_level.txt,sha256=Mh4yj7O2XSagNY0dTt_rI4odTVWUlouPTANw7OCLpV0,6
|
|
82
|
+
verse_lib-2.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
University of Illinois/NCSA Open Source License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Reliable Autonomy Group at University of Illinois, Urbana-Champaign. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Developed by: Reliable Autonomy Research Group (RARG) At University of Illinois
|
|
6
|
+
Lab Url: https://mitras.ece.illinois.edu/group.html
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
* Neither the names of RARG nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
verse
|