300 likes | 320 Views
BRUE Behavioral Reverse-engineering in UML as Eclipse plug-in. Presentation 2 Sri Raguraman CIS 895 Kansas State University. Overview of Presentation. Overall flow. Critical use-cases. Core functionalities. Each Core functionality is implemented as an Eclipse plug-in.
E N D
BRUEBehavioral Reverse-engineering in UML as Eclipse plug-in Presentation 2 Sri Raguraman CIS 895 Kansas State University
Core functionalities Each Core functionality is implemented as an Eclipse plug-in. Interface between plug-ins is through extension-points.
Plug-in CollectorResponsibilities • 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 CollectorInteraction between launcher and instrumenter
Plug-in CollectorInstrumentation • Instruments class files • Uses Eclipse Probekit for instrumentation. • Probekits • Snippet of code to be run at method entry/exit events. • Records Method Entry and Method Exit events • Method exit event includes actual return type, and any exception thrown.
Use-case 2 • Need to control when to start or stop trace data collection. • Need a way for BRUE plug-in to “talk” to the launched application.
Plug-in CollectorControlling when to collect trace data • A lightweight Agent class is attached to application • On a thread, from within the launched application, listen for requests from BRUE plug-in. • Maintain flags for enabling or disabling 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).
Generating UML2 Model files • Parse trace xml file. • Extract packages and classes from trace xml file • Build UML2 based package model • Build UML2 based class model • Build UML2 based interaction model
Building UML2 Models • Use of Builder pattern
Package diagram and class diagram • Eclipse GMF used to draw packages and classes • Model – • UML2 model generated from analyzer • Graphical definition file • Contains properties for graphical notations (rectangle, polyline) • Graphical mapping definition • Maps UML2 model elements with graphical notations. • Eclipse GMF builds a editor based on the mapping.
Viewing Interaction Diagrams • Use of Eclipse GEF • Sequence diagrams is not freeform and should conform to UML2 specifications. • GEF applications follow MVC paradigm • Model • EditPart (Controller) • Figure (View)
Sequence DiagramsEditparts • One Edit part per Model
Deployment • Deployed as Eclipse plug-in • Dependencies • Java 5 or later • Eclipse 3.2 (or later) with these plug-ins • GMF 2.0 • GEF 3.2 • UML2 2.0
Artifacts • Test Plan • Use of JUnit • Planned to use Eclipse TPTP for measuring test coverage • Formal specification • Positioning of sequence diagram model elements • Project Plan • Planning for Presentation 3 in September third week.