<h1 id="readme">Readme</h1>
<h2 id="building">Building</h2>
<ul>
<li>Install docker on your machine</li>
<li>Run <code>docker build -t ssp .</code> in the directory where the code is extracted. If you have Gurobi 9.1 and Java version &gt;= 17 installed, you can also run the code directly on your machine by replicating the steps from the Dockerfile.</li>
<li>Obtain a WLS licence from Gurobi (see https://license.gurobi.com/, free for academic use) and save the <code>gurobi.lic</code> somewhere</li>
</ul>
<h2 id="running">Running</h2>
<ul>
<li>To run a <code>command</code>, execute <code>docker run -it -v &lt;path to gurobi.lic&gt;:/opt/gurobi/gurobi.lic ssp &lt;command&gt;</code></li>
<li><p>Optional: When running experiments, also add <code>-v &lt;some path&gt;:/app/output</code> to the docker call to obtain the output files on your machine. So, the complete command is</p>
<pre><code>docker run -it -v &lt;path to gurobi.lic&gt;:/opt/gurobi/gurobi.lic -v &lt;some path&gt;:/app/output ssp &lt;command&gt;</code></pre></li>
<li>The models can be found in the folder <code>/app/models</code></li>
<li><p>Running our implementation always has the form</p>
<pre><code>bin/ssp-risk &lt;model transitions&gt; &lt;model labels&gt; &lt;goal label&gt; reach &lt;methods: vi,lp&gt; &lt;threshold&gt; output/&lt;output name&gt;.json</code></pre></li>
<li>All relevant data can be found in <code>&lt;some path&gt;/&lt;name&gt;.json</code></li>
<li><p>To specify memory limits, ensure that docker has enough memory available and add <code>-e JAVA_OPTS="-Xmx10G"</code> directly after <code>docker run</code>.</p></li>
</ul>
<h2 id="evaluation">Evaluation</h2>
<p>Run the following commands for the respective models:</p>
<ul>
<li>Grid4: <code>bin/ssp-cvar models/gridworld/gridworld.04.d.tra models/gridworld/gridworld.04.d.lab station reach lp,vi 0.10 output/gridworld.04.json</code></li>
<li>Grid8: <code>bin/ssp-cvar models/gridworld/gridworld.08.d.tra models/gridworld/gridworld.08.d.lab station reach lp,vi 0.10 output/gridworld.08.json</code></li>
<li>Grid16: <code>bin/ssp-cvar models/gridworld/gridworld.16.d.tra models/gridworld/gridworld.16.d.lab station reach lp,vi 0.10 output/gridworld.16.json</code></li>
<li>Grid32: <code>bin/ssp-cvar models/gridworld/gridworld.32.d.tra models/gridworld/gridworld.32.d.lab station reach vi 0.10 output/gridworld.32.json</code></li>
<li>FireWire: <code>bin/ssp-cvar models/firewire/firewire.tra models/firewire/firewire.lab absorbing reach vi 0.10 output/firewire.json</code></li>
<li>WLAN: <code>bin/ssp-cvar models/wlan/wlan2.tra models/wlan/wlan2.lab absorbing reach vi,lp 0.10 output/wlan.json</code></li>
<li>Walk: <code>bin/ssp-cvar models/random_walk/random_walk.tra models/random_walk/random_walk.lab goal reach vi "range:0.001,0.1,100|logrange:-7,-3,100" output/walk-multi.json</code></li>
</ul>
<p>We have excluded the variants which time out or run out of memory, to include them simply change <code>vi</code> / <code>lp</code> to <code>vi,lp</code> in the respective commands. To view the results, simply open the created JSON files.</p>
<p>Run <code>python3 eval.py walk-multi.json</code> to output a CSV for the different threshold performances.</p>
<p>By increasing the logging level of Java’s default logging facility, further details of the computation can be viewed (note that the statistics computation may increase runtime by a few percent).</p>
<h2 id="modifying">Modifying</h2>
<ul>
<li>The <code>sources.tar.gz</code> contain all sources of our implementation (both Java and a python prototype). In fact, the binary executed in the evaluation is compiled from the contained sources. If you want to modify the sources, simply re-package the <code>sources.tar.gz</code> and re-build the docker image.</li>
<li><p>The models are written in the PRISM modelling language. They can be modified and then exported using PRISM (a release can be obtained at https://www.prismmodelchecker.org/), using the call</p>
<pre><code>prism &lt;model&gt;.nm -exportmodel .all -const &lt;constants&gt;</code></pre>
<p>This produces (among others) the required <code>.tra</code> and <code>.lab</code> files. The constants we used to create the models can be found in the <code>.const</code> files in each model folder.</p></li>
</ul>