frontend
frontend copied to clipboard
CSE Machine: Ability to toggle between "show all frames created" and "show current frames only"
The current CSE Machine implementation of the environment shows all the frames that are created during the execution of the program. While this is in line with how the environment is drawn as part of the CS1101S syllabus, it can become quite messy in situations where a lot of frames are drawn, such as in loops and recursive functions. Many frames are no longer referenced, and it would be nice to have a toggle that removes the display of such frames.
A simple example of this problem would be the following code in Source:
let i = 0;
while (i < 10) {
const a = 0;
i = i + 1;
}
The output of the CSE Machine during the middle of execution:
In this example, the current frame is very far right, and the user would have to manually move the canvas to find the current frame.