An Overview of Algorithm Animation - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

An Overview of Algorithm Animation

Description:

JAWAA Jeliot JHAVE DsCats ANIMAL PAVANE LEONARDO. 1980s. 1990s. 2000s. 19 /46. Sorting out Sorting ... Pavane & Leonardo. Pavane: Developed at Washington ... – PowerPoint PPT presentation

Number of Views:506
Avg rating:3.0/5.0
Slides: 48
Provided by: Carl64
Category:

less

Transcript and Presenter's Notes

Title: An Overview of Algorithm Animation


1
An Overview of Algorithm Animation
  • Xiaocong Zhou
  • Nov. , 2007

2
Outline
  • Basic Concepts
  • Definition and goals of algorithm animation
  • History and Some Important Systems
  • Some features of the system
  • Some snapshots of animations
  • Features of Software Visualization Tools
  • A famous taxonomy are given for showing main
    ideas in the area
  • Further Reading and Resources

3
Basic Concepts
  • What is visualization?
  • The goals of visualization
  • What is software visualization?
  • The goals of software visualization
  • What is algorithm animation?
  • The goals of algorithm animation
  • General Model of Software Visualization
  • Structure and process

4
What is Visualization?
  • Visualization is the process of transforming
    information into a visual form1
  • It enables the scientist or engineer to perceive
    visually the features of information
  • Scientific visualization vs. Information
    visualization
  • Physic data vs. Abstract data
  • Visualization plays a major role in the use of
    computer to support human reasoning
  • Intelligence Amplification vs. Artificial
    Intelligence

1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
5
What is Software Visualization?
  • The visualization of artifacts related to
    software and its development1
  • Visualizing the structure, behavior, and
    evolution of software
  • Software visualization vs. Information
    visualization
  • Static dynamic visualization vs. Static
    visualization
  • The goal of software visualization
  • To help to comprehend software systems
  • To help to improve the productivity of the
    software development process

1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
6
To Visualize Full Life-cycle of Software
  • Software analysis design
  • Translating textual document to graphic model
  • Software Implementation
  • Static data code visualization
  • Pretty printing, visualizing the results of
    static analysis
  • Software debugging testing
  • Visual debugging testing
  • Visualizing the test path
  • Software maintenance
  • Data code animation
  • Visualizing software changes
  • Software visualization and reverse engineering

7
A Narrow Definition of SV
  • Visualization of algorithms and programs2
  • Algorithm visualization
  • Static algorithm visualization
  • Algorithm animation
  • Program visualization
  • Static data visualization code visualization
  • Data animation code animation

2 J. Stasko. Software Visualization. Slides of
a course named information visualization, 2006
8
What is Algorithm Animation?
  • Algorithm visualization vs. Program
    visuali-zation3
  • Algorithm Visualization is the visualization of a
    high-level description of a piece of software
  • Often applied to education
  • Program visualization is the visualization of
    actual implemented codes
  • Often applied to software engineering
  • Static algorithm visualization vs. Algorithm
    animation
  • Algorithm animation is dynamic algorithm
    visualization
  • Dynamic vs. static run or not run the program to
    be visualized

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
9
Sub-areas of Software Visualization
Abstract level
Software Visualization
Static algorithm Visualization
Algorithm Animation
Algorithm Visualization
Static code data Visualization
Code data Animation
Program Visualization
Static
Dynamic
10
Why Do People Animate Algorithm?
  • Different people have different motivations for
    animating algorithms1
  • Understanding and teaching
  • Teachers visualize algorithms to better explain
    them to their students.
  • Design and communication
  • Developers visualize algorithms to better
    communicate the ideas to other experts.
  • Optimization
  • Developers visualize algorithms to better
    understand how they work and find possibilities
    to enhance them.
  • Debugging
  • Programmers use visualizations to find faults in
    their algorithm implementation

1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
11
Why Do We Focus on Algorithm Animation?
  • It is relatively easy to study and implement
  • The structure and behavior of algorithm are clear
  • The scale of algorithm implementations are small
  • Algorithm animation is a pilot study of software
    visualization
  • High-level visualization is easier to understand
  • Software visualization is ultimately required to
    be high-level, since it is used to analysis and
    understand software
  • Many methods and techniques can be extended to
    program visualization
  • The talk focus on algorithm animation but is not
    limited to algorithm animation

12
General Model of Software Visualization
Programmer
Visualizer
Implement
Specify
Interact with
Software to be Visualized
User
Visualization
Mapping
Specify Support
Interaction Support
Rendering Support
Software Visualization (Aid) System
Develop
Developer
13
General Model of Software Visualization
  • Three modules
  • Software to be visualized target software
  • Visualization of the target software
  • Software visualization system helps to develop
    the visualization of the target software
  • A key task
  • Mapping the information of software to visual
    representation, and then generate the
    visualization of the software
  • Four roles
  • Programmer who develops the target software
  • Developer who develops the software visualization
    system
  • Visualizer who specifies how to visualize the
    target software
  • User who interacts with the visualization of the
    target software

14
A Model of Algorithm Animation
  • The specification of mapping forms a visual model
  • Do not give the roles and algorithm animation
    system

1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
15
Visual Model vs. Formal Model
  • Software visualization gives a visual model of
    software
  • Intuitive, easy to understand
  • To help user analyze and understand the software
  • Formal semantics gives a mathematical model of
    software
  • Formal, accurate
  • To help user analysis and verify the software
  • How to combine these two models?
  • Visual verification?
  • Verified visualization?

16
Software Visualization Pipeline
1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
17
The Process of Visualizing
  • Data acquisition
  • Extract and gather relevant data from various
    sources of information about a software system
  • Its source code, its design, user documentation,
    state changes during its execution, test result,
    etc.
  • Analysis
  • Various kinds of analysis can be used to reduce
    the amount of data and to focus on the important
    parts
  • Filtering, static program analysis, or
    statistical methods, etc.
  • Visualization
  • The resulting data is mapped onto a visual model
  • That is, transformed into geometrical and
    graphical information
  • Then is rendered onto the screen or some other
    kind of medium as a single image or series of
    image.

1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
18
History and Some Important Systems
Sorting out Sorting
1980s
BALSA BALSA-II Zeus Zeus3D CAT JCAT
TANGO X-TANGO POLKA POLKA3D
1990s
JAWAA Jeliot JHAVE DsCats ANIMAL PAVANE LEONARDO
2000s
19
Sorting out Sorting
  • 30 minute video produced by Ron Baecker at
    Toronto in 1981
  • Seminal work in area
  • It is often considered as the beginning of the
    research on algorithm animation (and SV)
  • Illustrates and compares nine sorting algorithms
  • Stick view is used to explain the algorithms
  • Insertion sort Linear inserting, binary
    insertion, shell sort
  • Exchange sort bubble sort, shaker sort, and
    quick sort
  • Selection sort straight selection, tree
    selection, heap sort
  • Dot view shows a race of all nine algorithms

20
SoS Views
2 J. Stasko. Software Visualization. Slides of
a course named information visualization, 2006
21
BALSA and Its Offspring
  • BALSA (Brown Algorithm Simulator and Animator)
  • The first well-known computerized system
  • Produced by Marc Brown at Brown University
  • Introduces the concept of Interesting events
  • The relevant actions performed by the algorithm
    that are interesting for visualization purpose4
  • Supports multiple dynamic view
  • Its Offspring
  • BALSA-II (extended with step and break points and
    a number of other features)
  • Zeus, Zeus3D
  • CAT (web-based), JCAT (Java based system)

4 C. Demetrescu, Irene Finocchi, and John T.
Stasko. Specifying Algorithm Visualization
Interesting Events or State Mapping. In S. Diehl
(ed.) Software Visualization, LNCS 2269, pp16-30,
2002
22
Example Animation of BALSA
2 J. Stasko. Software Visualization. Slides of
a course named information visualization, 2006
23
TANGO and Its Offspring
  • TANGO (Transition-based Animation Generation)
  • Produced by J. Stasko at Brown University
  • Actually an interpreter for animation commands
  • The algorithm code can produce commands defined
    in a language called SAMBA.
  • These commands was then fed post-mortem into the
    TANGO interpreter to produce the animation
  • Introduces the path-transition paradigm and
    supported smooth animation
  • URL http//www-static.cc.gatech.edu/gvu/softviz/
  • POLKA (Parallel program-focused Object-Oriented
    Low Key Animation )
  • Supports to animate parallel algorithm

24
Example Animation of TANGO(1)
2 J. Stasko. Software Visualization. Slides of
a course named information visualization, 2006
25
Example Animation of TANGO(2)
1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
26
Example Animation of TANGO(3)
1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
27
Example Animation of TANGO(4)
1 S. Diehl. Software Visualization. Springer,
2007, ISBN 978-3-540-46504-1
28
Pavane Leonardo
  • Pavane Developed at Washington University in
    19923
  • Designed to provide three-dimensional
    visualizations of concurrent programs
  • Visualization is specified in a declarative style
  • The visualizer defines a transformation between
    the state of the algorithm and the final images
  • the properties of a program which are necessary
    to verify are also properties which should be
    visualized
  • Leonardo http//www.dis.uniroma1.it/demetres/Leo
    nardo/
  • An integrated environment for developing,
    executing, and visualizing C programs
  • It supports full reversible execution of C
    programs
  • The latest version will support to run on Windows
  • Visualization is specified by attaching graphical
    representations to key variables in algorithm

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
29
Example Animation of Leonardo(1)
http//www.dis.uniroma1.it/demetres/Leonardo/
30
Example Animation of Leonardo(2)
http//www.dis.uniroma1.it/demetres/Leonardo/
31
Other Systems Examples
  • JAWAA(2003)
  • http//www.cs.duke.edu/csed/jawaa2/
  • DsCats(2002)
  • http//www.cs.arizona.edu/projects/dscats/dscats.h
    tml
  • ALVIS(2002)
  • http//eecs.wsu.edu/veupl/soft/alvis/index.htm
  • MatrixPro(2004)
  • http//www.cs.hut.fi/Research/MatrixPro/
  • Jeliot 3(2004)
  • http//cs.joensuu.fi/jeliot/
  • JHAVE(2000)
  • http//jhave.org/
  • Animal(2002)
  • http//www.animal.ahrgr.de/index.php3
  • The following URLs collect more example
    animations
  • http//www.cs.hope.edu/alganim/ccaa/
  • http//www2.hig.no/algmet/animate.html
  • http//www.animal.ahrgr.de/Anims/animations.php3

The year is not refer to the system development
date but the important publications date
32
Features of Software Visualization Tools
  • A taxonomy is defined to classify SV tools
  • To define a structure of characteristics and
    functionalities of SV systems in a systematic way
  • To show main ideas of SV systems
  • To help visualizer to choose a proper SV tool for
    his own purpose
  • The most well-known taxonomy is proposed by Price
    et al. in 19933
  • I will give the taxonomy in detail, but I do not
    follow it faithfully
  • it is already somewhat outdated and should be
    extended and updated

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
33
Overview of the Taxonomy
5 V. Karavirta. XAAL - Extensible Algorithm
Animation Language. Master's thesis, Department
of Computer Science and Engineering, Helsinki
University of Technology, 2005
34
Six Main Categories
  • Scope
  • What is the range of programs that the SV system
    may take as input for visualization?
  • Content
  • What subset of information about the software is
    really visualized by the SV system?
  • Method
  • How is the visualization specified?
  • Form
  • What are the characteristics of the output of the
    visualization?
  • Interaction
  • How dose the user interact with and control the
    visualization?
  • Effectiveness
  • How well does the visualization communicate
    information to the user?

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
35
Category Scope
  • Generality
  • Platform hardware operating system
  • The early systems often run on a specific
    platform, but today a system should be platform
    independent
  • Language paradigm language
  • Imperative, object-oriented, logic (TPM Prolog),
    functional (KIEL Standard ML)
  • Most popular languages Java, C
  • Application Domain
  • Concurrent distributed (Polka, PAVANE, VADE),
    computational geometry (GeoWin), network protocol
    (Polka-Rc)
  • Scalability
  • Program
  • What is the largest program it can handle?
  • Data Set
  • What is the largest input data set it can handle?

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
36
Category Content
  • Software life-cycle
  • Analysis design, implementation, deployment
  • Information type
  • Software documents, codes, and data
  • Abstraction level
  • Concrete implementation, software model, and
    software property (e.g. invariant)
  • Information focus
  • Static structure focus, run time behavior focus,
    and evolution focus

37
Category Method
  • Event driven and data driven
  • Interesting events and state mapping
  • To Apply to program visualization
  • In particular, to utilize in code and data
    animation
  • How to specify the mapping?
  • Instrument code directly
  • Hard coding, using special editor, and using
    preprocessor
  • Build a pre-defined model for specifying the
    mapping
  • A language is designed for specifying the mapping
  • Automatically choose action or state to be
    animated
  • UPWI (using expert system), Jeliot
    (semi-automated)

38
Category Method (cont.)
  • When to generate the visualization?
  • Live or post-mortem
  • Evaluation of the mapping
  • Intelligence
  • To what degree can the visualization generate
    automatically?
  • Customization
  • To what degree can the user customize the
    visualization?
  • Code Ignorance Allowance
  • how much knowledge of the program code is
    required for generating the visualization?
  • System-Code Coupling
  • How tightly is the visualization system coupled
    with the code?

39
Category Form
  • Medium What is the primary target medium?
  • Paper, film, videotape, or display
  • Currently, the focus is on web deployment
  • Presentation Style What is the general
    appearance of the visualization?
  • Graphic vocabulary
  • Graphical primitives (pixel, line, rectangle,
    etc.)
  • Color, fill style, font
  • Dimension 2D, 3D
  • Animation
  • Sound
  • Zeus and LogoMedia have made effective use of
    sound

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
40
Category Form (cont.)
  • Granularity
  • To what degree does the system present
    coarse-granularity details?
  • Coarse-granularity details mean the visualization
    is abstract
  • Elision
  • To what degree does the system provide facilities
    for eliding information?
  • That is, the user can move between coarse and
    fine granularity
  • Multiple Views
  • For example, stick view and dot view of sorting
    algorithm are showed simultaneously
  • Program Synchronization
  • Comparing the execution speeds of several
    programs by running a race

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
41
Category Interaction
  • Style
  • What method does the user employ to give
    instructions to the system?
  • on-screen buttons, menus, command line
    statements, or scripted programs
  • Navigation
  • Elision Control
  • Elide information or suppress detail
  • Temporal Control
  • Direction forward, backward
  • Speed start, stop, speed control, replay
  • Scripting Facilities
  • Recording and playing back of interactions with
    the visualization

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
42
Category Effectiveness
  • Purpose
  • For what purpose is the system suited?
  • Software engineering, education
  • Appropriateness and Clarity
  • How rapidly do the visual metaphors inspire
    understanding?
  • Empirical Evaluation
  • To what degree has the system been subjected to a
    good experimental evaluation?

3 B. A. Price, R. Baecker, and I. Small. A
Principled Taxonomy of Software Visualization.
Journal of Visual Languages and Computing,
4(3)211-266, 1993
43
Further Reading and Resources
  • Anthology textbook
  • J. T. Stasko, J. Domingue, M. H. Brown, and B. A.
    Price. Software Visualization Programming as a
    Multimedia Experience. MIT Press, 1998
  • S. Diehl, editor. Software Visualization, volume
    2269 of LNCS State-of-the-art Survey. Springer
    Verlag, 2002
  • S. Diehl. Software Visualization. Springer, 2007

44
Further Reading and Resources
  • Related conference
  • ACM Symposium on Software Visualization (SOFTVIS)
  • ACM Annual Conference on Innovation and
    Technology in Computer Science Education (ITiCSE)
  • Program Visualization Workshop (PVW)
  • IEEE Symposium on Visual Language and
    Human-Centric Computing (VL/HCC)
  • IEEE International Workshop on Visualizing
    Software for Understanding and Analysis (VISSOFT)

45
Further Reading and Resources
  • Related Journal
  • IEEE Transactions on Visualization and Computer
    Graphics (TVCG)
  • Journal of Visual Languages and Computing (JVLC)
  • Related People
  • J. Stasko http//www-static.cc.gatech.edu/gvu/sof
    tviz/
  • S. Diehl http//www.st.uni-trier.de/diehl/
  • C. Demetrescu http//www.dis.uniroma1.it/demetre
    s/
  • A. Kerren http//www-hagen.informatik.uni-kl.de/
    kerren/
  • I. Finocchi http//www.dsi.uniroma1.it/finocchi/
  • R. Sedgewick http//www.cs.princeton.edu/rs/
  • V. Karavirta http//www.cs.hut.fi/vkaravir/

46
Reference
  • S. Diehl. Software Visualization. Springer, 2007
  • J. Stasko. Software Visualization. Slides of a
    course named information visualization, 2006
  • B. A. Price, R. Baecker, and I. Small. A
    Principled Taxonomy of Software Visualization.
    Journal of Visual Languages and Computing,
    4(3)211-266, 1993
  • C. Demetrescu, Irene Finocchi, and John T.
    Stasko. Specifying Algorithm Visualization
    Interesting Events or State Mapping. In S. Diehl
    (ed.) Software Visualization, LNCS 2269, pp16-30,
    2002
  • V. Karavirta. XAAL - Extensible Algorithm
    Animation Language. Master's thesis, Department
    of Computer Science and Engineering, Helsinki
    University of Technology, 2005
  • Andreas Kerren and John T. Stasko, Algorithm
    Animation Introduction, In S. Diehl Ed.,
    Software Visualization, LNCS 2269, pp.1-15,
    Springer-Verlag, 2002

47
Comments Suggestions
Write a Comment
User Comments (0)
About PowerShow.com