Skip to content

Commit 075dde8

Browse files
author
Jesper Jensen
committed
Add readme
1 parent 5345f22 commit 075dde8

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
P-REX
2+
=====
3+
The pushdown MPLS network checker
4+
5+
6+
P-Rex is a model checker based on pushdowns for exploring and verifying
7+
MPLS networks. P-Rex takes in the mpls network in one of two formats, either
8+
in a bespoke XML format, or as a juniper dump. It then puts it together with
9+
a query and generates a pushdown in such a way that reachability in the
10+
pushdown implies something about reachability in the source MPLS network.
11+
12+
P-Rex is written in Python3, and only deals with the translation of
13+
xml/juniper -> (MPLS-model + query) -> Pushdown. The tool uses moped
14+
(Version 1), bundled with the application, to compute reachability in the
15+
pushdown. Moped can be found [here](http://www2.informatik.uni-stuttgart.de/fmi/szs/tools/moped/) and we want to
16+
thank the authors for making it available :).
17+
18+
Structure
19+
---------
20+
The repository follows a simple structure. All code related to the core tool
21+
is located in the `prex` folder. The entrypoint of prex is `prex/main.py`.
22+
23+
The `bin` folder containes the binaries we rely on, just moped. The `bin`
24+
folder should be in the `$PATH` of P-Rex in order for us to find it.
25+
26+
`res` contains test data. `res/nestable` is a simple network, in the
27+
bespoke xml format, used extensively throughout testing and development
28+
of the tool, and has a myriad of fun edge cases to explore. It is also
29+
the network used in the majority of the test cases distributed with the
30+
tool, so you can glance some of them through there. `res/new_mpls_dump`
31+
is a dump of a real network, used to benchmark the tool in the
32+
whitepaper. It's in the juniper dump format.
33+
34+
Lastly, the `test` folder includes a bunch of tests used during
35+
development. They are structure such that a linux machine should only
36+
have to run `./test/test_cli.sh` to run the full test suite and get
37+
a regression report. That also makes it a repository of examples.
38+
39+
Running
40+
-------
41+
As said in structure, the tool needs moped to be in the path, luckily
42+
a compiled moped is located in `bin`. Due to P-Rex being bundled as a python
43+
module it's also necessary to include the project root in the `$PYTHONPATH`.
44+
The full command to run P-Rex on the nestable network with the query `<> .*
45+
<>` for `k = 1` in over-approximation mode becomes.
46+
47+
PATH="./bin/:$PATH" PYTHONPATH=. python3 prex/main.py xml res/nestable/topo.xml res/nestable/routing.xml adv-query "<> .* <>" 1 compile run
48+
49+
The juniper dump is run with, (beware this takes a while):
50+
51+
PATH="./bin/:$PATH" PYTHONPATH=. python3 prex/main.py juniper-xml res/new_mpls_dump/isis res/new_mpls_dump/forwarding adv-query "<> .* <>" 1 compile run
52+
53+
It should be possible to use the `--help` flag at any point to get help
54+
about the possible options.

0 commit comments

Comments
 (0)