** NOTICE: This project will be merged to p4c-psdn.
Table Analyzer analyzes the dependency among tables and actions.
- Drawing graphs is supported. Table Analyzer draws a data dependence graph of
each control block.
- Add
graphs->writeGraphToFile("file/name")
inpreorder(PackageBlock)
.
- Add
- Printing stats is supported. Table Analyzer calculates:
- the number of Tables
- the number of table-independent pairs (no data dependence between two)
- the number of match-independent pairs (no key-action dependence but action-action dependence)
-
Make sure that you have
p4c
compiler which works properly.- Supported p4c version: 77ecabc
- There is a bug on
is_const_table
, so you need to fix it. - Checkout the proper version.
- p4c compiler github: https://github.com/p4lang/p4c
-
Install Boost Graph library.
sudo apt-get install libboost-graph-dev
-
Clone this repository.
git clone [email protected]:multip4/DependencyAnalysis.git
-
Rename repository as
p4c-multip4
.mv DependencyAnalysis p4c-multip4
-
Make a symbolic link to
p4c/extensions
directory.ln -s [path_to_your_p4c-multip4] [p4]/p4c/extensions/p4c-multip4
-
Build it!
cd [p4]/p4c/build & make -j10
-
Go to
test
directory, and test some p4 programs.- Currently p4c-multip4 does not include directory
p4include
automatically. ./p4c-multip4 [test.p4] -I[p4]/p4c/p4include
- Currently p4c-multip4 does not include directory
- Seungbin Song ([email protected])