Title: Software Visualization
1Software Visualization
- CS 7450 - Information Visualization
- November 14, 2000
2Software Visualization
The use of the crafts of typography, graphic
design, animation, and cinematography with modern
human- computer interaction and computer graphics
technology to facilitate both the human
understanding and effective use of computer
software.Price, Baecker and Small, 98
3Challenge
- Software clearly is abstract data
- Unlike much information visualization, however,
software is often dynamic, thus requiring our
visualizations reflect the time dimension - History views
- Animation
- ...
4Subdomains
- Two main subareas of software visualization
- Program visualization - Use of visualization to
help programmers, coders, developers. Software
engineering focus - Algorithm visualization - Use of visualization to
help teach algorithms and data structures.
Pedagogy focus
5Subareas
- Program Visualization
- Software engineering
- Debugging
- Program analysis
- Systems
- Algorithm Visualization
- Pedagogy
- Systems
- Use in classroom
- Empirical study
6Todays Talk
- This is a very big area, so talk will just give a
flavor of the kinds of techniques and systems
that have been created - Lots of figures
- Some demos and videos
7Program Visualization
- Can be as simple as enhanced views of program
source - Can be as complex as views of the execution of a
highly parallel program, its data structures,
run-time heap, etc.
8Enhanced Code Views
Primarily used as a documentation aid
9SeeSoft System
- Pulled-back, far away view of source code
- Map one line of source to one line of pixels
- Can indicate line indentation, etc.
- Like taping your source code to the wall, walking
far away, then looking back at it
Eick, Steffen and Sumner 92
10System View
15,000 lines of code in 52 files
Video
11Use
- Tracking (typically means mapping this data
attribute to color) - Code modification (when, by whom)
- Bug fixes
- Code coverage or hotspots in tests
- Interactive, can change color mappings, can brush
views, and so on
12Tarantula
- New system that were working on here
- Utilizes SeeSoft code view methodology
- Shows results of tests in a suite
- Helps viewer track down location of faults
13TarantulaView
Demo
14Step Up
- Next step in program visualization is to help
debugging and performance optimization by
visualizing program executions - Data, data structures, run-time heap, memory,
control flow, data flow, hot spots, ...
15Graph Visualization
- Area that weve already studied which is very
important to SV - Graphs pop up everywhere in software
- Common use Visualize a call graph, visualize a
flow chart, ...
16Sample CallGraph View
17FIELD
- Program development and analysis environment with
a wide assortment of different program views - Integrated a variety of UNIX tools
- Utilized central message server architecture in
which tools communicated through message passing
Reiss 90
18FIELD Interface
19Dynamic Call Graph View
On call stack
Currently active
20Class Browser
21Heap View
Color could be When allocated Block size Where
allocated
223D Call Graph
Selected file
Groups of calls
Collapsed file
23PV System
- Used for understanding application and system
behavior for purposes of debugging and tuning - Users look for trends, anomalies, and
correlations - Ran on RISC/6000 workstations using AIX
- Trace-driven, can be viewed on-line or off
Kimelman, Rosenburg and Roth 94
24Different Views
- Hardware-level performance info
- Instruction execution rates, cache utilization,
processor utilization - Operating system level activity
- Context switches, system calls, address space
activity - Communication library level activity
- Message passing, interprocessor communication
- Language run-time activity
- Dynamic memory allocation, parallel loop
scheduling - Application-level activity
- Data structure accesses, algorithm phase
transitions
25Accumulated process times
Call tree
Process run history
Kernel performance stats
26Memory view
Code views
27Utility
- Papers about PV provide a number of specific
examples of how tool was used to help find and
diagnose performance problems - Authors say that one negative is just limitations
of workstation display---need to open and align
lots of windows and that becomes difficult
28Commercial Systems
- A number of commercial program development
environments have begun to incorporate program
visualization tools such as these - Majority are PC-based
- Has not become as wide-spread as I would have
anticipated
29Other Languages
- Can use program visualization techniques to
depict software in other languages - Functional Lisp
- Logical Prolog
- Object-oriented C
30Concurrent Programs
- Understanding parallel programs is even more
difficult than serial - Visualization and animation seem naturals for
illustrating concurrency - Temporal mapping of program execution to
animation becomes critical
Kraemer Stasko 93
31Performance Visualization
- One big aspect in concurrent programs is to
understand how the computation is performing - Where can be speeded up
- Processor utilization
- Message traffic
- ...
32PerformanceViews
Kiviat Diagram
Message traffic
33POLKA
- We developed a system, POLKA, that was designed
to help people build visualizations of concurrent
programs - Used for both program and algorithm visualization
- Used for different programming models message
passing, shared memory threads, ...
Stasko Kraemer 93
34Message Passing Systems
PVM/Conch
Topol, Stasko, Sunderam 98
35Shared Memory Threads
Pthreads
Zhao Stasko 95
36PVaniM
- Visualizing PVM programs on-line
- Must use sampling, not tracing due to sheer
number of events - Shows machine loads, host utilization, memory
used, messages sent, communication patterns, etc.
Topol, Stasko Sunderam 98
37PVaniM
Basic system UI
38Algorithm Visualization
- Learning about algorithms is one of the most
difficult things for computer science students - Very abstract, complex, difficult to grasp
- Idea Can we make the data and operations of
algorithms more concrete to help people
understand them?
39Algorithm Animation
- Common name for area
- Dynamic visualizations of the operations and data
of computer algorithm as it executes - Abstraction is key concept
40Sorting Out Sorting
- Seminal work in area
- 30 minute video produced by Ron Baecker at
Toronto in 1981 - Illustrates and compares nine sorting algorithms
as they run on different data sets
41SoS Views
Video
42Balsa
- First main system in area
- Used in electronic classroom at Brown
- Introduced use of multiple views and interesting
event model
Brown 88
43Example Animation
44Tango
- Added smooth animation to algorithm animation
- Simplification of the design/programming process
(easier programming model and framework) - Formal model of the animation, the
Path-Transition Paradigm
Stasko 90
45Tango
Multiple frames from bubblesort
46Tango Model
- Image, Location, Path, Transition
Location fromloc, toloc Image
ball Path path1, path2 Transition
mover ball AssocRetrieve("ID",
paramvalue) fromloc ImageLoc(ball,
Center) toloc LocCreate(0.4, 0.7) path1
PathMakeType(Clockwise) path2
PathExample(fromloc, toloc, path1) mover
TransCreate(Move, ball, path2) TransPerform(mover
)
Samplecode
47POLKA
- Improved animation design model
- Object-oriented paradigm
- Multiple animation windows
- Much richer visualization/animation capabilities
Stasko Kraemer 93
48POLKA
Demo
49POLKA Model
- Location, AnimObject, Action
- Introduce explicit animation time (frame)
0 1 2 3 4 5 6 7 8 9
t
50POLKA Programming Model
Circle circ Loc loc, center
Action act int len circ new
Circle(this,1, 0.2,0.3, 0.1,"red", 1.0)
circ-Originate(time) center
circ-Where(PART_C) loc new Loc(0.6,
0.5) act new Action("MOVE", center, loc,
20) len circ-Program(time, act) time
Animate(time, len)
51Semantic Zooming
Sorting 5000 elements
View all data
Zoom to first 10
Zoom further
52Polka-3D
- 3-D and VR version of Polka
- Same animation model
- Use third dimension to
- Enhance visual aesthetics
- Portray 3-D data
- Encode more program attributes
- Not sure appropriate for algorithm animation
Stasko Wehrli 93
53POLKA-3D
Quicksort side view Blue dots are as in 2-d
view Colored planes represent exhanges
54Zeus
- Successor to Balsa
- Utilized sound and provided 3D version
- Provided visualizations of many computational
geometry algorithms
Brown 91
55Zeus Animations
Video
56Evaluating Effectiveness
- Do algorithm animations actually help students
learn? - Thats the claim, but unproven
- Conducted a number of empirical studies to answer
question - Compare learning with animation to learning
without - Measuring understanding is difficult
57Results
- Somewhat mixed, but some studies do show benefits
- - Potential for pedagogical aid is there, but
just cant throw animation at algorithm and
expect it to help - Interaction is a key
- Blindly watching algorithm animation not really
helpful - Student must interact with animation and be
engaged - Animations help motivation, can make algorithm
less intimidating
58Current State of SV
- Research continues
- Some use of algorithm animations as pedagogical
aids - Program visualization trickling into commercial
tools
59Whats Needed? (PV)
- Better analysis of what software developers want
and need - Flexible displays providing overview and detail
- Improved tracing/monitoring/analysis capabilities
60Whats Needed? (AA)
- Focus on interactive tools
- Simpler animation construction
- Empirical validation of value
61References
- All referred to papers
- Software Visualization, MIT Press, 1998