1 / 27

Synthesizing Partial Component-Level Behavior Models

Synthesizing Partial Component-Level Behavior Models. Ivo Krka. Outline. Motivation and Background The Synthesis Algorithm Discovery of Discrepancies Conclusions. Motivation. Early in a software system’s life cycle Uncertainty Incomplete (partial) information

frye
Download Presentation

Synthesizing Partial Component-Level Behavior Models

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Synthesizing Partial Component-Level Behavior Models Ivo Krka

  2. Outline • Motivation and Background • The Synthesis Algorithm • Discovery of Discrepancies • 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 Client Cache Server requestCache requestServer responseServer responseCache requestCache responseCache

  5. Web Cache Constraints System domain variables cached: true if the data is cached and false otherwise pending: true if there is a pending client request for data, and false otherwise

  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 ?) MTS M a b? S1 S2 S3

  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 1 2 Component Constraint Generation Initial MTS Generation OCL, SDs 3 4 Sequence Diagram Annotation Final MTS Generation Comp. MTSs

  11. Phase 1: Component Constraint Generation Component Constraint Generation Initial MTS Generation • Not all variables affect each component • Reduction in state space size Sequence Diagram Annotation Final MTS Generation Client component pending: significant variable from Client’s perspective cached: does not directly affect Client’s behavior

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

  13. Phase 3: Sequence Diagram Annotation Component Constraint Generation Initial MTS Generation Cache Sequence Diagram Annotation Final MTS Generation <F,?> reqCache <T,?> <T,F> reqServ <T,F> respServ <?,?> <?,T> <T,T> annotations: <pending,cached> respCache <F,T> <F,?> reqCache <T,?> <T,T> respCache <F,T>

  14. Phase 3: Sequence Diagram Annotation Component Constraint Generation Initial MTS Generation Cache Sequence Diagram Annotation Final MTS Generation <F,?> reqCache <T,?> <T,F> reqServ <T,F> respServ <?,?> <?,T> <T,T> annotations: <pending,cached> respCache <F,T> <F,?> reqCache <T,?> <T,T> respCache <F,T>

  15. Phase 3: Sequence Diagram Annotation Component Constraint Generation Initial MTS Generation Cache Sequence Diagram Annotation Final MTS Generation <F,?> reqCache <T,F> <T,F> reqServ <T,F> respServ <?,?> <?,T> <T,T> annotations: <pending,cached> respCache <F,T> <F,?> reqCache <T,?> <T,T> respCache <F,T>

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

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

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

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

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

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

  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 Client Cache Server Admin requestCache responseCache dataUpdate requestCache dataChanged <T,F> <T,T> requestServer responseServer responseCache

  24. System and Component Views Differ Client Cache Server Admin requestCache requestServer responseServer System viewpoint: permission = false responseCache removePermission requestCache responseCache 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 • Whittle and Schumann, ICSE 2000. • Mäkinen and Systä, ICSE 2001. • Damas et al., FSE 2006. • Uchitel et al., ESEC/FSE 2003.

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

More Related