Visualization on static tensile test for unidirectional CFRP
Combining Static and Dynamic Data in Code Visualization
-
Upload
carson-rosales -
Category
Documents
-
view
36 -
download
3
description
Transcript of Combining Static and Dynamic Data in Code Visualization
![Page 1: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/1.jpg)
Combining Static and Dynamic Data in Code Visualization
David EngSable Research Group, McGill UniversityPASTE 2002Charleston, South CarolinaNovember 18-19, 2002
![Page 2: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/2.jpg)
Presentation outline Introduction Framework overview JIL SOOT STEP JIMPLEX Future work
![Page 3: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/3.jpg)
Introduction Code visualization: why and where?
Program understanding. Compiler development. Visualization of an optimizable IR.
Motivation: Expose both static & dynamic program
attributes which are hidden in the raw IR. Design goals:
Intuitive, portable, & modular.
![Page 4: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/4.jpg)
Framework overview
Java class files
MyClass.java
JVM/JVMPI(execution
profile)
Tools with JIL support
Visualizers with JIL supportJIL documents
SOOT
STEP
static data(JIL)
dynamic data(JIL)
JIMPLEX(XSL/HTML)
MyVisualizer(my language)
DTD
DTD
(d)(c)(b)(a)
![Page 5: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/5.jpg)
Java Intermediate Language (JIL)
XML-based representation of code. A metalanguage used to describe
other languages and their characteristics.
Encapsulates IRs as code objects which can be extended with both static and dynamic data.
![Page 6: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/6.jpg)
JIL document structure
contributing toolsruntime accessesruntime invokes
name, returns, access
invoke targets
definitions
usesuses
name, type, access version, created
myclass
historyfields
name, type
parameters
name, type
locals
statement count
name
labels
live variables in/out
flow information
jimple declaration
line number, label
statements
type, handler
exceptions
methods
myclass
extension
base
element legend
required
![Page 7: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/7.jpg)
Benefits of using XML Extensible: add or remove elements
without breaking existing structure. Supported by existing parsers, APIs,
software, databases, servers, etc. Portable across platforms and
networks. Human readable, editable.
![Page 8: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/8.jpg)
JIL Let’s take a look at an example JIL
document…
![Page 9: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/9.jpg)
Static vs. dynamic data Static data:
Collected at compile-time Program attributes Flow information Analysis results Basis for program understanding
We chose SOOT as a source of static data…
![Page 10: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/10.jpg)
SOOT Java optimization framework and API. Uses intermediate languages (IRs) to perform
analyses and transformations. Provides several output formats, including JIL.
Jimple source(.jimple)
SOOTJava source(.java)
Java class(.class)
JIL document(.xml)
Baf, Grimp,and Jimple
analysis & optimization
Grimp source(.grimp)
Baf source(.baf)
javac
![Page 11: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/11.jpg)
SOOT as a source of JIL SOOT was modified to generate
Jimple as XML. The resulting XML contains general
program characteristics and flow information.
Static analysis results can be linked to applicable code elements.
![Page 12: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/12.jpg)
SOOT elements in JIL As a source of static data:
Flow information Live variable analysis Variable uses and definitions Class hierarchy analysis Variable type analysis
![Page 13: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/13.jpg)
Static vs. dynamic data Dynamic data:
Collected at runtime Profiling results Variable access and use counts Temporal data Basis for evaluation Especially important for OOP languages
![Page 14: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/14.jpg)
STEP Toolkit for extensible profiling. Encodes and compresses trace data
in a trace definition language.
JIL document(.xml)
STEP
Java class(.class)
EVolvetrace format
Profiling agent(JVMPI, Kaffe, SOOT)
event pipe
![Page 15: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/15.jpg)
STEP as a source of JIL STEP as a source of profiling data. Visualizers becomes consumers at
the backend of the event pipe. STEP traces are read and converted
to JIL. JIMPLEX has full control over what
elements are included and in what format.
![Page 16: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/16.jpg)
STEP elements in JIL As a source of runtime dynamic data:
field accesses method invocations object allocations
![Page 17: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/17.jpg)
Separation of data from data
Static and dynamic data are generated as independent XML sources.
Trace results from different profiling runs can be swapped in and out.
Data sources can live on separate servers.
![Page 18: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/18.jpg)
Merging XML data sources To visualize both static and dynamic
elements simultaneously, the data is merged into a single source.
XML can be merged on the fly using XSL.
![Page 19: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/19.jpg)
Separation of data and interface
Interfaces are independent of data. Can be implemented using any
combination of languages or technologies.
One possible interface will be presented here…
![Page 20: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/20.jpg)
JIMPLEX Web-based visualization interface
implemented using HTML and XSL. Uses JIL documents as data sources,
allowing them to exist remotely. Runs on any machine equipped with a
web browser. Portable across platforms and networks. Modular and extensible.
![Page 21: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/21.jpg)
JIMPLEX interface
myclass.xml(JIL document)
(c)
(b)
(a)Server A: JIL document storage
web server
jimplex.xsl(XSL stylesheet)
Server B: JIMPLEX server
web server
JIMPLEX(web page)
Client 1: JIMPLEX
web client
JIMPLEX(web page)
Client n: JIMPLEX
web client
…
XML data
HTML data
XML/XSL transformation
![Page 22: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/22.jpg)
Example Interface
![Page 23: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/23.jpg)
JIMPLEX interface Let’s take a look at the interface…
![Page 24: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/24.jpg)
![Page 25: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/25.jpg)
Contributions JIL document format
DTD specifications
SOOT extensions JIL document output format
STEP extensions JIL document generating backend
JIMPLEX visualizer XSL stylesheets
![Page 26: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/26.jpg)
Future Work: JIL Extract more runtime attributes from
STEP, such as temporal data. Use XML merging to support multiple
STEP streams, allowing multi-dimensional profiling.
Use XML differentiation to support program and trace comparison, allowing better evaluation of optimizations.
![Page 27: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/27.jpg)
Future Work: UI Any updates to JIL should be reflected in
the UI (ie. multi-dimensional profiling). With the inclusion of more and more data,
an application-based interface would provide better performance.
Profiling and other dynamic data are more suited towards a graphical representation.
![Page 28: Combining Static and Dynamic Data in Code Visualization](https://reader036.fdocuments.us/reader036/viewer/2022062321/56812e8d550346895d942ea0/html5/thumbnails/28.jpg)
Links Java Intermediate Language (JIL):
http://www.sable.mcgill.ca/jil/ JIL papers, resources, and the JIMPLEX visualizer.
SOOT: http://www.sable.mcgill.ca/soot/ SOOT papers, documentation, and downloads.
STEP: http://www.sable.mcgill.ca/step/ STEP papers, more to come.