Affiliation:
1. Eötvös Loránd Tudományegyetem
Abstract
Our overall research aim is to statically derive execution cost and other metrics from program code written in the P4 programming language. For this purpose, we extract a detailed control flow graph (CFG) from the code, that can be turned into a full, formal model of execution, to extract properties -- such as execution cost -- from the model. While CFG extraction and analysis is well researched area, details are dependent on code representation and therefore application of textbook algorithms (often defined over unstructured code listings) to real programming languages is often non-trivial. Our aim is to present an algorithm for CFG extraction over P4 abstract syntax trees (AST). During the extraction we create direct links between nodes of the CFG and the P4 AST: this way we can access all information in the P4 AST during CFG traversal. We are utilizing Gremlin, a graph query language to take advantage of graph databases, but also for compactness and to formally prove algorithm correctness.
Funder
Innovációs és Technológiai Minisztérium
Reference16 articles.
1. Aho, A.V., Lam, M.S., Sethi, R., and Ullman, J.D. Compilers: Principles, Techniques, and Tools (2nd Edition). Addison Wesley, 2006.
2. Sound Control-Flow Graph Extraction for Java Programs with Exceptions
3. Survey of graph database models
4. SSA is functional programming
5. Baier, C. and Katoen, J.-P. Principles of Model Checking (Representation and Mind Series). ISBN: 978-0-262-02649-9. The MIT Press, 2008.