Bryce Summers

03 Mar 2015

The Bryce Graphical Language

Linked List Visualization using the Bryce Graphical Language

Linked List Visualization using the Bryce Graphical Language

What is a Graph?

Please see: https://en.wikipedia.org/wiki/Graph_theory if you are not aware of the mathematical usage of the term “Graph”.

Embedding / Internet Deployment

My project is hypothetically embedable, since it was written with the Google Windowing Toolkit, which outputs javascript. I have not yet endeavored to perform said embedding. In the future, I am planning on releasing the project on the internet.

Tweetable Summary

The Bryce Graphical Language visualizes the execution of programs through directed graphs and visualizes directed graphs through code.

Discussion of Project

Several Years ago I first decided that I wanted to create a program to visualize code. I started out programming a virtual machine based computer game that I called Code Breaker. At that time I was most interested in the logic of control flow and thought it would be a fun game to allow the user to inject code dynamically into the program to literally increase their score by optimizing the number of calls to the score++ variable. Here is an image from Code Breaker.

A Code Breaker Screenshot that highlights the terminal making a function call.

A Code Breaker Screenshot that highlights the terminal making a function call.

Code Breaker Screenshot that shows the user dynamically injecting some code into the execution.

Code Breaker Screenshot that shows the user dynamically injecting some code into the execution.

When I cam to college, I looked for people to work on the project with me, but found that all of my peers (and myself) were rather busy taking our Freshman classes. I therefore put the project on hold.

Since then, I have become interested in information visualization tools that are useful to students and could possibly alleviate some of the pain they experience as part of the educational process. A couple of summer ago I created a tool entitled Summers CAMP that is meant to replace paper for computations in an introductory Linear Algebra Class. Here is a screen shot from Summers CAMP.

Screenshot of the Summers CAMP program.

Screenshot of the Summers CAMP program.

Please see : http://www.funtheemental.com/summers-camp for more information.

After my great learning experience making Summer CAMPI got the urge to make two other projects in the same vein. I wanted to make a useful tool for visualizing the execution of code and I also wanted to make a tool that would be useful to graph theorists. I decided to use this information visualization project as an opportunity to make both projects. I am proud to say that I have finished the core of the project in time for the Critique, but it is by no means done. There is a lot of design work to be done, a user interface to develop, and many examples to be written. I also invented a new Computer programming language entiteled The Bryce Graphical Language that is interpreted by the Bryce Graphical Language Virtual Machine. I will also need to investigate options for improving the Bryce Graphical Language NBody Simulation / Directed Graph Visualizer.

At the moment the project does not differentiate the different types of nodes. It will likely be hard for students and intellectually curious individuals to interpret the program correctly without the implementation of differentiation based on color and font style. The Java rendering is quite slow, I may want to see if it runs better on good old fashion desktop computers.

Sketches

Please see: http://golancourses.net/2015/brycesummers/02/08/24-infovis-sketch-i-e-imperativeb/ for an initial design sketch of my language

Here is design sketch for more current iteration.

Design Sketch for the Bryce Graphical Language

Design Sketch for the Bryce Graphical Language

Why did I Design a New Language?

  1. Designing computer languages is very fun.
  2. By designing my own language, I have absolute control over the syntax. This means that I can incrementally add syntax that I know how to parse and run in the virtual machine. In other words, designing my own language makes the development of the virtual machine easier.
  3. I am able to provide explicit syntax for linking nodes in a graph. This syntax will be useful to graph theorists who may wish to use my program. Normal computer languages do not need a semantic linking of nodes, because computations rely on variable names and values rather than in graph theory where the nodes are themselves a value and a name of sorts.
  4. By not claiming to interpret an existing language, I do not need to be responsible for accurately interpreting a mainstream language that may have syntax that I have overlooked or may undergo revisions.
  5. If I based my interpreter off of a mainstream language, which I may enable in the future, then my project will have to face the grand challenge of having a user copy and paste their correct java/c/python/etc… code into the Bryce Graphical Language interpreter and have it run flawlessly. In other words, my program will have to correctly parse the precise semantic meanings of the language’s specification.

Insights

How about we go back to the first image used to start this blog post. An insight I have found when running a program that uses a linked list to push and pop values, is that the state of a computer program is much more complicated that I imagined. When thinking through programs and conceptual models in my head, I often do not appreciate just how much information is connected.

Linked List Visualization using the Bryce Graphical Language

 

In the next image, I have visualized the execution of a naive program that computes the Fibonacci numbers straight from the recurrence. Interacting with the program and stepping through it gives the user an appreciation of just how much inefficient work is done do compute something so seemingly trivial. Warning: Never implement the Fibonacci numbers in this manner. Please see: http://www.geeksforgeeks.org/program-for-nth-fibonacci-number/

Naive Fibonnacci. Mid execution. Stepping through this program helps one to appreciate just how inefficient it is.

Naive Fibonnacci. Mid execution. Stepping through this program helps one to appreciate just how inefficient it is.

Video

Source Code on Github:

https://github.com/Bryce-Summers/BryceGraphicalLanguage/