JIVE: Dynamic Analysis for Java

Similar documents
Temporal Data Model for Program Debugging

Project # 1: Database Programming

- Aditya Kapre, Graduate Student, CSE Department, University at Buffalo

Declarative and Visual Debugging in Eclipse

The Myx Architectural Style

ADT: Eclipse development tools for ATL

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Regular Forum of Lreis. Speechmaker: Gao Ang

Introduction to Software Engineering: Object Design I Reuse & Patterns

The Design Patterns Matrix From Analysis to Implementation

Chapter 4: Threads. Operating System Concepts. Silberschatz, Galvin and Gagne

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

Getting the Most from Eclipse

Debugging Abstract State Machine Specifications: An Extension of CoreASM

Oracle Fusion Middleware 11g: Build Applications with ADF I

When the Servlet Model Doesn't Serve. Gary Murphy Hilbert Computing, Inc.

The Strategy Pattern Design Principle: Design Principle: Design Principle:

Evaluation of Temporal Queries with Applications in Program Debugging. Presenter: Demian Lessa

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Think of drawing/diagramming editors. ECE450 Software Engineering II. The problem. The Composite pattern

Architectural Design. Architectural Design. Software Architecture. Architectural Models

Building JavaServer Faces Applications

be used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate

Element: Relations: Topology: no constraints.

AADL Graphical Editor Design

FREQUENTLY ASKED QUESTIONS

SQL Server Development 20762: Developing SQL Databases in Microsoft SQL Server Upcoming Dates. Course Description.

EMFT 1.0 Release Review (OCL, Query, Transaction, and Validation)

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

"Charting the Course... MOC C: Developing SQL Databases. Course Summary

Microsoft. [MS20762]: Developing SQL Databases

Oracle Fusion Middleware 11g: Build Applications with ADF I

CISC836: Models in Software Development: Methods, Techniques and Tools

SDC Design patterns GoF

Database Systems. Sven Helmer. Database Systems p. 1/567

Test Automation. 20 December 2017

CS 520/620 Advanced Software Engineering Fall September 27, 2016

Frustrated by all the hype?

Design Process Overview. At Each Level of Abstraction. Design Phases. Design Phases James M. Bieman

The etrice Eclipse Project Proposal

Fundamentals of Design, Implementation, and Management Tenth Edition

Design Pattern and Software Architecture: IV. Design Pattern

Projects. How much new information can fit in your brain? Corporate Trainer s Profile TECHNOLOGIES

Noopur Gupta Eclipse JDT/UI Committer IBM India

Transactum Business Process Manager with High-Performance Elastic Scaling. November 2011 Ivan Klianev

PaaS Cloud mit Java. Eberhard Wolff, Principal Technologist, SpringSource A division of VMware VMware Inc. All rights reserved

Linguistic Reflection Via Mirrors

EMF-IncQuery gets Sirius: faster and better diagrams

JDT Plug in Developer Guide. Programmer's Guide

Implementation Architecture

Chapter 4: Multithreaded

CHAPTER 2: DATA MODELS

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Extending Blaise Capabilities in Complex Data Collections

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

Developing Data Access Solutions with Microsoft Visual Studio 2010

Scalable Visualizations and Query-Based Debugging

Investigation of System Timing Concerns in Embedded Systems: Tool-based Analysis of AADL Models

DESIGN PATTERN - INTERVIEW QUESTIONS

A Reconnaissance on Design Patterns

Developing SQL Databases

Functional verification on PIL mode with IAR Embedded Workbench

The Eclipse Rich Client Platform

Windows 7 Training for Developers

STARCOUNTER. Technical Overview

Advanced WCF 4.0 .NET. Web Services. Contents for.net Professionals. Learn new and stay updated. Design Patterns, OOPS Principles, WCF, WPF, MVC &LINQ

COURSE OUTCOMES OF M.Sc(IT)

Chapter 4: Multithreaded Programming Dr. Varin Chouvatut. Operating System Concepts 8 th Edition,

Important DevOps Technologies (3+2+3days) for Deployment

Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads.

Introduction... ix. Chapter 1: Exploring Fundamental Programming Concepts... 1

Design Patterns Reid Holmes

SE310 Analysis and Design of Software Systems

Orchestrating Music Queries via the Semantic Web

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

Web Development. With PHP. Web Development With PHP

Whole Platform Foundation. The Long Way Toward Language Oriented Programming

Database Application Architectures

EF6 - Version: 1. Entity Framework 6

A Graphical Interactive Debugger for Distributed Systems

An Eclipse-based Environment for Programming and Using Service-Oriented Grid

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, January 2018

POAD Book: Chapter 4: Design Patterns as Components Chapter 5: Visual Design Models

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

Before you start with this tutorial, you need to know basic Java programming.

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Review sheet for Final Exam (List of objectives for this course)

CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

Programming ArchiTech

ECLIPSE MODELING PROJECT

Data Analysis Workbench

Finding the Missing Eclipse Perspective: the Runtime Perspective. Andrew Giang Marwan Abi-Antoun Department of Computer Science

Copyright and Trademark Information Trademarks Disclaimer; No Warranty

Introduction to Model Driven Engineering using Eclipse. Frameworks

Efficiently Introduce Threading using Intel TBB

2. An implementation-ready data model needn't necessarily contain enforceable rules to guarantee the integrity of the data.

When Modeling meets Productivity. Sven Efftinge - itemis

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

Transcription:

JIVE: Dynamic Analysis for Java Overview, Architecture, and Implementation Demian Lessa Computer Science and Engineering State University of New York, Buffalo Dec. 01, 2010

Outline 1 Overview 2 Architecture 3 Implementation 4 Conclusion Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 2 / 23

Next... 1 Overview 2 Architecture 3 Implementation 4 Conclusion Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 3 / 23

What can you tell about a program? Questions we often need to answer about programs and their execution: How is the system designed? How do system components communicate? How does control flow during execution? How does the state of an object change during execution? Did an object ever have a particular state? At what times? What caused an object to have a particular state? How do threads and objects/methods interact? What caused a method to execute? Was a particular method ever called? At what times? What parameters were passed to a method call? What value was returned by a method call? Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 4 / 23

How do you answer such questions? Pick the right technique(s) for the job. Static analysis looks at the code but does not execute it. all execution paths, undecidability issues, AST/DFG/CFG/..., etc; comprehension architecture extraction, querying, etc; debugging static checkers to match source code patterns. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 5 / 23

How do you answer such questions? Pick the right technique(s) for the job. Static analysis looks at the code but does not execute it. all execution paths, undecidability issues, AST/DFG/CFG/..., etc; comprehension architecture extraction, querying, etc; debugging static checkers to match source code patterns. Model checking verifies if a model of the program violates its specs. all execution paths, symbolic execution, state space explosion, etc; debugging execution trace of a spec violation. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 5 / 23

How do you answer such questions? Pick the right technique(s) for the job. Static analysis looks at the code but does not execute it. all execution paths, undecidability issues, AST/DFG/CFG/..., etc; comprehension architecture extraction, querying, etc; debugging static checkers to match source code patterns. Model checking verifies if a model of the program violates its specs. all execution paths, symbolic execution, state space explosion, etc; debugging execution trace of a spec violation. Dynamic analysis executes the code and looks at execution data. single execution path, probe effect, scalability, execution traces, etc; comprehension interaction extraction, querying, etc; debugging reverse execution, querying, etc. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 5 / 23

How do you answer such questions? Pick the right technique(s) for the job. Static analysis looks at the code but does not execute it. all execution paths, undecidability issues, AST/DFG/CFG/..., etc; comprehension architecture extraction, querying, etc; debugging static checkers to match source code patterns. Model checking verifies if a model of the program violates its specs. all execution paths, symbolic execution, state space explosion, etc; debugging execution trace of a spec violation. Dynamic analysis executes the code and looks at execution data. single execution path, probe effect, scalability, execution traces, etc; comprehension interaction extraction, querying, etc; debugging reverse execution, querying, etc. Hybrid approaches combine aspects of the above techniques. symbolic execution for test generation; static analysis for selective tracing;... Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 5 / 23

Where does JIVE stand? JIVE is a dynamic analysis tool for Java programs featuring: Traditional, break-step-inspect interactive debugging. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 6 / 23

Where does JIVE stand? JIVE is a dynamic analysis tool for Java programs featuring: Traditional, break-step-inspect interactive debugging. Forward and reverse stepping/jumping. Revert to previous states in order to diagnose errors. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 6 / 23

Where does JIVE stand? JIVE is a dynamic analysis tool for Java programs featuring: Traditional, break-step-inspect interactive debugging. Forward and reverse stepping/jumping. Revert to previous states in order to diagnose errors. Dynamic visualizations of state and execution. UML-based object diagrams (ODs) for state snapshots. UML-based sequence diagrams (SDs) for execution. ODs clarify many aspects of OO semantics. SDs clarify concurrent program behavior and object interactions. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 6 / 23

Where does JIVE stand? JIVE is a dynamic analysis tool for Java programs featuring: Traditional, break-step-inspect interactive debugging. Forward and reverse stepping/jumping. Revert to previous states in order to diagnose errors. Dynamic visualizations of state and execution. UML-based object diagrams (ODs) for state snapshots. UML-based sequence diagrams (SDs) for execution. ODs clarify many aspects of OO semantics. SDs clarify concurrent program behavior and object interactions. Queries over execution traces. Investigate (temporal) program properties. Debug programs by identifying suspicious conditions. Integrate query answers with dynamic visualizations. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 6 / 23

Where does JIVE stand? JIVE is a dynamic analysis tool for Java programs featuring: Traditional, break-step-inspect interactive debugging. Forward and reverse stepping/jumping. Revert to previous states in order to diagnose errors. Dynamic visualizations of state and execution. UML-based object diagrams (ODs) for state snapshots. UML-based sequence diagrams (SDs) for execution. ODs clarify many aspects of OO semantics. SDs clarify concurrent program behavior and object interactions. Queries over execution traces. Investigate (temporal) program properties. Debug programs by identifying suspicious conditions. Integrate query answers with dynamic visualizations. Selective trace filtering. Focus on relevant parts of the source. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 6 / 23

JIVE in Practice Things you probably know... JIVE is integrated with Eclipse as a collection of plugins. Requires programs to execute in debug mode. To run JIVE, it must be enabled in your program s debug profile. The JIVE perspective provides several views. Contour Model. Object Diagram. Sequence Model. Sequence Diagram. Event Log. Requires Java 1.6+ and Eclipse 3.5+; supports *ix, Mac, and Win. It has a home: http://www.cse.buffalo.edu/jive. It is open source: http://code.google.com/p/jive. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 7 / 23

JIVE s User Interface Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 8 / 23

Next... 1 Overview 2 Architecture 3 Implementation 4 Conclusion Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 9 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? What does the collected data look like? Depends! But expect variable reads/writes, method calls/returns, etc. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? What does the collected data look like? Depends! But expect variable reads/writes, method calls/returns, etc. How do we model data within JIVE (JIVE data model)? Relations? Objects? Graphs? Should these be temporal? Decouple data collection simply map it to the JIVE data model. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? What does the collected data look like? Depends! But expect variable reads/writes, method calls/returns, etc. How do we model data within JIVE (JIVE data model)? Relations? Objects? Graphs? Should these be temporal? Decouple data collection simply map it to the JIVE data model. How do we store data (JIVE data store) with minimum contention? Memory? Disk? RDBMS? Other DBMS OODBMS, NoSQL? Decouple data store use a common abstraction for storage and access. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? What does the collected data look like? Depends! But expect variable reads/writes, method calls/returns, etc. How do we model data within JIVE (JIVE data model)? Relations? Objects? Graphs? Should these be temporal? Decouple data collection simply map it to the JIVE data model. How do we store data (JIVE data store) with minimum contention? Memory? Disk? RDBMS? Other DBMS OODBMS, NoSQL? Decouple data store use a common abstraction for storage and access. How do we access data cheaply and with minimum contention? Directly? OO APIs (e.g., iterators, visitors)? Declarative query language? Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Collection JIVE collects data continually from a running program. How do we collect data? Modified JVM? JVM API? Debug API? AOP? Instrumentation? What does the collected data look like? Depends! But expect variable reads/writes, method calls/returns, etc. How do we model data within JIVE (JIVE data model)? Relations? Objects? Graphs? Should these be temporal? Decouple data collection simply map it to the JIVE data model. How do we store data (JIVE data store) with minimum contention? Memory? Disk? RDBMS? Other DBMS OODBMS, NoSQL? Decouple data store use a common abstraction for storage and access. How do we access data cheaply and with minimum contention? Directly? OO APIs (e.g., iterators, visitors)? Declarative query language? Shouldn t we also collect some static data? Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 10 / 23

Data Processing JIVE processes the collected data continually. Update the trace model (i.e., raw trace data). Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 11 / 23

Data Processing JIVE processes the collected data continually. Update the trace model (i.e., raw trace data). Update derived models (e.g., object and sequence models). Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 11 / 23

Data Processing JIVE processes the collected data continually. Update the trace model (i.e., raw trace data). Update derived models (e.g., object and sequence models). Notify interested parties (typically views) of model updates. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 11 / 23

Data Processing JIVE processes the collected data continually. Update the trace model (i.e., raw trace data). Update derived models (e.g., object and sequence models). Notify interested parties (typically views) of model updates. Views respond to model updates by rendering affected diagram parts. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 11 / 23

Data Processing JIVE processes the collected data continually. Update the trace model (i.e., raw trace data). Update derived models (e.g., object and sequence models). Notify interested parties (typically views) of model updates. Views respond to model updates by rendering affected diagram parts. Ideally, a subsystem should coordinate these tasks. That is, Data arrivals should be isolated from data updates. Data updates should be isolated from view renderings. In general, subsystems should be decoupled from each other. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 11 / 23

Visualizations JIVE renders views continually in response to model updates. Views are renderings of their respective models. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 12 / 23

Visualizations JIVE renders views continually in response to model updates. Views are renderings of their respective models. Some views require simple processing (e.g., Event Log). For each model element, display a log entry line. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 12 / 23

Visualizations JIVE renders views continually in response to model updates. Views are renderings of their respective models. Some views require simple processing (e.g., Event Log). For each model element, display a log entry line. Others require more complex processing (e.g., OD and SD). Select a strategy to traverse some data strucure (i.e., model). Use configurations, interactive state, and traversal context to decide: Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 12 / 23

Visualizations JIVE renders views continually in response to model updates. Views are renderings of their respective models. Some views require simple processing (e.g., Event Log). For each model element, display a log entry line. Others require more complex processing (e.g., OD and SD). Select a strategy to traverse some data strucure (i.e., model). Use configurations, interactive state, and traversal context to decide: what to render at each step; whether to traverse substructures; whether to continue the traversal after each step completes. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 12 / 23

Visualizations JIVE renders views continually in response to model updates. Views are renderings of their respective models. Some views require simple processing (e.g., Event Log). For each model element, display a log entry line. Others require more complex processing (e.g., OD and SD). Select a strategy to traverse some data strucure (i.e., model). Use configurations, interactive state, and traversal context to decide: what to render at each step; whether to traverse substructures; whether to continue the traversal after each step completes. Views should be rendered independently and concurrently. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 12 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Normally, TC is in sync with the program counter (PC). Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Normally, TC is in sync with the program counter (PC). Temporal navigation breaks this sync and initiates replay mode. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Normally, TC is in sync with the program counter (PC). Temporal navigation breaks this sync and initiates replay mode. Replay mode continues until TC and PC are in sync again. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Normally, TC is in sync with the program counter (PC). Temporal navigation breaks this sync and initiates replay mode. Replay mode continues until TC and PC are in sync again. Notably, views are rendered to reflect TC not PC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Omniscient Debugging JIVE supports omniscient debugging. It knows about all program states. It supports interactive navigation to arbitrary points in execution. This requires support for the notion of temporal context (TC). Normally, TC is in sync with the program counter (PC). Temporal navigation breaks this sync and initiates replay mode. Replay mode continues until TC and PC are in sync again. Notably, views are rendered to reflect TC not PC. Hence, views are naturally synchronized during replay mode. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 13 / 23

Queries JIVE supports template-based searches and declarative SPJ queries. JIVE maintains data against which queries are formulated. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 14 / 23

Queries JIVE supports template-based searches and declarative SPJ queries. JIVE maintains data against which queries are formulated. Template-based searches are predefined, form-based queries. Select a template, provide parameters, and execute. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 14 / 23

Queries JIVE supports template-based searches and declarative SPJ queries. JIVE maintains data against which queries are formulated. Template-based searches are predefined, form-based queries. Select a template, provide parameters, and execute. SPJ queries are still at a proof-of-concept stage. Write a declarative query using a SQL-like language and execute. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 14 / 23

Queries JIVE supports template-based searches and declarative SPJ queries. JIVE maintains data against which queries are formulated. Template-based searches are predefined, form-based queries. Select a template, provide parameters, and execute. SPJ queries are still at a proof-of-concept stage. Write a declarative query using a SQL-like language and execute. Query answer reporting is uniform. Eclipse s seach results window provides tabular and hierarchical views. The SD highlights query answers and focuses on their activations. Focusing means maximally hiding all unrelated parts of the SD. Double-clicking query answers navigates to the corresponding TC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 14 / 23

JIVE s MVC Architecture (Simplified) Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 15 / 23

JIVE Focused Search Results Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 16 / 23

Next... 1 Overview 2 Architecture 3 Implementation 4 Conclusion Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 17 / 23

Project Structure JIVE is implemented as a collection of Eclipse plugins. edu.buffalo.cse.jive.feature plugin definitions, dependencies, requirements, etc; edu.buffalo.cse.jive.launching (meta) (hooks) replaces debug launchers; provides an extended debugger; edu.buffalo.cse.jive.core (debugger) extended debugger for JDI event handling; model updates; edu.bsu.cs.jive JIVE data model; JIVE data store; utilities; edu.buffalo.cse.jive.core.adapter (types) (expose) exposes Eclipse s Java Debug Target (JDT) for extension; edu.buffalo.cse.jive.ui (applications) views; searches, queries, and query answers; Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 18 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Requests JDI events such as: thread start/end, class prepare, method enter/exit, field change, step. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Requests JDI events such as: thread start/end, class prepare, method enter/exit, field change, step. Receives and handles JDI event notifications: updates internal data structures; creates JIVE events; notifies observers (i.e., models) on a separate thread; models update themselves based on JIVE events. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Requests JDI events such as: thread start/end, class prepare, method enter/exit, field change, step. Receives and handles JDI event notifications: updates internal data structures; creates JIVE events; notifies observers (i.e., models) on a separate thread; models update themselves based on JIVE events. Most debug tasks performed by Eclipse s debugger. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Requests JDI events such as: thread start/end, class prepare, method enter/exit, field change, step. Receives and handles JDI event notifications: updates internal data structures; creates JIVE events; notifies observers (i.e., models) on a separate thread; models update themselves based on JIVE events. Most debug tasks performed by Eclipse s debugger. Heavily based on the observer pattern. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.buffalo.cse.jive.core Creates JIVE data models and registers them as JIVE event listeners. Requests JDI events such as: thread start/end, class prepare, method enter/exit, field change, step. Receives and handles JDI event notifications: updates internal data structures; creates JIVE events; notifies observers (i.e., models) on a separate thread; models update themselves based on JIVE events. Most debug tasks performed by Eclipse s debugger. Heavily based on the observer pattern. Statistics: 26 files, 5KLoC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 19 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Implements data models using in-memory storage. Encapsulates most concrete implementations using creational patterns. Typically, a factory provides methods for creating model elements. Many model elements accept some form of visitor object. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Implements data models using in-memory storage. Encapsulates most concrete implementations using creational patterns. Typically, a factory provides methods for creating model elements. Many model elements accept some form of visitor object. Object Model (a.k.a. Contour Model) is the most complex. Contours are transactional. That is, every model change is encapsulated in a transaction. Transactions can be committed/rolled back the heart of replay mode. Uses the state pattern in its implementation. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Implements data models using in-memory storage. Encapsulates most concrete implementations using creational patterns. Typically, a factory provides methods for creating model elements. Many model elements accept some form of visitor object. Object Model (a.k.a. Contour Model) is the most complex. Contours are transactional. That is, every model change is encapsulated in a transaction. Transactions can be committed/rolled back the heart of replay mode. Uses the state pattern in its implementation. Extensive use of the observer pattern. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Implements data models using in-memory storage. Encapsulates most concrete implementations using creational patterns. Typically, a factory provides methods for creating model elements. Many model elements accept some form of visitor object. Object Model (a.k.a. Contour Model) is the most complex. Contours are transactional. That is, every model change is encapsulated in a transaction. Transactions can be committed/rolled back the heart of replay mode. Uses the state pattern in its implementation. Extensive use of the observer pattern. Statistics (totals): 115 files, 15KLoC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.bsu.cs.jive Defines JIVE events, data models and their elements. Implements data models using in-memory storage. Encapsulates most concrete implementations using creational patterns. Typically, a factory provides methods for creating model elements. Many model elements accept some form of visitor object. Object Model (a.k.a. Contour Model) is the most complex. Contours are transactional. That is, every model change is encapsulated in a transaction. Transactions can be committed/rolled back the heart of replay mode. Uses the state pattern in its implementation. Extensive use of the observer pattern. Statistics (totals): 115 files, 15KLoC. Statistics (contour): 42 files, 11KLoC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 20 / 23

edu.buffalo.cse.jive.ui Uses Eclipse s GEF framework and SWT. Retrieve model elements to display their contents. Compose UI elements using edit parts and figures. You define actions for events (e.g., clicking on a menu item). Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 21 / 23

edu.buffalo.cse.jive.ui Uses Eclipse s GEF framework and SWT. Retrieve model elements to display their contents. Compose UI elements using edit parts and figures. You define actions for events (e.g., clicking on a menu item). Template-based searches. Pre-configured forms define required and/or optional fields. Requested search is validated. Model is searched each search requires a visitor implementation. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 21 / 23

edu.buffalo.cse.jive.ui Uses Eclipse s GEF framework and SWT. Retrieve model elements to display their contents. Compose UI elements using edit parts and figures. You define actions for events (e.g., clicking on a menu item). Template-based searches. Pre-configured forms define required and/or optional fields. Requested search is validated. Model is searched each search requires a visitor implementation. SPJ queries. Textual input with syntax validation. A rudimentary query engine is in place. It implements true joins, although in somewhat naïve fashion. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 21 / 23

edu.buffalo.cse.jive.ui Uses Eclipse s GEF framework and SWT. Retrieve model elements to display their contents. Compose UI elements using edit parts and figures. You define actions for events (e.g., clicking on a menu item). Template-based searches. Pre-configured forms define required and/or optional fields. Requested search is validated. Model is searched each search requires a visitor implementation. SPJ queries. Textual input with syntax validation. A rudimentary query engine is in place. It implements true joins, although in somewhat naïve fashion. Extensive use of the observer pattern. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 21 / 23

edu.buffalo.cse.jive.ui Uses Eclipse s GEF framework and SWT. Retrieve model elements to display their contents. Compose UI elements using edit parts and figures. You define actions for events (e.g., clicking on a menu item). Template-based searches. Pre-configured forms define required and/or optional fields. Requested search is validated. Model is searched each search requires a visitor implementation. SPJ queries. Textual input with syntax validation. A rudimentary query engine is in place. It implements true joins, although in somewhat naïve fashion. Extensive use of the observer pattern. Statistics: 195 files, 35KLoC. Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 21 / 23

Next... 1 Overview 2 Architecture 3 Implementation 4 Conclusion Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 22 / 23

Conclusion Summary. Future of JIVE. Are you interested? Demian Lessa JIVE: Dynamic Analysis for Java :: Overview, Architecture, and Implementation 23 / 23