Abstract Syntax Tree Rendering Noah Brickman CMPS 203.

Slides:



Advertisements
Similar presentations
Kai Xu Middlesex University, UK
Advertisements

Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
H3: Laying Out Large Directed Graphs in 3D Hyperbolic Space Tamara Munzner, Stanford University.
Cushion Treemaps and Botanical Visualization Yimeng Dou
Trees and Cushions Jack van Wijk Eindhoven University of Technology Treemap Workshop, May 31, 2001 HCIL, University of Maryland.
Information Visualization: Trees Chris North cs3724: HCI.
Jun 2, 2014 IAT Trees2 Chapter 3.2 of Spence ______________________________________________________________________________________ SCHOOL OF INTERACTIVE.
Engineering Graphics I
Without these building blocks the principles are meaningless.
Ontology Visualization Methods—A Survey. INTRODUCTION ONTOLOGY DEFINITION purpose of this article : The best method for an ontology.
Compiler Construction Sohail Aslam Lecture IR Taxonomy IRs fall into three organizational categories 1.Graphical IRs encode the compiler’s knowledge.
Tree Drawing Algorithms and Visualization Methods Kai (Kevin) Xu.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Interactive Visualization of Small World Graphs An implementation in prefuse.
1 Presented by Jean-Daniel Fekete. 2  Motivation  Mélange [Elmqvist 2008] Multiple Focus Regions.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Prefuse: A Toolkit for Interactive Information Visualization Jeffrey Heer Stuart K. Card James A. Landay CHI2005.
Tree-Maps: A Space-Filling Approach to the Visualization of Hierarchical Information Structures Brian Johnson Ben Shneiderman (HCIL TR 91-06) Steve Betten.
RingTree Roundabout Exploring Trees Michael Knapp & Werner Bruckner VU Informationsvisualisierung VU Informationsvisualisierung.
1 SIMS 247: Information Visualization and Presentation jeffrey heer Tree Visualization Oct 26, 2005.
Cone Trees and Collapsible Cylindrical Trees
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
SIMS 247: Information Visualization and Presentation jeffrey heer
DEPARTMENT OF COMPUTER SCIENCE SOFTWARE ENGINEERING, GRAPHICS, AND VISUALIZATION RESEARCH GROUP 15th International Conference on Information Visualisation.
Tree-Maps: Visualizing Hierarchical Data Hench Qian & Bill Shapiro September 21, 1999.
14.1 Vis_04 Data Visualization Lecture 14 Information Visualization : Part 2.
Visualization of Graph Data CS 4390/5390 Data Visualization Shirley Moore, Instructor October 6,
Backtracking.
Hidden Surface Removal
Tree Structures (Hierarchical Information) cs5764: Information Visualization Chris North.
Tree-Maps: A Space-Filling Approach to the Visualization of Hierarchical Information Structures Presented by: Daniel Loewus-Deitch.
Oct 7, 2013 IAT Trees2 Chapter 3.2 of Spence ______________________________________________________________________________________ SCHOOL OF INTERACTIVE.
AE4131 ABAQUS Lecture Part IV
Dr. R. Ribeiro, Mechanical Engg. Dept. IITD
H3: Laying Out Large Directed Graphs in 3D Hyperbolic Space Tamara Munzner Stanford University 元智資工所 系統實驗室 楊錫謦 1999/11/3.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Visualization Taxonomies and Techniques Trees and Graphs
Trees. Introduction to Trees Trees are very common in computer science They come in different forms They are used as data representation in many applications.
A Focus+Context Technique Based on Hyperbolic Geometry for Visualizing Large Hierarchies. John Lamping, Ramana Rao, and Peter Pirolli Xerox Palo Alto Research.
VAST 2011 Sebastian Bremm, Tatiana von Landesberger, Martin Heß, Tobias Schreck, Philipp Weil, and Kay Hamacher Interactive-Graphics Systems TU Darmstadt,
Introduction Of Tree. Introduction A tree is a non-linear data structure in which items are arranged in sequence. It is used to represent hierarchical.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Information Visualization –III Treemaps and Fisheye Views.
IAT 814 Trees Chapter 3.2 of Spence ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS +
Implementing Scene Graphs, CSG Trees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, January 26, 2004.
Interacting with Huge Hierarchies: Beyond Cone Trees Jeromy Carriere, Rick Kazman Computer Graphics Lab, Department of Computer Science University of Waterloo,
Coverage Criteria for Testing of Object Interactions in Sequence Diagrams Atanas (Nasko) Rountev Scott Kagan Jason Sawin Ohio State University.
Fall 2002CS/PSY Information Visualization 2 Case Study: Portraying Hierarchies Visualizing hierarchies  Variety of techniques Traditional tree views,
Graph Visualization and Beyond … Anne Denton, April 4, 2003 Including material from a paper by Ivan Herman, Guy Melançon, and M. Scott Marshall.
Mao Lin Huang University of Technology, Sydney, Visual Representations of Data and Knowledge.
Nov 26, 2009 IAT Visualizing Trees ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Hyperbolic Trees A Focus + Context Technique John lamping Ramana Rao Peter Pirolli Joy Mukherjee.
Innovative UI Ideas Marti Hearst SIMS 213, UI Design & Development April 20, 1999.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
Information Visualiation: Trees Chris North cs3724: HCI.
Data Visualization Fall Information Visualization Fall 2015Data Visualization2 Upon now, we dealt with scientific visualization (scivis) Scivis.
Copyright © Curt Hill Other Trees Applications of the Tree Structure.
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
Everything we use has symbols and legends for us to follow. But we would never know what the symbols meant unless we had a Legend. Everything we use has.
Concept sketches are free hand drawings used throughout a project to explore different ideas quickly and efficiently. They are very quick, simple drawings.
IAT 355 Trees2 ______________________________________________________________________________________.
CHAPTER 4 Trees.
Hierarchies (Trees) Definition Examples
cs5984: Information Visualization Chris North
Packages and Interfaces
Quadtrees 1.
Lecture 7: Introduction to Parsing (Syntax Analysis)
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Information Visualization 2 Case Study: Portraying Hierarchies
Presentation transcript:

Abstract Syntax Tree Rendering Noah Brickman CMPS 203

Introduction Programs are hard to visualize. Programs are hard to visualize. ClassView and other tools don’t give a high level view ClassView and other tools don’t give a high level view JavaDoc and similar tools require comment blocks JavaDoc and similar tools require comment blocks Goal: Add a code graphing tool directly to a compiler that will render an AST Goal: Add a code graphing tool directly to a compiler that will render an AST

Related Work Free Code Graphing Project Free Code Graphing Project Not interactive, language specific Not interactive, language specific

Related Work KScope KScope Shows call graph, but not function bodies Does not show grammar based tree

AST Render Process Select a compiler building tool Select a compiler building tool Generate a script with drawing instructions Generate a script with drawing instructions Render script Render script

Compiler Tool CIL (C Intermediate Language) CIL (C Intermediate Language) C analysis tool, Ocaml functions Flex-Bison Flex-Bison Low level, extra programming SableCC SableCC Java code, Builds ASTs

SableCC Open source compiler generating tool Open source compiler generating tool Write grammar file Write grammar file Generates Java code to parse code and build an AST Generates Java code to parse code and build an AST Add main function with utility classes Add main function with utility classes

Script Generation Add code to SableCC files to write script file Add code to SableCC files to write script file Perform tree traversal and write node data Perform tree traversal and write node data Script file contains node data and heirarchy information Script file contains node data and heirarchy information

AST Rendering OGRE (O-O Graphics Rendering Engine) OGRE (O-O Graphics Rendering Engine) Loads script file and reconstruct AST Loads script file and reconstruct AST Renders color coded tree Renders color coded tree Production rules in red Language terminals in blue Variable associations in green

Results - Demo!

Future Work Embed AST script code in SableCC source Embed AST script code in SableCC source Make 3D tree more interactive Make 3D tree more interactive Implement code execution tracing Implement code execution tracing

Alternate Tree Rendering Following slides were made by… Following slides were made by… Dr. Kai Xu University of Sydney

Indented Layout Places all items along vertically spaced rows Places all items along vertically spaced rows Uses indentation to show parent child relationships Uses indentation to show parent child relationships Example: Windows explorer Example: Windows explorer Problems: Problems:  Only showing part of the tree  Bad aspect ratio (not space efficient) But still the most popular one!? But still the most popular one!?

Dendrogram Essentially a layered drawing Essentially a layered drawing  with bended orthogonal edges Layering are done according to the leaves: Layering are done according to the leaves:  All the leaves are on the same layer Now commonly used in bioinformatics to represent Now commonly used in bioinformatics to represent  The result of hierarchical clustering  Phylogenetic trees  More on this in the “biological networks” lecture

Balloon trees A variation of radial layout A variation of radial layout children are drawn in a circle centered at their parents. children are drawn in a circle centered at their parents. Effective on showing the tree structure Effective on showing the tree structure  At the cost of node details

Hyperbolic Tree Simulate the distortion effect of fisheye lens Simulate the distortion effect of fisheye lens  Enlarge the focus and shrink the rest  Focus+context  Interaction technique; can be combined with different layout. 3D hyperbolic tree: 3D hyperbolic tree:  projecting a graph one a sphere produces a similar distortion effect  This example also uses balloon tree drawing.

3D tree visualization - Cone tree Cone trees are a 3D extension of the 2D layered tree drawing method. Cone trees are a 3D extension of the 2D layered tree drawing method.  Parent at the tip of a cone, and its children spaced equally on the bottom circle of the cone  Either horizontal or vertical The extension to 3D does not necessarily means more information can be displayed The extension to 3D does not necessarily means more information can be displayed  Occlusion problem  Couple with interaction is essential  More on this in the “graph visualization evaluation” lecture

Other 3D tree visualizations 3D poly-plane tree visualization 3D poly-plane tree visualization  Put subtrees on planes  arrange these planes in 3D to reduce occlusion  In this example, layered drawing is used within each plane 3D layered tree 3D layered tree  Only one cone  Layers are the parallel circles on the surface  Example: color indicate the layer

Space-filling methods - Treemap Treemap use containment to show the hierarchy. Treemap use containment to show the hierarchy. It partitions the space recursively according to the size of subtrees It partitions the space recursively according to the size of subtrees It is space-efficient compare to node-link diagram It is space-efficient compare to node-link diagram It is effective in showing the leaf nodes; on the other size, it is difficult to see the non-leave nodes It is effective in showing the leaf nodes; on the other size, it is difficult to see the non-leave nodes

Variations of Treemap Cushion treemap Cushion treemap  Use shading to help identify the levels in a treemap Voronoi treemap Voronoi treemap  Similar idea but uses voronoi diagram as partition  The space does not have to be rectangle.

Beamtree A variation of treemap in 3D. A variation of treemap in 3D. Using overlap instead of nesting to show the hierarchy Using overlap instead of nesting to show the hierarchy 3D version: representing each node as a beam 3D version: representing each node as a beam A bigger example A bigger example

Space-filling tree layout Try to use as much screen space as possible Try to use as much screen space as possible Layout a tree according to the recursive partition of the screen space Layout a tree according to the recursive partition of the screen space  The area allocated to a subtree is proportional to its size. A bigger example: nodes A bigger example: nodes  Use all the screen space  Not very effective on showing the tree structure

Other space filling methods - Icicle Trees Edges implied by adjacency and spatial relationship. Edges implied by adjacency and spatial relationship. icicle tree in the infovis toolkit (jean- daniel fekete) icicle tree in the infovis toolkit (jean- daniel fekete)

Information slice and Sunburst Diagrams Information slice Information slice  also a space-filling visualization method.  Radial version of icicle trees.  Node size is proportional to the angle swept by a node. Sunburst Sunburst  With extra focus+context  Details are shown outside or inside the ring

Elastic hierarchies hybrid of node-link diagrams and treemaps hybrid of node-link diagrams and treemaps Using node-link diagram inside a treemap produces lots of crossings Using node-link diagram inside a treemap produces lots of crossings

TreeViewer Visualizes trees in a form that closely resembles botanical trees Visualizes trees in a form that closely resembles botanical trees  The root is the tree stem  Non-leave nodes are branches  Leave nodes are “bulbs” at the end of branches  Example: Unix home directory.

Collapsible Cylindrical Trees Telescope metaphor: A set of nested cylinders Telescope metaphor: A set of nested cylinders  A cylinder is constructed for the children of a node, and it has a smaller radius.  This cylinder is nested and hidden within the cylinder contain the parent  It can be pulled out to the right of theparent cylinder or collapsed as necessary. only one path of the hierarchy is visible at once  represented by a number of ever decreasing cylinders All cylinders of level 1 nodes are shown in a horizontal fashion, like being put on a stick.