Advanced

DrAST - An attribute debugger for JastAdd

Lindholm, Joel LU and Thorsberg, Johan LU (2016) In LU-CS-EX 2016-10 EDA920 20152
Department of Computer Science
Abstract (Swedish)
Here we present a solution for debugging compilers that use abstract-syntax trees as their internal structure. The solution focuses on capturing one specific state of the compilation process, and should not be confused with the more known step-by-step debugging. The goal is to visualize the current state of the abstract-syntax tree and present its data to the user in an intuitive and interactive way. We believe that deeper understanding of an abstract-syntax tree, and bugs in its structure, can be achieved by visualization of the tree. Few such debuggers exist today however, but with this master thesis we aim to fill this gap.

The main feature of the developed tool DrAST is the ability to visualize the abstract-syntax tree. It is also... (More)
Here we present a solution for debugging compilers that use abstract-syntax trees as their internal structure. The solution focuses on capturing one specific state of the compilation process, and should not be confused with the more known step-by-step debugging. The goal is to visualize the current state of the abstract-syntax tree and present its data to the user in an intuitive and interactive way. We believe that deeper understanding of an abstract-syntax tree, and bugs in its structure, can be achieved by visualization of the tree. Few such debuggers exist today however, but with this master thesis we aim to fill this gap.

The main feature of the developed tool DrAST is the ability to visualize the abstract-syntax tree. It is also possible to filter the tree, so that only nodes of interest are visualized, while the rest are gathered in what we call clusters. Further, DrAST can display attributes, draw references between nodes, calculate parameterized attributes and is built for further extension.

DrAST mainly debugs compilers created in the attribute-grammar-based system JastAdd. By the use of Java reflection and annotations from the JastAdd system, the debugger is able to extract the abstract-syntax tree from a compiler without knowing the specific grammar.

In short, DrAST provides a new solution in compiler debugging which can be of use for both students and professionals. (Less)
Please use this url to cite or link to this publication:
author
Lindholm, Joel LU and Thorsberg, Johan LU
supervisor
organization
course
EDA920 20152
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
debugger, compiler, reflection, Java, JastAdd, attribute grammar, visualization, interactive
publication/series
LU-CS-EX 2016-10
report number
LU-CS-EX 2016-10
ISSN
1650-2884
language
English
id
8871529
date added to LUP
2016-04-26 14:23:06
date last changed
2016-04-26 14:23:06
@misc{8871529,
  abstract     = {Here we present a solution for debugging compilers that use abstract-syntax trees as their internal structure. The solution focuses on capturing one specific state of the compilation process, and should not be confused with the more known step-by-step debugging. The goal is to visualize the current state of the abstract-syntax tree and present its data to the user in an intuitive and interactive way. We believe that deeper understanding of an abstract-syntax tree, and bugs in its structure, can be achieved by visualization of the tree. Few such debuggers exist today however, but with this master thesis we aim to fill this gap.

The main feature of the developed tool DrAST is the ability to visualize the abstract-syntax tree. It is also possible to filter the tree, so that only nodes of interest are visualized, while the rest are gathered in what we call clusters. Further, DrAST can display attributes, draw references between nodes, calculate parameterized attributes and is built for further extension. 

DrAST mainly debugs compilers created in the attribute-grammar-based system JastAdd. By the use of Java reflection and annotations from the JastAdd system, the debugger is able to extract the abstract-syntax tree from a compiler without knowing the specific grammar. 

In short, DrAST provides a new solution in compiler debugging which can be of use for both students and professionals.},
  author       = {Lindholm, Joel and Thorsberg, Johan},
  issn         = {1650-2884},
  keyword      = {debugger,compiler,reflection,Java,JastAdd,attribute grammar,visualization,interactive},
  language     = {eng},
  note         = {Student Paper},
  series       = {LU-CS-EX 2016-10},
  title        = {DrAST - An attribute debugger for JastAdd},
  year         = {2016},
}