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

Interaction Net graph dumping and visualization #435

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

lukasstraub2
Copy link

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/

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.

1 participant