Interaction Net graph dumping and visualization #435
+382
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, we are a student project from the University of Stuttgart and are evaluating Bend.
We started out with implementing some classical algorithms as well as a matrix multiplication to get familiar with Bend. Since Bend is relatively new, instead of asessing absolute performance, we focused on scalability and parallelism instead.
But soon we hit a roadblock: None of our programs "felt" parallel, even programs that should parallelize well in Bend like matrix multiplication or megesort. And worse, there where no indications or debugging tools to tell if the programs really where parallel and, if not, why.
It was clear that we needed proper tools. So we decided to modify the HVM2 rust interpreter to dump the Interaction Net graph in graphviz dot format at every step. We also quickly hacked together a viewer in html and javascript to be able to step trough the graph dumps.
Our modification is able to dump the graph in sequential mode (only one redex is evaluated in each step) or in parallel mode (all redexes are evaluated in each step). In parallel mode, it also calculates the average number of regexes in each step, thus giving a measurement of how parallel a given bend program is.
You can see some Interaction Nets here, use the wasd Keys to step through the visualizations: http://w3studi.informatik.uni-stuttgart.de/~straubls/