• Aucun résultat trouvé

Software Visualization

N/A
N/A
Protected

Academic year: 2022

Partager "Software Visualization"

Copied!
30
0
0

Texte intégral

(1)

Software Visualization

CS 7450 - Information Visualization March 23, 2004

John Stasko

“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.”

Software Visualization

• Definition

(2)

2

Spring 2004 CS 7450 3

Challenge

• 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

...

Spring 2004 CS 7450 4

Subdomains

• 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

(3)

Spring 2004 CS 7450 5

Subareas

Program Visualization

Software engineering

Debugging

Program analysis

Systems

Algorithm Visualization

Pedagogy

Systems

Use in classroom

Empirical study

Today’s 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

(4)

4

Spring 2004 CS 7450 7

Program 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.

Spring 2004 CS 7450 8

Enhanced Code Views

Primarily used as a documentation aid

(5)

Spring 2004 CS 7450 9

SeeSoft 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 IEEE ToSE ‘92

System View

15,000 lines of code in 52 files

(6)

6

Spring 2004 CS 7450 11

Use

• Tracking (typically means mapping this data attribute to color)

Code modification (when, by whom)

Bug fixes

Code coverage or hotspots

• Interactive, can change color mappings, can brush views, and so on

Spring 2004 CS 7450 12

Tarantula

• New system that we’re working on here

• Utilizes SeeSoft code view methodology

• Takes results of test suite run and helps developer find program faults

• Clever color mapping is the key

Eagan, Harrold, Jones & Stasko InfoVis ‘01

(7)

Spring 2004 CS 7450 13

Tarantula View

Demo

Stepping 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, ...

(8)

8

Spring 2004 CS 7450 15

Graph Visualization

• Area that we’ve already studied which is very important to SV

• Graphs pop up everywhere in software

• Common use: Visualize a call graph, visualize a flow chart, ...

Spring 2004 CS 7450 16

Sample CallGraph View

(9)

Spring 2004 CS 7450 17

FIELD

• 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

Software Pract & Exp ‘90

FIELD Interface

(10)

10

Spring 2004 CS 7450 19

Dynamic Call Graph View

Currently active On call

stack

Spring 2004 CS 7450 20

Class Browser

(11)

Spring 2004 CS 7450 21

Heap View

Color could be When allocated Block size

Where allocated

3D Call Graph

Selected file Groups of calls

(12)

12

Spring 2004 CS 7450 23

PV 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 Visualization ‘94

Spring 2004 CS 7450 24

Different 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

(13)

Spring 2004 CS 7450 25

Call tree

Accumulated process times

Process run history Kernel

performance stats

Code

Memory view

(14)

14

Spring 2004 CS 7450 27

Utility

• 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

Spring 2004 CS 7450 28

Commercial 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

(15)

Spring 2004 CS 7450 29

Other Languages

• Can use program visualization techniques to depict software in other languages

Functional: Lisp

Logical: Prolog

Object-oriented: C++

Concurrent 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

(16)

16

Spring 2004 CS 7450 31

POLKA

• 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 JPDC ‘93

Spring 2004 CS 7450 32

Message Passing Systems

PVM/Conch

Topol, Stasko, Sunderam IJPDSN ‘98

(17)

Spring 2004 CS 7450 33

Shared Memory Threads

Zhao & Stasko TR ‘95

Pthreads

PVaniM

• 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.

(18)

18

Spring 2004 CS 7450 35

PVaniM

Basic system UI

Spring 2004 CS 7450 36

Algorithm 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?

(19)

Spring 2004 CS 7450 37

Algorithm Animation

• Common name for area

• Dynamic visualizations of the operations and data of computer algorithm as it executes

Abstraction is key concept

Sorting 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

(20)

20

Spring 2004 CS 7450 39

SoS Views

Video

Spring 2004 CS 7450 40

Balsa

First main system in area

Used in “electronic classroom” at Brown

Introduced use of multiple views and interesting event model

M. Brown Computer ‘88

(21)

Spring 2004 CS 7450 41

Example Animation

Tango

• Added smooth animation to algorithm animation

• Simplification of the design/programming process (easier programming model and framework)

• Formal model of the animation, the Path-

(22)

22

Spring 2004 CS 7450 43

Multiple frames from bubblesort

Tango

Spring 2004 CS 7450 44

POLKA

• Improved animation design model

• Object-oriented paradigm

• Multiple animation windows

• Much richer visualization/animation capabilities

Stasko & Kraemer JPDC ‘93

(23)

Spring 2004 CS 7450 45

POLKA

Demo

POLKA Model

• Location, AnimObject, Action

• Introduce explicit animation time (frame) t 0 1 2 3 4 5 6 7 8 9

(24)

24

Spring 2004 CS 7450 47

Semantic Zooming

Sorting 5000 elements

View all data Zoom to first 10% Zoom further

Spring 2004 CS 7450 48

Stasko & Wehrli VL ‘93

Polka-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

(25)

Spring 2004 CS 7450 49

POLKA-3D

Quicksort side view

Blue dots are as in 2-d view Colored planes

represent exhanges

Zeus

• Successor to Balsa

• Utilized sound and provided 3D version

• Provided visualizations of many computational geometry algorithms

(26)

26

Spring 2004 CS 7450 51

Zeus Animations

Video

Spring 2004 CS 7450 52

Evaluating Effectiveness

• Do algorithm animations actually help students learn?

That’s the claim, but unproven

• Conducted a number of empirical studies to answer question

Compare learning with animation to learning without

Measuring understanding is difficult

(27)

Spring 2004 CS 7450 53

Results

Somewhat mixed, but some studies do show benefits

-> Potential for pedagogical aid is there, but just can’t 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

Current State of SV

• Research continues…

• Some use of algorithm animations as pedagogical aids

• Program visualization trickling into commercial tools

(28)

28

Spring 2004 CS 7450 55

What’s Needed? (PV)

• Better analysis of what software developers want and need

• Flexible displays providing overview and detail

• Improved tracing/monitoring/analysis capabilities

Spring 2004 CS 7450 56

What’s Needed? (AA)

• Focus on interactive tools

• Simpler animation construction

• Empirical validation of value

(29)

Spring 2004 CS 7450 57

Deliverables

• Due next Tuesday

HW6

Two hardcopies Email to Jeremy

Project midterm report Two hardcopies

Upcoming

• Evaluation

Reading Kobsa

• Guest lecture

10:45am TSRB auditorium

No class at regular time

(30)

30

Spring 2004 CS 7450 59

References

• All referred to papers

• Software Visualization, MIT Press, 1998

Références

Documents relatifs

For data processing systems benchmarking, visual analytics performance can include (1) metrics of the indication of uncertainty in intermediate results, (2) bounds on time until

- We perform tracing and analysis on many pieces of software to get useful static and dynamic information.. - We study how software was designed and its behavior at runtime

Focusing on activity paradigm in developing a software system could help the developer in creating such conditions, so that the user’s tasks (the user in this case

Le document La tuberculose au Canada 2013 – Prédiffusion offre un aperçu initial du nombre préliminaire de cas de tuberculose active déclarés (nouveaux cas et cas de

Ce qu’il y a lieu d’envisager pour le futur, c’est que les rapports entre le maître et l’élève et entre les élèves eux-mêmes puissent s’exercer dans le sens d’une

The lower bounds of Section 3 are based on the “trace method.” This method was recently used in [10, 11] to lower bound the dimension of shifted partial derivatives of a

The stable structures and melting properties of ion clouds in isotropic octupole traps are inves- tigated using a combination of semi-analytical and numerical models, with a

Tollis, Graph Drawing: Algorithms for the Visualization of Graphs.?. Spring 2004 CS