Software Software VisualizationVisualization
Maria TkatchenkoMaria Tkatchenko
Nov 8, 2004Nov 8, 2004
Software Software VisualizationsVisualizations As applied to the following tasksAs applied to the following tasks
– project managementproject management– execution tracingexecution tracing– code reviewcode review– structure explorationstructure exploration
Common themesCommon themes– abstractionabstraction– context + overviewcontext + overview– pattern explorationpattern exploration
Papers discussedPapers discussed
Software Visualization in the LargeSoftware Visualization in the Large, Ball and , Ball and Eick,1996Eick,1996
Execution Patterns in Object-Oriented Execution Patterns in Object-Oriented VisualizationVisualization, De Pauw, et.al.,1998, De Pauw, et.al.,1998
Managing Software with New Visual Managing Software with New Visual RepresentationsRepresentations, Chuah and Eick,1997, Chuah and Eick,1997
Program Auralization: Sound Enhancements Program Auralization: Sound Enhancements to the Programming Environmentto the Programming Environment, DiGiano , DiGiano and Baecker,1992and Baecker,1992
3D Representations for Software 3D Representations for Software VisualizationVisualization, Marcus, Feng, Maletic, 2003, Marcus, Feng, Maletic, 2003
Software Visualization in Software Visualization in the Largethe Large
Thomas A. Ball and Thomas A. Ball and Stephen G. Eick, 1996Stephen G. Eick, 1996
OverviewOverview
““Software is invisible”Software is invisible” Four visual representations of Four visual representations of
softwaresoftware– To help software engineers cope To help software engineers cope
with complexitywith complexity Case studies involving different Case studies involving different
development tasksdevelopment tasks
Main GoalsMain Goals
Increasing programmerIncreasing programmer– ProductivityProductivity– EfficiencyEfficiency
Improving program structureImproving program structure Scalable visualizationsScalable visualizations
Visualizing softwareVisualizing software
StructureStructure Run-time behaviorRun-time behavior Code itselfCode itself
Visual representationsVisual representations
Line representationLine representation Pixel representationPixel representation
– Show line as a pixelShow line as a pixel File summary representationFile summary representation
– File as a rectangle, inner time-seriesFile as a rectangle, inner time-series Hierarchical representationHierarchical representation
– Zoomable tree-mapZoomable tree-map
Pixel representationPixel representation
File summary File summary representationrepresentation
Critique (1)Critique (1)
““Hiding system complexity… Hiding system complexity… contributes to low programmer contributes to low programmer productivity”productivity”– Untrue of object-orientedUntrue of object-oriented– Good design, interfaces, Good design, interfaces,
documentation, etc. recover thisdocumentation, etc. recover this IDEs and special purpose tools IDEs and special purpose tools
now deal with the issue identifiednow deal with the issue identified
Critique (2)Critique (2)
Need for textual visualization of a Need for textual visualization of a large system?large system?
Aim may be to condense too Aim may be to condense too much informationmuch information
Good way to visualize non-Good way to visualize non-functional properties of text if functional properties of text if metadata availablemetadata available
Execution Patterns in Object-Execution Patterns in Object-Oriented VisualizationOriented VisualizationWim De Pauw, David Wim De Pauw, David Lorenz, John Vlissides, and Lorenz, John Vlissides, and Mark Wegman.,1998Mark Wegman.,1998
OverviewOverview
Visualizing execution traces of Visualizing execution traces of object-oriented programsobject-oriented programs
Explore at different levels of Explore at different levels of abstractionabstraction
Classification of behavior into Classification of behavior into patternspatterns
Goals of tools:Goals of tools:– Explore structure of executionExplore structure of execution– Find areas to optimizeFind areas to optimize
Current execution Current execution tracingtracing TextualTextual
– Too much detail in outputToo much detail in output– Hard to controlHard to control
OO visualization systemsOO visualization systems– Microscopic – sequence of message Microscopic – sequence of message
sendssends– Macroscopic - cumulativeMacroscopic - cumulative
Very difficult to scaleVery difficult to scale
Execution pattern viewExecution pattern view
Observe any part of the programs Observe any part of the programs execution at various levels of detailexecution at various levels of detail– Detail on demandDetail on demand
Detect and present generalized Detect and present generalized patterns of executionpatterns of execution– Pattern subsumes many parts of the Pattern subsumes many parts of the
tracetrace Figure from paperFigure from paper
Interaction diagram Interaction diagram vs. execution patternvs. execution pattern
Useful featuresUseful features
Collapsing/expanding subtreesCollapsing/expanding subtrees More clear notation for interaction More clear notation for interaction
diagramsdiagrams Easy change in level of abstraction Easy change in level of abstraction
and viewand view Detection and collapsing of Detection and collapsing of
repetitionsrepetitions Tree operationsTree operations
– FlatteningFlattening– OverlayingOverlaying
FlatteningFlattening
Pattern detectionPattern detection
Not only reduces clutter, but Not only reduces clutter, but makes things explicitmakes things explicit
Similar vs. identicalSimilar vs. identical– Automatic pattern detection Automatic pattern detection
importantimportant– The slight differences often not that The slight differences often not that
important to the programmerimportant to the programmer Pattern matchingPattern matching
– AutomaticAutomatic– Tools for programmer to express Tools for programmer to express
similaritysimilarity
PatternsPatterns
IdentityIdentity Class Identity ***Class Identity *** Message StructureMessage Structure Depth-LimitingDepth-Limiting Repetition ***Repetition *** Polymorphism ***Polymorphism *** AssociativityAssociativity Commutativity ***Commutativity ***
Experimental resultsExperimental results
Uncover unexpected behaviorUncover unexpected behavior Help understand unfamiliar codeHelp understand unfamiliar code Improve performanceImprove performance
ContributionsContributions
Intuitive and scalable metaphorIntuitive and scalable metaphor Generalization of similar Generalization of similar
execution patternsexecution patterns Execution patterns allow to Execution patterns allow to
characterize system complexitycharacterize system complexity
Critique (1)Critique (1)
Collapsing of repetition is a great Collapsing of repetition is a great ideaidea– Use for design as well as analysisUse for design as well as analysis
Good use of the OO programming Good use of the OO programming principles and metaphorprinciples and metaphor
Learning curve for distinguishing Learning curve for distinguishing patterns and classespatterns and classes
Critique (2)Critique (2)
How often large-scale vs. local How often large-scale vs. local exploration of execution is exploration of execution is performedperformed
Library of patternsLibrary of patterns– Instead of language to express Instead of language to express
similaritysimilarity– How much can be captured with How much can be captured with
common patterns?common patterns?– Non-standard execution patternsNon-standard execution patterns
Managing Software with Managing Software with New Visual New Visual RepresentationsRepresentationsMei C. Chuah, Stephen Mei C. Chuah, Stephen G. Eick, 1997G. Eick, 1997
OverviewOverview
Managing: tracking and Managing: tracking and scheduling many resourcesscheduling many resources– Need a way to represent each oneNeed a way to represent each one
Way to view time-oriented Way to view time-oriented informationinformation
Glyphs to view summariesGlyphs to view summaries– Combinations of established viewsCombinations of established views– Interpret by prior knowledgeInterpret by prior knowledge
Issues in Project Data Issues in Project Data Management (1)Management (1) TimeTime
– Deadline, milestonesDeadline, milestones Large data volumesLarge data volumes
– UnstructuredUnstructured– Partition data and management Partition data and management
responsibilities hierarchicallyresponsibilities hierarchically
Issues in Project Data Issues in Project Data Management (2)Management (2) Diversity/varietyDiversity/variety
– Resources and their attributesResources and their attributes– Flexible visual representationsFlexible visual representations
Data <-> “real-world” Data <-> “real-world” correspondencecorrespondence– Data element to real-world entityData element to real-world entity– Glyphs group properties of a data Glyphs group properties of a data
element visuallyelement visually
Time-oriented Time-oriented informationinformation Traditional:Traditional:
– AnimationAnimation– Time-series plotTime-series plot
Variation on time-series plotVariation on time-series plot– TimeWheelTimeWheel– 3D-Wheel3D-Wheel
Show trendsShow trends
TimeWheel (1)TimeWheel (1)
Each object attribute a time-Each object attribute a time-seriesseries
Individual time-series laid out Individual time-series laid out around a circlearound a circle
Preattentively pick out objectsPreattentively pick out objects Small multiples show:Small multiples show:
– General trendGeneral trend– divergencesdivergences
TimeWheel (2)TimeWheel (2)
TimeWheel (4)TimeWheel (4)
Advantages over linear:Advantages over linear:– Reduce number of eye movementsReduce number of eye movements– Less susceptible to local patternsLess susceptible to local patterns– No ordering implication from readingNo ordering implication from reading– Higher information densityHigher information density
3D-Wheel (1)3D-Wheel (1)
Same as TimeWheel, use height Same as TimeWheel, use height to encode timeto encode time
Dominant time trend through Dominant time trend through shapeshape
Common problem of occlusionCommon problem of occlusion– Hard to identify divergences from Hard to identify divergences from
trendtrend
3D-Wheel (2)3D-Wheel (2)
InfoBug (1)InfoBug (1)
InteractiveInteractive Use animation to show at Use animation to show at
different times within the projectdifferent times within the project Small footprintSmall footprint Preattentive patternsPreattentive patterns
InfoBug (2)InfoBug (2)
InfoBug (3)InfoBug (3)
Glyph:Glyph:– Head – code types in componentHead – code types in component– Wings - # lines of code vs. # errorsWings - # lines of code vs. # errors– Body – size of componentsBody – size of components– Tail - # lines added and deleted, to Tail - # lines added and deleted, to
fix errors or add functionalityfix errors or add functionality
CritiqueCritique
Glyph seems like a good idea, but too Glyph seems like a good idea, but too complicated at timescomplicated at times– TailTail– Hard to compare when scaled downHard to compare when scaled down
Circular time-data looks good for Circular time-data looks good for patternspatterns
Would be nice to see used with a Would be nice to see used with a number of different systems, compare number of different systems, compare patternspatterns
Program Auralization: Program Auralization: Sound Enhancements to Sound Enhancements to the Programming the Programming EnvironmentEnvironment Christopher Christopher J. DiGiano and Ronald M. J. DiGiano and Ronald M. Baecker,1992Baecker,1992
OverviewOverview
Use of sound in a programming Use of sound in a programming environment, not in a specific environment, not in a specific applicationapplication
Auralization: use of non-speech Auralization: use of non-speech audio for supporting the audio for supporting the understanding and effective use understanding and effective use of computer programsof computer programs
Benefits of soundBenefits of sound
New channelNew channel– Don’t add clutter to visual displayDon’t add clutter to visual display– directionlessdirectionless
Varied across up to 20 Varied across up to 20 dimensionsdimensions
Logarithmic natureLogarithmic nature Already familiar with its meaningAlready familiar with its meaning
Program taxonomyProgram taxonomy
ExecutionExecution– Behaviour of a programBehaviour of a program
ReviewReview– ModulesModules– keywordskeywords
PreparationPreparation– Syntactic structureSyntactic structure
Execution (1)Execution (1)
Info about behaviour of the Info about behaviour of the programprogram– VariablesVariables– Internal state, control flowInternal state, control flow
Trend detectionTrend detection Can represent:Can represent:
– Values – data flowValues – data flow– Events – control flowEvents – control flow
Execution (2)Execution (2)
Classifications for values and Classifications for values and eventsevents– Common – typical structuresCommon – typical structures– Arbitrary – unpredictable elementsArbitrary – unpredictable elements– Internal – internal stateInternal – internal state
ValuesValues– Map to many sound dimensionsMap to many sound dimensions
EventsEvents– Patterns or “melodies” usefulPatterns or “melodies” useful
ReviewReview
Interactive exploration of codeInteractive exploration of code– Modules, keywordsModules, keywords
Alternative to indentation, code Alternative to indentation, code style,..style,..
Use “audio landmarks” to mark Use “audio landmarks” to mark important segmentsimportant segments
Recognize patterns when scrollingRecognize patterns when scrolling
PreparationPreparation
Syntactic structureSyntactic structure StagesStages
– Entering a programEntering a program– CompilationCompilation
Loop exampleLoop example– ScopeScope– scalabilityscalability
Critique (1)Critique (1)
Interesting, yet-unexplored ideaInteresting, yet-unexplored idea Definitely would have benefited Definitely would have benefited
from presenting a user studyfrom presenting a user study Useful for pattern recognitionUseful for pattern recognition Hard to convince that it’s good for Hard to convince that it’s good for
anything but highest-level overviewanything but highest-level overview Utility for monitoring background Utility for monitoring background
activitiesactivities
Critique (2)Critique (2)
Enhancement to visual, couldn’t Enhancement to visual, couldn’t replacereplace
No scalabilityNo scalability Couldn’t follow execution real-Couldn’t follow execution real-
timetime Workspace issuesWorkspace issues Real-life examples?Real-life examples?
3D Representations for 3D Representations for Software VisualizationSoftware VisualizationAndrian Marcus, Louis Andrian Marcus, Louis Feng, Jonathan I. Feng, Jonathan I. Maletic, 2003Maletic, 2003
OverviewOverview
Tool using 3D, texture, .. to represent Tool using 3D, texture, .. to represent multiple attributes in one viewmultiple attributes in one view
Visualization of large-scale software Visualization of large-scale software to assist in comprehension and to assist in comprehension and analysisanalysis
Categorize info to display important Categorize info to display important info more efficientlyinfo more efficiently
Visualization front-end, independent Visualization front-end, independent of source of dataof source of data
Dimensions of interestDimensions of interest
Tasks – why visualizeTasks – why visualize Audience – usersAudience – users Target – data sourceTarget – data source Representation – how to show Representation – how to show
datadata Medium – where displayedMedium – where displayed
Features (1)Features (1)
Separate visualization from data Separate visualization from data collectioncollection
Manipulation on a per-element basisManipulation on a per-element basis Users can develop own visualization Users can develop own visualization
metaphors based on tasksmetaphors based on tasks Function similar to another tool done Function similar to another tool done
7 years prior7 years prior
Features (2)Features (2)
Visual front-end – can be used Visual front-end – can be used with output of many analysis toolswith output of many analysis tools
Certain elements only suitable for Certain elements only suitable for certain data typescertain data types
Support for user needsSupport for user needs
Overview ***Overview *** ZoomZoom FilterFilter Details-on-demandDetails-on-demand Relate ***Relate *** HistoryHistory ExtractExtract
CritiqueCritique
Propose to develop a stereoscopic Propose to develop a stereoscopic display – not practical? display – not practical?
Visual elements only suitable for Visual elements only suitable for certain data – guidance to users?certain data – guidance to users?
Core components designed as an Core components designed as an application frameworkapplication framework– Extend with new mappings and Extend with new mappings and
visual elementsvisual elements
ConclusionsConclusions
Applying visualization to various Applying visualization to various aspects of software engineeringaspects of software engineering
Various channels - visual, audioVarious channels - visual, audio Building on existing ideasBuilding on existing ideas User studies and community User studies and community
acceptance?acceptance?