You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short description
A mechanism to debug or inspect AST properties that were set to the AST after the Statix solver has finished.
Problem description
AST properties can be set by means of the constraint @astNode.prop := value (or +=).
Correspondingly, AST properties can be read using the stx-get-ast-property(|2) strategy from the Statix API for Stratego.
No other interaction with AST properties exists.
In comparison, the entire scope graph after solving can be exported in a human-readable way, in order to inspect scopes, edges and relations.
Describe the solution you'd like
A menu item in the Spoofax > Statix menu which prints the pre-analyzed AST, annotated with the solved properties (and perhaps excluding all the TermIndex annotations to reduce clutter).
Alternatively, a plain list of term indices with property name and values would be sufficient too, but less user-friendly.
Describe alternatives you've considered
Manually attaching a Java debugger.
Common debugging tactics for Statix, such as a try { false } | note $[...]@node constraint. However, AST properties are set-only, and can therefore not be retrieved in a message.
Short description
A mechanism to debug or inspect AST properties that were set to the AST after the Statix solver has finished.
Problem description
AST properties can be set by means of the constraint
@astNode.prop := value
(or+=
).Correspondingly, AST properties can be read using the
stx-get-ast-property(|2)
strategy from the Statix API for Stratego.No other interaction with AST properties exists.
In comparison, the entire scope graph after solving can be exported in a human-readable way, in order to inspect scopes, edges and relations.
Describe the solution you'd like
A menu item in the Spoofax > Statix menu which prints the pre-analyzed AST, annotated with the solved properties (and perhaps excluding all the
TermIndex
annotations to reduce clutter).Alternatively, a plain list of term indices with property name and values would be sufficient too, but less user-friendly.
Describe alternatives you've considered
try { false } | note $[...]@node
constraint. However, AST properties are set-only, and can therefore not be retrieved in a message.Additional context
Original Slack thread: https://slde.slack.com/archives/C7254SF60/p1632562972073600
The text was updated successfully, but these errors were encountered: