Abstraction and dynamic analysis for the reconstruction of scenario diagrams
Download
1 / 17

Abstraction and Dynamic Analysis for the Reconstruction of Scenario Diagrams - PowerPoint PPT Presentation


  • 120 Views
  • Uploaded on

Abstraction and Dynamic Analysis for the Reconstruction of Scenario Diagrams. Bas Cornelissen Leon Moonen Arie van Deursen. Introduction. Scenario event from the user’s perspective Scenario diagram UML sequence diagram at the scenario level Long-term goal

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Abstraction and Dynamic Analysis for the Reconstruction of Scenario Diagrams' - ryu


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Abstraction and dynamic analysis for the reconstruction of scenario diagrams

Abstraction and Dynamic Analysis for the Reconstruction of Scenario Diagrams

Bas Cornelissen

Leon Moonen

Arie van Deursen


Introduction
Introduction Scenario Diagrams

  • Scenario

    • event from the user’s perspective

  • Scenario diagram

    • UML sequence diagram at the scenario level

  • Long-term goal

    • e.g., conformance checking, design pattern detection, architecture reconstruction (?)


Challenges
Challenges Scenario Diagrams

  • Static analysis

    • source code

    • independent of input

    • potentially covers all object interactions

  • Dynamic analysis

    • execution traces

    • scenario- and input-driven

    • polymorphism: detection of late binding

    • merely applicable in “complete”, executable systems


Challenges1
Challenges Scenario Diagrams

  • Abstraction

    • typically, initial diagrams:

      • are too large

      • show too many details

      • contain uninteresting interactions

    • this calls for abstraction mechanisms

      • omit irrelevant messages and/or objects

      • allow user to choose the level of detail


Method
Method Scenario Diagrams

  • Reconstruction of scenario diagrams using JUnit and AspectJ

    • Scenario determination

    • Producing an execution trace

    • Abstraction

    • Visualization


Running example
Running example Scenario Diagrams

  • Pacman

    • 25 Java classes

    • GUI

    • Large traces

    • Polymorphism


1 scenario determination
1. Scenario determination Scenario Diagrams

  • JUnit testcase

    • basically a use case

    • contains one or more scenarios

      public class PacmanTest extends TestCase {

      public PacmanTest(String arg0) {

      super(arg0);

      }

      public void testTopLevelAlphaOmega() throws InterruptedException {

      Pacman p = new Pacman();

      p.start();

      System.out.println("SCENARIO START");

      p.up();

      System.out.println("SCENARIO END");

      p.quit();

      p.exit();

      }

      }


2 producing a trace
2. Producing a trace Scenario Diagrams

  • Aspect for tracing methods and constructors

    • exclusion of certain classes and/or methods

    • distinction between run-time objects

    • at call sites, log:

      • method/constructor ID

      • caller + object ID

      • callee + object ID

      • method/constructor signature

      • actual parameters

        METH 533: Pacman [1] :: Engine [2] ::

        public synchronized void Engine.movePlayer(int, int) :: 0, -1


3 abstraction
3. Abstraction Scenario Diagrams

  • Compression

    • summarize recurring messages and patterns

    • requires pattern recognition

    • post-mortem

  • Pruning

    • hide uninteresting interactions (and objects)

    • define minimum and maximum stack depths

    • both at the tracing and the visualization stage


4 visualization
4. Visualization Scenario Diagrams

  • GNU plotutils package

    • pic2plot

    • library containing pic macros for seq. diagrams

    • Perl script to create pic programs from traces

      object(Pacman1,"Pacman1");

      object(Engine2,"Engine2");

      object(Game3,"Game3");

      ...

      step();

      active(Pacman1);

      message(Pacman1,Engine2,"movePlayer(int, int)");

      active(Engine2);

      message(Engine2,Engine2,"inPlayingState()");

      message(Engine2,Game3,"initialized()");

      ...


Example 1
Example (1) Scenario Diagrams

  • Compression


Example 2
Example (2) Scenario Diagrams

  • Pruning


Example 3
Example (3) Scenario Diagrams


Example 4
Example (4) Scenario Diagrams


Conclusions 1
Conclusions (1) Scenario Diagrams

  • JUnit testcases

    • enable scenario diagram reconstruction for both complete systems and incomplete systems/modules

  • AspectJ

    • flexible: allows for (not) tracing specific components and/or messages

    • distinguishes between run-time objects


Conclusions 2
Conclusions (2) Scenario Diagrams

  • Effective abstraction mechanisms

    • human-readable, high-level model is easily obtained

    • though omission of messages at deep stacklevels may be infeasible

  • Better visualization is needed

    • interactive

    • e.g., zooming, expanding


Questions
Questions Scenario Diagrams

Fire at will!


ad