Interactive Software Maps for Web-Based Source Code Analysis Daniel - - PowerPoint PPT Presentation

interactive software maps for web based source code
SMART_READER_LITE
LIVE PREVIEW

Interactive Software Maps for Web-Based Source Code Analysis Daniel - - PowerPoint PPT Presentation

Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger ( a ) Benjamin Wasty ( b ) umper ( a ) ollner ( a ) Jonas Tr J urgen D ( a ) Hasso-Plattner-Institut , University of Potsdam, Germany ( b ) Software Diagnostics


slide-1
SLIDE 1

Interactive Software Maps for Web-Based Source Code Analysis

Daniel Limberger (a) Benjamin Wasty (b) Jonas Tr¨ umper (a) J¨ urgen D¨

  • llner (a)

(a) Hasso-Plattner-Institut, University of Potsdam, Germany (b) Software Diagnostics GmbH, Potsdam, Germany

slide-2
SLIDE 2

Agenda

Concept & Design 3D Software Maps Data Provisioning Rendering Details

2 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-3
SLIDE 3

CONCEPT & DESIGN

slide-4
SLIDE 4

Software Visualization in Software-Engineering Processes

Software Visualization

The visualization of artifacts related to software and its development process (a wide definition).1

Providing pictures of abstract objects, their attributes and relations, within a context.

1 Diehl, S. 2007. Software Visualization

4 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-5
SLIDE 5

Motivation of Software Visualization

Problem: Increasing size of software-projects results in management overhead. Companies struggle with essential information gaps between management and development. Server

Code

Collaboration Platforms ... Source Design Target Design Report

Decision Making & Code Transformation Code Decay

Software visualization can reduce those information gaps.

5 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-6
SLIDE 6

Motivation of Software Visualization

Problem: Increasing size of software-projects results in management overhead. Companies struggle with essential information gaps between management and development. Server

Code

Collaboration Platforms ... Source Design Target Design Report

Decision Making & Code Transformation Verification Assessment Code Decay Software Maps Metrics

Software visualization can reduce those information gaps.

6 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-7
SLIDE 7

Aspects on Integrating Software Visualization Aspects for introducing software visualization to software-engineering processes:

Identification of use cases that benefit from SoftVis. Development of the visualization concept itself. Elicitation of required information. Selection of appropriate rendering and interaction techniques. Provisioning of the visualization.

7 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-8
SLIDE 8

Provisioning of Software Visualizations to Software-Engineering Processes

Integration

into preexisting tool sets without imposing usage overhead.

Customization

to project specific process, requirements, and constraints.

Teaching

developers and managers how to use, read, and interpret the visualization.

8 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-9
SLIDE 9

Provisioning of Software Visualizations to Software-Engineering Processes

Integration

into preexisting tool sets without imposing usage overhead.

Customization

to project specific process, requirements, and constraints.

Teaching

developers and managers how to use, read, and interpret the visualization.

9 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-10
SLIDE 10

Provisioning of Software Visualizations to Software-Engineering Processes

Integration

into preexisting tool sets without imposing usage overhead.

Customization

to project specific process, requirements, and constraints.

Teaching

developers and managers how to use, read, and interpret the visualization.

10 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-11
SLIDE 11

Provisioning of Software Visualizations to Software-Engineering Processes

Integration

into preexisting tool sets without imposing usage overhead.

Customization

to project specific process, requirements, and constraints.

Teaching

developers and managers how to use, read, and interpret the visualization.

11 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-12
SLIDE 12

3D SOFTWARE MAPS

slide-13
SLIDE 13

Structure of a Software Map

Height Color Module Area Item Layout

A software map links a rectangular 2.5D-Treemap with a software system structure and software metrics mapped to visual variables (i.e., height, area, and color).

13 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-14
SLIDE 14

AREA MAPPED

slide-15
SLIDE 15

HEIGHT MAPPED

slide-16
SLIDE 16

COLOR MAPPED

slide-17
SLIDE 17

DIFF MAPPED

slide-18
SLIDE 18

Perspectives and Dashboards

Perspectives specify a mapping of attributes to visual variables.

Dashboards communicate relevance and context for software maps.

18 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-19
SLIDE 19
slide-20
SLIDE 20

DATA PROVISIONING

slide-21
SLIDE 21

Considerations on Data Provisioning Visualization should not interfere with its exploratory nature: Fast client-side initialization times. Interactive frame rates, even with large software maps. Considerations for software maps on web clients: Well known geometry structure. Alternatives for triangle based streaming? Use of perspectives reduces number of layout changes. Without any geometry rendered, no source code related information is required.

21 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-22
SLIDE 22

Considerations on Data Provisioning Visualization should not interfere with its exploratory nature: Fast client-side initialization times. Interactive frame rates, even with large software maps. Considerations for software maps on web clients: Well known geometry structure. Alternatives for triangle based streaming? Use of perspectives reduces number of layout changes. Without any geometry rendered, no source code related information is required.

22 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-23
SLIDE 23

Report, Hierarchy and Geometry Data

Report 1

JSON structure. Meta information like project name, number of items, authors, revisions, the name of the perspective, metric names and explanations, ids of all labeled items and modules. Hierarchy part of the top items per metric.

Geometry 2

Binary AJAX request (Array-Buffer). Pre-layouted 2D bounding boxes. Attributes color, diff threshold, height. Not required: id, normal, binary height.

Hierarchy 3

JSON structure Remaining Hierarchy

Note: we choose to decode geometry data and retrieve vertex attribute arrays on the client.

23 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-24
SLIDE 24

Report, Hierarchy and Geometry Data

Report 1

JSON structure. Meta information like project name, number of items, authors, revisions, the name of the perspective, metric names and explanations, ids of all labeled items and modules. Hierarchy part of the top items per metric.

Geometry 2

Binary AJAX request (Array-Buffer). Pre-layouted 2D bounding boxes. Attributes color, diff threshold, height. Not required: id, normal, binary height.

Hierarchy 3

JSON structure Remaining Hierarchy

Note: we choose to decode geometry data and retrieve vertex attribute arrays on the client.

24 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-25
SLIDE 25

Report, Hierarchy and Geometry Data

Report 1

JSON structure. Meta information like project name, number of items, authors, revisions, the name of the perspective, metric names and explanations, ids of all labeled items and modules. Hierarchy part of the top items per metric.

Geometry 2

Binary AJAX request (Array-Buffer). Pre-layouted 2D bounding boxes. Attributes color, diff threshold, height. Not required: id, normal, binary height.

Hierarchy 3

JSON structure Remaining Hierarchy

Note: we choose to decode geometry data and retrieve vertex attribute arrays on the client.

25 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-26
SLIDE 26

RENDERING DETAILS

slide-27
SLIDE 27

Vertex Attribute Arrays

WebGL limited to GLushort vertices requiring chunked drawing: 20 vertices with attributes, 30 indices per box yields 3276 modules and items per draw call.

X1 Y1 Z1 X4 Y4 Z4 X7 Y7 Z7 X2 I0 I0 I0 I0 R0 R0 R0 R0 G0 G0 G0 G0 B0 B0 B0 B0 T0 T0 T0 T0 Y2 Z2

Vertex X

float32

Vertex Y

float32

Vertex Z

float32

ID

uint24

Color

3 × uint8

Threshold

uint16

Box Attributes Const Vertex Attributes Face Vertices Normal

uint8

Binary Height

uint8 1 1 1 1 1 1

  • X Face
  • Z Face

+X Face +Z Face +Y Face

  • X Face

Box 0 Box 1 ...

constant index array two static arrays (constant vertex attributes)

normal as face attribute per-face binary height per-vertex

chunk specific attribute arrays

vertex ID per-box color per-box threshold per-box

27 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-28
SLIDE 28

Encoding Normals

Axis aligned, five-sided boxes only require five distinct normals.

Encoded by indices:

±2 → ±x, ±1 → ±z, and 0 → +y.

Efficient normal decoding without branching:

1

vec3 decodeNormal(in float i)

2

{

3

i -= 2; // i assumed to be scaled in [0,4]

4

float a = sign(i);

5 6

return vec3(i - a, 1 - a * a, 2 * a - i);

7

} Note: no dynamic access to constant arrays within shaders is possible in WebGL. 28 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-29
SLIDE 29

Encoding Normals

Axis aligned, five-sided boxes only require five distinct normals.

Encoded by indices:

±2 → ±x, ±1 → ±z, and 0 → +y.

Efficient normal decoding without branching:

1

vec3 decodeNormal(in float i)

2

{

3

i -= 2; // i assumed to be scaled in [0,4]

4

float a = sign(i);

5 6

return vec3(i - a, 1 - a * a, 2 * a - i);

7

} Note: no dynamic access to constant arrays within shaders is possible in WebGL. 29 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-30
SLIDE 30

Stylization for Enhanced Perception

a b c d

Composition of various deferred, image-based enhancements: Shading with light from camera, with fixed altitude. Ambient occlusion or unsharp masking the depth. Edge enhancements. In progress: hybrid rendering

30 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-31
SLIDE 31

Wrap Up

Server

Code

Collaboration Platforms ... Source Design Target Design Report

Decision Making & Code Transformation Verification Assessment Code Decay Software Maps Metrics

Software Maps for code analysis in collaboration platforms. Provisioning of the visualization (integration, customization, teaching). Provisioning of the data (separation of hierarchy and geometry). Client data decoding and efficient rendering using WebGL

31 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-32
SLIDE 32

More Details within the full Paper

Image enhancements aiding visual evaluation. Importance based LOD-filtered annotations. Suitable navigation & interaction techniques. Details-on-demand features of individual items.

32 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-33
SLIDE 33

Questions and Contact Information

Gracias por su atenci´

  • n!

Daniel Limberger

daniel.limberger@hpi.uni-potsdam.de

Computer Graphics Systems Group

  • Prof. Dr. J¨

urgen D¨

  • llner

hpi3d.de youtube.com/hpicgs @hpi3d

Software Diagnostics GmbH

softwarediagnostics.com

33 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-34
SLIDE 34
slide-35
SLIDE 35

Exemplary Post Processing

35 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-36
SLIDE 36

Numbers in Tables on Loading

Android Customer Project Code Units # 30 853 90 089 Vertices # 617 060 1 801 780 Triangles # 308 530 900 890 geometry.bin 964 KiB 2 815 KiB

compressed∗ 404 KiB / 19 ms / 3 ms 1 175 KiB / 56 ms / 11 ms compression ratio 0.42 0.42

report.json 4 KiB 16 KiB

compressed∗ 2 KiB / 0 ms / 0 ms 7 KiB / 0 ms / 0 ms compression ratio 0.51 0.45

hierarchy.json 1 513 KiB 5 429 KiB

compressed∗ 480 KiB / 21 ms / 6 ms 1 587 KiB / 70 ms / 19 ms compression ratio 0.32 0.29

GPU Memory 12.082 MiB 34.679 MiB

∗gzip (zlib) compression level 1, with compress and decompress times.

36 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-37
SLIDE 37

Numbers in Tables on Rendering

Android Customer Project

Transmission at 1.5 Mbps (synthetic):

Geometry + Report 5.04 s 14.75 s Hierarchy 7.88 s 28.28 s

Transmission at 7.6 Mbps (synthetic):

Geometry + Report 1.00 s 2.91 s Hierarchy 1.55 s 5.58 s

Local initialization on i5-3337U:

Interface 0.24 s 0.24 s Geometry + Report 0.48 s 2.13 s Hierarchy 1.11 s 4.27 s

Averaged frame rendering time:

Intel HD Graphics 4000 5.62 ms 28.06 ms

Intel Core i5-3337U at 1.80 GHz (WIN)

NVIDIA GeForce GT 650M 1.92 ms 13.62 ms

Intel Core i7 at 2.80 GHz (OS X)

NVidia GTX 680 2.20 ms 16.04 ms

Intel Xeon W3530 at 2.80 GHz (WIN) 37 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-38
SLIDE 38

System Running on an Ultrabook

38 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-39
SLIDE 39

System Running on a Tablet

39 Interactive Software Maps for Web-Based Source Code Analysis Daniel Limberger 20th of June, Web3D2013

slide-40
SLIDE 40