Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement of p4c-graphs backend #3268

Merged
merged 6 commits into from
May 2, 2022
Merged

Improvement of p4c-graphs backend #3268

merged 6 commits into from
May 2, 2022

Conversation

st22nestrel
Copy link
Contributor

Class Controls - added visiting of nodes with key and actions, which extends table node processing.
Class Parsers rewritten, so it now uses boost library for generation of graphs.
Created class Graph_visitor, which implements functionality to:

  • create fullGraph in 'dot' format from boost graphs of program blocks
  • create fullGraph in predefined 'json' format
  • output separate graphs for each program block in 'dot' format (old functionality)

Updated Readme accordingly

… graphs

graph_visitor -> class implementing functionality:
- to create fullGraph in 'dot' format from boost graphs of program blocks
- to create fullGraph in predefined 'json' format
- to output separate graphs for each program block in 'dot' format (old functionality)
@mihaibudiu
Copy link
Contributor

Please check the build failures.

@@ -1,7 +1,9 @@
# Graphs Backend

This backend produces visual representations of a P4 program as dot files. For
now it only supports the generation of graphs for top-level control and parser blocks.
now it supports the generation of graphs for top-level control and parser blocks,
generation of fullGraph, which merges graphs for top-level program blocks and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is really a "fullGraph"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It merges all generated boost graphs of parsers and control blocks into one graph.
This graph enables users to easily observe control flow of full program.

backends/graphs/README.md Show resolved Hide resolved
backends/graphs/README.md Show resolved Hide resolved
backends/graphs/README.md Show resolved Hide resolved
added program name to json output,
fixed build errors
@st22nestrel st22nestrel requested a review from mihaibudiu April 30, 2022 13:44
@mihaibudiu mihaibudiu merged commit c6bd86f into p4lang:main May 2, 2022
st22nestrel added a commit to st22nestrel/p4c that referenced this pull request May 2, 2022
MichalKekely added a commit that referenced this pull request May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants