BRUE PRESENTATION 2 Sri Raguraman CIS 895 Kansas
BRUE PRESENTATION 2 Sri Raguraman CIS 895 Kansas State University
Overview of Presentation Overview Architecture Artifacts Demo • Overall flow • Critical use-cases • Structural view • Implemented as Eclipse plug-ins • Formal specification • Project plan and Test Plan • Demo
Overall flow • Launch application Analyze trace • Analyze trace xml • Collect execution trace • XML format Collect trace • Generate UML model files • Visualize UML model. Visualize files as UML diagrams
Critical use-cases
Core functionalities Collector Collect execution trace from running application Analyzer Generate UML model files Visualizer Ui Render model files as UML diagrams Each Core functionality is implemented as an Eclipse plug-in. Interface between plug-ins is through extension-points.
Plug-ins and their dependencies
Use-Case 1
Plug-in Collector Responsibilities �Defining BRUE Launch configuration � Can specify which packages/classes/methods to instrument �Instrumenting application � Uses Eclipse Probekit to instrument class files �Launching application � Uses Eclipse launch configuration delegates to launch Java applications.
Plug-in Collector Package Diagram
Plug-in Collector Launch configuration
Plug-in Collector Instrumentation �Instruments class files Uses Eclipse Probekit for instrumentation. �Records Method Entry and Method Exit events Method exit event includes actual return type, and any exception thrown. �Attaches Probekit. jar to running application.
Plug-in Collector Launching Java application
Plug-in Collector Interaction between launcher and instrumenter
Use-case 2 �Need to control when to start or stop trace data collection.
Plug-in Collector Controlling when to collect trace data �Agent class On a thread, from within the launched application, listen for requests from BRUE plug-in. Maintain flags for enabling or disabling trace data collection.
Controlling trace data collection
Trace XML Structure �A “Scenario” contains a trace of method entry and method exit events. �The events references an id that describes the method details (method name, signature, return type, its class name, package name).
Trace XML Structure
Generating UML 2 Model files �Parse trace xml file. �Extract packages and classes from trace xml file �Build UML 2 based package model �Build UML 2 based class model �Build UML 2 based interaction model
Building UML 2 Models �Use of Builder pattern
Use-case 3
Package diagram and class diagram �Eclipse GMF used to draw packages and classes �Model – UML 2 model generated from analyzer �Graphical definition file Contains properties for graphical notations (rectangle, polyline) �Graphical mapping definition Maps UML 2 model elements with graphical notations. �Eclipse GMF builds a editor based on the mapping. (Pending).
Viewing Interaction Diagrams �Use of Eclipse GEF �Sequence diagrams is not freeform and should conform to UML 2 specifications. �GEF applications follow MVC paradigm Ø Ø Ø Model Edit. Part (Controller) Figure (View)
Sequence diagram Models
Sequence Diagrams Editparts �One Edit part per Model
Sequence Diagram Figures
Drawing a sequence diagram Sequence. Diagram. Editor
Artifacts �Test Plan Use of Junit Planned to use Eclipse TPTP for measuring test coverage �Formal specification Positioning of sequence diagram model elements �Project Planning for Presentation 3 in September third week.
Demo
- Slides: 29