Presentation is loading. Please wait.

Presentation is loading. Please wait.

Synthesizing Partial Component- Level Behavior Models Ivo Krka.

Similar presentations


Presentation on theme: "Synthesizing Partial Component- Level Behavior Models Ivo Krka."— Presentation transcript:

1 Synthesizing Partial Component- Level Behavior Models Ivo Krka

2 Outline 1.Motivation and Background 2.The Synthesis Algorithm 3.Discovery of Discrepancies 4.Conclusions

3 Motivation Early in a software system’s life cycle Uncertainty Incomplete (partial) information Utilized behavior specifications Intuitive and straightforward Focused and partial System-level Our work leverages Properties (OCL constraints) Scenarios (UML sequence diagrams)

4 Web Cache Scenario ClientCacheServer requestCache requestServer responseServer responseCache requestCache responseCache

5 Web Cache Constraints pre: pending = false post: pending = true requestCache pre: cached = true and pending = true post: pending = false responseCache pre: cached = false and pending = true post: empty requestServer pre: empty post: cached = true responseServer pre: empty post: cached = false dataUpdate cached: true if the data is cached and false otherwise pending: true if there is a pending client request for data, and false otherwise System domain variables

6 Synthesis of Behavioral Models Behavioral models proven useful Validation, analysis, etc. Complete component-level models E.g., Whittle [1], Mäkinen [2], Damas [3] Overlook the partiality of specs (Uchitel [4])

7 Abstracting the Problem

8 Modal Transition Systems (MTS) Two types of transitions Required and maybe (marked with ?) S1 S2 S3 ab? MTS M

9 The Proposed Algorithm Partial-behavior models Behavior required by scenarios Behavior prohibited by constraints Behavior neither required nor prohibited Component-level models Better scaling with system size Discovery of specification discrepancies

10 Algorithm Overview OCL, SDs Component Constraint Generation Initial MTS Generation Sequence Diagram Annotation Final MTS Generation Comp. MTSs 12 34

11 Phase 1: Component Constraint Generation Initial MTS Generation Sequence Diagram Annotation Final MTS Generation Component Constraint Generation pre: pending = false post: pending = true requestCache pre: cached = true and pending = true post: pending = false responseCache pre: cached = false and pending = true post: empty requestServer pre: empty post: cached = true responseServer pre: empty post: cached = false dataUpdate pending: significant variable from Client’s perspective cached: does not directly affect Client’s behavior Client component pre: pending = false post: pending = true requestCache pre: pending = true post: pending = false responseCache Not all variables affect each component Reduction in state space size

12 Phase 2: Initial MTS Generation Sequence Diagram Annotation Final MTS Generation Component Constraint Generation Initial MTS Generation S1 (F,F) S2 (F,T) S3 (T,F) respServ? MTS Cache (p,c) reqCache? respServ? S4 (T,T) reqCache? reqServ? respCache? respServ? Initial MTS captures all legal behavior

13 Phase 3: Sequence Diagram Annotation Initial MTS Generation Final MTS Generation Component Constraint Generation Sequence Diagram Annotation Cache reqCache reqServ respServ respCache reqCache respCache annotations:

14 Phase 3: Sequence Diagram Annotation Initial MTS Generation Final MTS Generation Component Constraint Generation Sequence Diagram Annotation Cache reqCache reqServ respServ respCache reqCache respCache annotations:

15 Phase 3: Sequence Diagram Annotation Initial MTS Generation Final MTS Generation Component Constraint Generation Sequence Diagram Annotation Cache reqCache reqServ respServ respCache reqCache respCache annotations:

16 Phase 3: Sequence Diagram Annotation Initial MTS Generation Final MTS Generation Component Constraint Generation Sequence Diagram Annotation Cache reqCache reqServ respServ respCache reqCache respCache annotations: <T,F><T,F>

17 Phase 3: Sequence Diagram Annotation Initial MTS Generation Final MTS Generation Component Constraint Generation Sequence Diagram Annotation Cache reqCache reqServ respServ respCache reqCache respCache <T,F><T,F> We know the traversed execution states

18 Phase 4: Final MTS Generation Initial MTS Generation Component Constraint Generation Sequence Diagram Annotation Final MTS Generation S1 (F,F) S2 (F,T) S3 (T,F) respServ? MTS Cache reqCache? respServ? S4 (T,T) reqCache? reqServ? respCache? respServ? reqCache Current invocation

19 Phase 4: Final MTS Generation Initial MTS Generation Component Constraint Generation Sequence Diagram Annotation Final MTS Generation S1 (F,F) S2 (F,T) S3 (T,F) respServ? MTS Cache reqCache respServ? S4 (T,T) reqCache? reqServ? respCache? respServ? reqServ Current invocation

20 reqCache respCache Phase 4: Final MTS Generation Initial MTS Generation Component Constraint Generation Sequence Diagram Annotation Final MTS Generation S1 (F,F) S2 (F,T) S3 (T,F) respServ? MTS Cache respServ? S4 (T,T) reqCache reqServ? respServ respServ? S3’ (T,F) reqServ S4’ (T,T) S2’ (F,T) respServ? respCache

21 Phase 4: Final MTS Generation Initial MTS Generation Component Constraint Generation Sequence Diagram Annotation Final MTS Generation respCache reqCache S1 (F,F) S2 (F,T) S3 (T,F) respServ? MTS Cache respServ? S4 (T,T) reqCache reqServ? respServ respServ? S3’ (T,F) reqServ S4’ (T,T) S2’ (F,T) respServ? respCache All legal behavior Required behavior

22 Implementation Prototype MTSGen tool Warns about discrepancies Results can be visualized in MTSA Performance evaluation The algorithm is exponential in the worst case Used specifications 50 components 300 distinct operations 200 domain variables 200 scenarios Average running time 36 seconds Models of approx. 60 states

23 Scenario Cannot Execute As Specified ClientCacheServerAdmin requestCache responseCache requestCache requestServer dataUpdate responseServer responseCache dataChanged

24 System and Component Views Differ ClientCacheServerAdmin requestCache removePermission responseCache requestCache requestServer responseServer responseCache System viewpoint: permission = false Cache viewpoint: permission = true

25 Conclusions Novel synthesis algorithm Inputs: constraints and scenarios Outputs: component-level MTSs Discovery of specification discrepancies Prototype implementation Future work Support for requirements elicitation Support in OTS component selection

26 References 1.Whittle and Schumann, ICSE 2000. 2.Mäkinen and Systä, ICSE 2001. 3.Damas et al., FSE 2006. 4.Uchitel et al., ESEC/FSE 2003.

27 Authors Ivo Krka (krka@usc.edu)krka@usc.edu Yuriy Brun (ybrun@usc.edu)ybrun@usc.edu George Edwards (gedwards@usc.edu)gedwards@usc.edu Nenad Medvidovic (neno@usc.edu)neno@usc.edu Tool download http://www-scf.usc.edu/~krka/MTSGen.zip Initial MTS Generation Component Constraint Generation Sequence Diagram Annotation Final MTS Generation


Download ppt "Synthesizing Partial Component- Level Behavior Models Ivo Krka."

Similar presentations


Ads by Google