-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature/agnosis pull request #840
Open
matthew-a-feraru
wants to merge
77
commits into
develop
Choose a base branch
from
feature/agnosis
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 75 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
368f5ed
Add debugger stub function
krame505 e71f4d5
Add debug function
krame505 5692236
demo missing view
3b3e665
fixed going up on root
6843dcc
implemented view
7c107e1
downward navigation and viewing attributes is easier also added undo
0f518df
locals exist and added TODO comments
b37720f
node to context extraction logic added
6885e52
added local attributes to list and view, also toggleing full attribut…
087c039
Indent for user input, forwarding/bactraking is tested and attribute …
9647d88
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
076eade
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
ad9d0f4
first version of contextualization. Origin tracking needs to be done …
eec8861
apart from origin tracking, isMain() hack means contextualization wor…
65c3080
removed some comments
1531873
return logi fix
7755cf9
minor fixes + fixed indices decrement
a6e587a
hacky origin tracking now works for is-new
0a6102a
fixed a few bugs and found somemore, added toggle for cStack, started…
762c28a
help is more helpful, better comments, and choosing from a list funct…
6d5d8c6
printProductions changed to printName new comments and into has a sle…
a160e87
new comments to improve finding is-new
b9435c7
"comment changes"
e825829
fix isRoot hack. No longer hacky
24d6dc8
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
3075f44
down is not allowed on redex
48bd0bc
args ready, but file/html contextualization still not ready
8491361
added file context visualization
a9cd08d
started work on simplified context stack made from full stack (class …
c5abf38
removed redundant dependencies
2bc898b
fixed prod names. Must use entire prods array
eefd149
changed to dynamically be able to rebuild a simplified stack within t…
0188352
prototyped simplified context stack fully now
c552b65
added commented lines that need to be debugged
828443c
qMerge branch 'develop' into feature/agnosis
1a150f6
Get feature/agnosis building again
krame505 2003f3f
simplified stack works now
9d7c629
to String stuff done
c0cfde2
ready for file visualization
51631b5
added show to simple stack
8e1cda1
adding simple stack show
bf404c5
fixed to string on simple stack
fc15757
removed unncessary prints
2ca734b
html of productions and attributes
2d955cc
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
55a0b35
cleaned some comments, endline and jason added
37b081d
fixed json, stared alroithmic debugging
a9cbed0
fixed json again also alorithmic debugging is ded
2cf0a40
fixed json agin (this time for sure), algorithic debugging is less ded
9a8976c
update a client function to send message to vscode extention
88519ad
Thunk map finally implemented, this solved many bugs, also you can ca…
c954cc0
should work Merge branch 'feature/agnosis' of https://github.com/melt…
64886c8
algorithimc debugger prototype
3e7ff13
now generate rudimentary HTML for contextualizations
3ecbab7
minor bug fix in algorithmicDebugg mostly just wanted to commit to pu…
2d84c0d
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
4aa209d
code styling started
791c372
commented my code
b9e598b
small formatting
70807c9
start of debugg cleanup
ee6ff39
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
fc24180
up and down now update the display also down is called by child names…
62538cd
more cleaning and commenting
646e360
comments and code style---all camel case now
1155d33
Merge branch 'feature/agnosis' of github.com:melt-umn/silver into fea…
16f46d4
Finsihed cleaning and commenting debugg, algrithmic debugg now shows …
b146654
Merge branch 'feature/agnosis' of https://github.com/melt-umn/silver …
f5bab76
update vscode extension support for agnosis debugger
ae1f08e
clean some temperate files in agnosis vscode extension
ad6983f
update command showSimpleDebugContext
5650f01
moved everything added to decorated node into nodecontextmessage
fd7e985
Recognize the silver:langutil:pp/silver:langutil:unparse attrs
krame505 93df3a8
Bump up stack space in running test suites
krame505 d0cc1ce
comment changes
d27f563
Merge branch 'develop' into feature/agnosis
krame505 4ebcfb4
removed unused class
c7a2968
Merge branch 'feature/agnosis' of github.com:melt-umn/silver into fea…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"silver.jvmArgs": "-Xmx10G -Xss40M", | ||
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable", | ||
"silver.compilerJar": "jars/silver.compiler.composed.Default.jar" | ||
"silver.compilerJar": "jars/silver.compiler.composed.Default.jar", | ||
"java.compile.nullAnalysis.mode": "automatic", | ||
"liveServer.settings.port": 5501 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
grammar silver:core; | ||
|
||
@{- | ||
- Launch an interactive debug session to explore a tree. | ||
-} | ||
function debug | ||
Decorated a with i ::= tree::Decorated a with i | ||
{ | ||
return error("foreign function"); | ||
} foreign { | ||
"java" : return "common.Debug.runDebug(%tree%)"; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package common; | ||
|
||
import java.util.Iterator; | ||
|
||
public class CMDContextVisualization extends ContextVisualization { | ||
private final String printFormat = "%s\n%s\n%s\n"; | ||
protected String border; | ||
|
||
public CMDContextVisualization(String border) { | ||
super(); | ||
|
||
this.border = border; | ||
} | ||
|
||
@Override | ||
public void show() { | ||
// for(NodeContextMessage nodeContextMessage : this.contextStack.iterator()) { | ||
// System.out.printf(this.printFormat, this.border, nodeContextMessage.toString(), this.border); | ||
// } | ||
|
||
Iterator<NodeContextMessage> iterator = this.contextStack.iterator(); | ||
while (iterator.hasNext()) { | ||
NodeContextMessage nodeContextMessage = iterator.next(); | ||
System.out.printf(this.printFormat, this.border, nodeContextMessage.toString(), this.border); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package common; | ||
|
||
// Key intermediate structure of debugging contextualization. | ||
// We push/pop nodes while navigating in Debug.java into this stack. | ||
// A ContextStack is then a member of a SimplifiedContextStack, which | ||
// produces the actual contextualization. | ||
|
||
// ContextStack is fundementally a stack of NodeContextMessage objects. | ||
// Each of these objects represents a record of contextualization | ||
// information we store about a single visited node (only maintain | ||
// those on the path from root to the current node, like a DFS traversal). | ||
|
||
// Wrapped around built-in Java Stack class | ||
// No error handling in current version | ||
|
||
import java.util.Iterator; | ||
import java.util.Stack; | ||
|
||
import javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar; | ||
|
||
public class ContextStack { | ||
|
||
public void push(DecoratedNode n) { | ||
|
||
this.height++; | ||
NodeContextMessage ncm = new NodeContextMessage(n, this.nextIndex++); | ||
this.stack.push(ncm); | ||
} | ||
|
||
public NodeContextMessage pop() { | ||
|
||
this.height--; | ||
this.nextIndex--; | ||
return this.stack.pop(); | ||
} | ||
|
||
public NodeContextMessage peak() { | ||
return this.stack.peek(); | ||
} | ||
|
||
public int getHeight() { | ||
return this.height; | ||
} | ||
|
||
public Iterator<NodeContextMessage> iterator() { | ||
return this.stack.iterator(); | ||
} | ||
|
||
public NodeContextMessage get(int stackIndex) { | ||
|
||
// Index 0 is the bottom of the stack | ||
if (stackIndex >= 0 && stackIndex < this.stack.size()) { | ||
return this.stack.get(stackIndex); | ||
} else { | ||
throw new IndexOutOfBoundsException("Index " + stackIndex + " is out of bounds."); | ||
} | ||
} | ||
|
||
private Stack<NodeContextMessage> stack = new Stack<NodeContextMessage>(); | ||
private int height = 0; | ||
// Used for indices | ||
private int nextIndex = 1; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package common; | ||
|
||
public abstract class ContextVisualization { | ||
protected ContextStack contextStack; | ||
|
||
public ContextVisualization() { | ||
this.contextStack = new ContextStack(); | ||
} | ||
|
||
public void push(DecoratedNode decoratedNode) { | ||
this.contextStack.push(decoratedNode); | ||
} | ||
|
||
public NodeContextMessage pop() { | ||
return this.contextStack.pop(); | ||
} | ||
|
||
public abstract void show(); | ||
|
||
public ContextStack getContextStack() { | ||
return this.contextStack; | ||
} | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debugger-specific files should be moved to
runtime/java/src/common/agnosis/