Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a "Pair Visualisation" feature to the CSE Machine, enabling stream lineage visualization through a new toggleable mode. The changes include state management for streamsPointSteps, new arrow components, and logic to link array values to their originating functions. Feedback focuses on removing non-portable local file paths in package.json, deleting an accidentally committed build artifact, and cleaning up leftover debug logs, commented-out code, and redundant logic in the FnValue component.
10 tasks
…into streamVis Please enter a commit message to explain why this merge is necessary, fix
Removed local resolution for 'js-slang' package.
Updated js-slang package version from local to 1.0.89.
Coverage Report for CI Build 24557419822Coverage decreased (-0.1%) to 40.688%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Created new panel in CSE machine for Stream Visualization (pairs and nullary functions belonging to streams).
Displays results from streamViz js-slang PR (source-academy/js-slang#1939). Specifically, we use results from streamLineage from the Context object to draw dotted arrows from a nullary function to the pair(s) it returns.
The map streamLineage (Found in context object, types.ts) that maps the ID of nullary functions to the pairs it returns.
Everytime a CALL0 is called in the control, we push a tuple (nullaryFnID, controlStackHeight) to the pendingStreamFnStack[]. Within generateCSEMachineStateStream, we check the whether the height of the control stack has reached the height of i-1, where i is the controlStackHeight when we pendingStreamFnStack.peek(). If so, we pop pendingStreamFnStack.pop() and we add the pair that is at the top of the stash to the array of pairs that the nullaryFnID maps to, using streamLineage.
See also frontend issue: #3727
Type of change
How to test
Checklist