From 1663b732c5f22f7ebb88e05768043759bafc2ce3 Mon Sep 17 00:00:00 2001
From: Yangge Li <li213@illinois.edu>
Date: Wed, 26 Oct 2022 13:30:43 -0500
Subject: [PATCH] fixing dependencies for repeatability package

---
 .gitignore             |  2 ++
 README.md              | 48 ------------------------------------------
 README.txt             |  5 ++++-
 inc-expr.py            |  4 ++--
 requirements.txt       | 32 ++++++++++++++--------------
 requirements_local.txt | 48 ++++++++++++++++++++++++++++++++++++++++++
 setup.py               |  2 +-
 7 files changed, 73 insertions(+), 68 deletions(-)
 delete mode 100644 README.md
 create mode 100644 requirements_local.txt

diff --git a/.gitignore b/.gitignore
index 1194e840..dbfa150b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,5 @@ map_package/
 **/output.json
 docs/build/
 docs/source/_autosummary/
+**.whl
+**.tar.gz
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 1692433b..00000000
--- a/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Verse Core Library
-
-Verse is a library for creating, simulating, and verifying uni*verses* or scenarios with intelligent and interacting autonomous agents.  
-
-## Installation
-The package requires python 3.8+. The package can be installed using pip
-
-```
-python3 -m pip install -e .
-```
-To update the dependencies, setup.py or requirement.txt can be used.
-
-```
-python3 setup.py install
-```
-or
-```
-pip install -r requirements.txt
-```
-
-## Demos
-The package comes with several examples in the  ```demo/``` folder. Run these as:
-
-```
-python3 demo/vehicle/demo2.py 
-```
-
-Read the comments in ```demo/ball/ball_bounces.py``` to learn how to create new agents and scenarios. More detailed tutorials will be provided later.
-
-## Library structure
-
-The source code of the package is contained in the verse folder, which contains the following sub-directories.
-
-- **verse**, which contains building blocks for creating and analyzing scenarios.
-  
-  - **verse/scenario** contains code for the scenario base class. A scenario is constructed by several **agents** with continuous dynamics and controller, a **map** and a **sensor** defining how different agents interact with each other.
-  - **verse/agents** contains code for the agent base class in the scenario. 
-  - **verse/map** contains code for the lane map base class and corresponding utilities in the scenario.
-  - **verse/code_parser** contains code for converting the controller code to ASTs. 
-  - **verse/automaton** contains code implementing components in hybrid-automaton
-  - **verse/analysis** contains the **Simulator** and **Verifier** and related utilities for doing analysis of the scenario
-  - **verse/dryvr** dryvr for computing reachable sets
-
-
-- **example** contains example map, sensor and agents that we provided
-
-
-- **plotter** contains code for visualizing the computed results
diff --git a/README.txt b/README.txt
index f929fe8b..d299889a 100644
--- a/README.txt
+++ b/README.txt
@@ -18,7 +18,10 @@ The run-time for regenerating data in Reach section of Table 2 in the paper is a
 
 ###########################
 
-The first step for replicating the experiments in the paper is to install Verse. Verse can be installed using command 
+The first step for replicating the experiments in the paper is to install Verse and its dependencies. 
+The dependencies for Verse can be installed using following command in the root directory of artifact
+    python3 -m pip install -r requirements_local.txt
+Verse can be installed using following command in the root directory of artifact
     python3 -m pip install -e .
 
 To replicate our experiments from the paper, please run following commands from the root directory of the artifact. 
diff --git a/inc-expr.py b/inc-expr.py
index 16a7c68f..915b3fe7 100644
--- a/inc-expr.py
+++ b/inc-expr.py
@@ -27,7 +27,7 @@ else:
 
 rslts = []
 for xprm in xprms:
-    cmd = Popen(f"/usr/bin/time -v -- python3.8 demo/tacas2023/exp11/inc-expr.py {xprm}", stdout=PIPE, stderr=PIPE, shell=True)
+    cmd = Popen(f"/usr/bin/time -v -- python3 demo/tacas2023/exp11/inc-expr.py {xprm}", stdout=PIPE, stderr=PIPE, shell=True)
     print(f"run '{xprm}', pid={cmd.pid}")
     ret = cmd.wait()
     stderr = cmd.stderr.readlines()
@@ -62,4 +62,4 @@ for i in range(0, len(rslts), 2):
     cache_hit_rate = inc.cache_hits[0] / (inc.cache_hits[0] + inc.cache_hits[1]) if "v" not in var else (inc.cache_hits[0][0] + inc.cache_hits[1][0]) / (inc.cache_hits[0][0] + inc.cache_hits[0][1] + inc.cache_hits[1][0] + inc.cache_hits[1][1])
     print("    & " + " & ".join([name] + [str(i) for i in [inc.node_count[1], round(no.duration, 2), round(no.max_mem), round(inc.duration, 2), round(inc.max_mem), round(inc.cache_size, 2), round(cache_hit_rate * 100, 2)]]) + " \\\\")
 
-print(">>>>>>>>>", time.time()-start_time)
\ No newline at end of file
+print(">>>>>>>>>", time.time()-start_time)
diff --git a/requirements.txt b/requirements.txt
index ce3c43f8..4fef8f4a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,17 +1,17 @@
-numpy~=1.22.1
-scipy~=1.8.1
-matplotlib~=3.4.2
-polytope~=0.2.3
-pyvista~=0.32.1
-networkx~=2.2
-sympy~=1.6.2
-six~=1.14.0
-astunparse~=1.6.3
-treelib~=1.6.1
-z3-solver~=4.8.17.0
-igraph~=0.9.10
-plotly~=5.8.0
-beautifulsoup4~=4.11.1
-lxml~=4.9.1
+numpy
+scipy
+matplotlib
+polytope
+pyvista
+networkx
+sympy
+six
+astunparse
+z3-solver
+plotly
+beautifulsoup4
+lxml
 torch
-tqdm
\ No newline at end of file
+tqdm
+intervaltree
+Pympler
diff --git a/requirements_local.txt b/requirements_local.txt
new file mode 100644
index 00000000..4ad808c3
--- /dev/null
+++ b/requirements_local.txt
@@ -0,0 +1,48 @@
+requirements/tqdm-4.64.1-py2.py3-none-any.whl 
+requirements/wheel-0.37.1-py2.py3-none-any.whl 
+requirements/z3_solver-4.11.2.0-py2.py3-none-manylinux1_x86_64.whl 
+requirements/vtk-9.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/treelib-1.6.1.tar.gz 
+requirements/soupsieve-2.3.2.post1-py3-none-any.whl 
+requirements/cycler-0.11.0-py3-none-any.whl 
+requirements/imageio-2.22.2-py3-none-any.whl 
+requirements/packaging-21.3-py3-none-any.whl 
+requirements/frozenlist-1.3.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/sortedcontainers-2.4.0-py2.py3-none-any.whl 
+requirements/six-1.16.0-py2.py3-none-any.whl 
+requirements/scipy-1.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl 
+requirements/charset_normalizer-2.1.1-py3-none-any.whl 
+requirements/networkx-2.8.7-py3-none-any.whl 
+requirements/aiosignal-1.2.0-py3-none-any.whl 
+requirements/idna-3.4-py3-none-any.whl 
+requirements/astunparse-1.6.3-py2.py3-none-any.whl 
+requirements/plotly-5.10.0-py2.py3-none-any.whl 
+requirements/sympy-1.11.1-py3-none-any.whl 
+requirements/future-0.18.2.tar.gz 
+requirements/typing_extensions-4.4.0-py3-none-any.whl 
+requirements/beautifulsoup4-4.11.1-py3-none-any.whl 
+requirements/python_dateutil-2.8.2-py2.py3-none-any.whl 
+requirements/contourpy-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/tenacity-8.1.0-py3-none-any.whl 
+requirements/Pympler-1.0.1-py3-none-any.whl 
+requirements/pyparsing-3.0.9-py3-none-any.whl 
+requirements/scooby-0.6.0-py3-none-any.whl 
+requirements/attrs-22.1.0-py2.py3-none-any.whl 
+requirements/torch-1.12.1-cp310-cp310-manylinux1_x86_64.whl 
+requirements/lxml-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl 
+requirements/multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/fonttools-4.38.0-py3-none-any.whl 
+requirements/aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/intervaltree-3.1.0.tar.gz 
+requirements/wslink-1.9.0-py3-none-any.whl 
+requirements/pyvista-0.36.1-py3-none-any.whl 
+requirements/async_timeout-4.0.2-py3-none-any.whl 
+requirements/yarl-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/polytope-0.2.3.tar.gz 
+requirements/appdirs-1.4.4-py2.py3-none-any.whl 
+requirements/mpmath-1.2.1-py3-none-any.whl 
+requirements/Pillow-9.2.0-cp310-cp310-manylinux_2_28_x86_64.whl 
+requirements/matplotlib-3.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+requirements/numpy-1.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
+
diff --git a/setup.py b/setup.py
index 652e341d..21951e07 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,6 @@ setup(
         "sympy",
         "six",
         "astunparse",
-        "treelib",
         "z3-solver",
         "plotly",
         "beautifulsoup4",
@@ -29,6 +28,7 @@ setup(
         "torch",
         "tqdm",
         "intervaltree",
+        "Pympler",
     ],
     classifiers=[
         'Development Status :: 2 - Pre-Alpha',
-- 
GitLab