Resg ph d_seminar2010_germansibay


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • First let’s get in context. As we all know, nowadays Software is everywhere and designing and developing reliable software has shown to be a difficult task. To deal with complexity we can do as other engineering do: build models, an abstraction of what is intended to build. So, this approach tries to build models from requirements and then analyse them.
  • So besides being an abstract, less complex representation of the system, a good thing about models is the automatic techniques for analysing them, such as model checking. Which allows early design flaw detection. However, the drawbacks are that their construction requires expertise. These kinds of intra-agent specification tend to be harder for practitioner. They are hard to build.
  • The perception is that there are more drawbacks than advantages, leading to a low adoption by practitioners.
  • But what do practitioners use? Scenario notations like this one. They are an iter-agent specification showing an example of system components interacting. Their simple syntax and intuitive semantics made this kind of notation very popular among practitioners. Examples are Message Sequence Charts and UML Interaction Diagram.
  • So Scenarios are easy to build and understand, but most of them are informal and then unsuitable for formal analysis. They’re just an example of system execution: not a comprehensive behaviour specification. And have a limited expressive power.
  • This is a hard path.
  • So one approach that has been around for a while is this one From the scenarios (popular among practitioners) automatically build (that is synthesise) the BM. Several scenario-based languages and behaviour model notations exists It’s necessary a sound scenario language so the synthesis is possible, and a powerful one to say something interesting.
  • As Scenario Language we focused on a simplified version of LSC a formal and powerful scenario language (and popular). LSC allow two modalities: Existential an Universal. Existential describe an interaction that must be present in the system (example of a portion of a run), like a MSC. I will talk about them later. Universals impose a rule over all system runs (more like a property).
  • -An eLSC is just a basic chart like MSC basic charts in a dashed box. -The Semantic is defined with respect to traces (infinite sequence of event representing a system run). So a trace satisfies if at some point the trace shows the interaction described by the scenario. -Events not restricted by the diagram can happen in between. The events restricted by the diagram are contains the events appearing in the chart. More events can be added to the restricted ones with a special notation. -Finally, the satisfaction relation is defined for set of traces: A set of traces satisfy if at least one satisfies. -Example: for example in this case, in white we have events not restricted by the diagram, so we don’t care about them. In this run the user logs in and successfully retrieves money, which is the sequence described by the diagram so it satisfy.
  • -An uLSC has 2 Basic Charts. A Prechart, above in the dashed area and a Mainchart in the box below the Prechart. -The restricts area is optional (also in the existential live sequence chart), means that those messages are also restricted by the diagram and so they cannot happen in between. -The Semantics is defined again, with respect to traces (considering only the events restricted by the diagram) :Every time the Prechart holds, the Mainchart must follow (inmediately) next. -Example: this example is saying that if the user enter the password 3 times and it’s not successfully verified by the bank (That is the Prechart), then the ATM retains the card (Mainchart). -A set of traces satisfy if all its traces satisfy. -Trace example: In this case, the prechart holds (the user tries unsuccesfully to log in), and after that the user inserts the password again. So, as the next restricted event after the prechart is not the one described by the Mainchart, this trace violates the LSC.
  • Let’s talk a little about models now. -A Labelled Transition System or LTS from now on, is behavioural model formalism. It’s a FSM with labelled transitions. -An LTS defines a set of traces so we can ask whether a LTS satisfies a LSC: Again: Satisfies a universal iff all its traces do it, Satisfy an existential iff at least one satisfies.
  • To make things clear, another example. Let’s see if this model satisfy this uLSC. Every time b happens, dc must come next. Animation: b [ Prechart holds ] d c d c [ lets consider the trace with a loop between state 1 and 2]. This trace satisfy as b is only seen once and after that dc happens. Another trace now: b [ Prechart holds] c [ this is not the Mainchart, and no matter what event comes next the Mainchart is not satisfy after the Precahrt and c is a restricted event] So, as there is one trace that do not satisfy, the model does not satisfy the chart.
  • However if we consider a similar scenario but with Existential semantic: This says that bdc must be present in some trace. The first trace satisfy as bdc is present. We have still don’t know if the second one satisfies. For example if we loop between state 0 and 1 we will never have a bdc and it will not satisfy, but anyway: as there is a trace that satisfy, the model satisfy the chart.
  • Existential is not very expressive. It’s just an example In this case an example of a user that logs in and retrieves money.
  • When the user logs in, he or she must always request (and get) money. He must attempt to retrieve money and succed. What if he doesnt not try or he cant?
  • New modality: Existential with Prechart LSC. -Very similar to universal. The Mainchart is in a dashed box. -It’s semantic is execution tree based. -Whenever the Prechart holds (or is satisfied), then, for every word gamma in the Mainchart, there should be a system run from that point on such that gamma occurs (always restricted to Sigma). NEW: Every branch in the execution tree is in particular a trace, so if we consider the uLSC semantics over an execution tree it means that every time the prechart holds, from that point on every branch the Mainchart must hold next.
  • -If we consider this Model, that’s it’s execution tree. -If we take this branch, b happens, that’s the prechart, And there is a branch where dc comes next. -Note that there is a branch where dc is not next, however this still satisfy. It wont satisfy if we consider a universal LS
  • -Semantics similar Use Cases: The Prechart works as the Preconditions in the Use Cases. When the Preconditions Holds (i.e. the Prechart holds) the USE CASE is initiated, that is the Mainchart. - uLSC can be seen as an LTL formula while the new language is a formula in CTL.
  • Similar to uLSC is uTS. The universal version of the Triggered Scenarios. - We use the same syntax as uLSC -It’s semantic is execution tree based. -Has the same semantics as uLSC when Mainchart has only one word.
  • -
  • Hablar del cambio de poder expresivo
  • Now, let’s move to the synthesis problem. We want to build a BM from an TS.
  • Several LTS satisfies the scenario
  • Comentario Sebas: no se puede como en terminos lineales eliminar transiciones .. Por que no funciona? Con lineales funciona? Pensar... We can think about synthesising the bigest in terms of trace inclusion that satisfies, and then, by removing transitions We get other models that satisfies, but that doesnt work as the resulting model may not satisfy the scenario because That transition being removed could be the only way that an obligation can be performed. Is there a way to know which transitions can be removed knowing that the resulting transition still satisfies… No. Because there is no distintion between required and possible transitions….which leads me to…
  • Model checkin
  • The MTS can distinguish the required behaviour. They have a refinement relation “more defined than”. A MTS defines a set of LTS, it’s refinements where all the transitions are required. The refinement relation Preserves implementations.
  • So we have a syntehsis algorithm that builds a MTS so that it’s implementations satisfy the scenario. And because o Completeness is a very important issue. Because I can guarantee that The model is as least refined as possible. No arbitrary decission was taken. The algorithm takes a scenario and builds the least refined MTS which implementations satisfy
  • Combining scenarios is achieved by MTS’s merge.
  • If they dont overlap they are inconsistent
  • Resg ph d_seminar2010_germansibay

    1. 1. TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A From Triggered Scenarios to Modal Transition System German Sibay
    2. 2. Agenda <ul><li>Motivation </li></ul><ul><li>Previous Work </li></ul><ul><li>Our Work </li></ul><ul><li>Conclusion </li></ul><ul><li>Future Work </li></ul>
    3. 3. Motivation <ul><li>Software is everywhere </li></ul><ul><ul><li>Nuclear power stations </li></ul></ul><ul><ul><li>Mobile phones </li></ul></ul><ul><ul><li>Banking </li></ul></ul><ul><li>Design and development of software is hard </li></ul><ul><li>Models are key in engineering (abstraction) </li></ul>Behaviour Models analysis requirements
    4. 4. Behaviour Models <ul><li>Pros </li></ul><ul><ul><li>Abstraction </li></ul></ul><ul><ul><li>Build complexity: model < system </li></ul></ul><ul><ul><li>Basis for (semi)automatic analysis techniques: </li></ul></ul><ul><ul><ul><li>Model checking </li></ul></ul></ul><ul><ul><ul><li>Simulation </li></ul></ul></ul><ul><ul><li>Analysis of behaviour previous to construction </li></ul></ul><ul><ul><ul><li>Early detection </li></ul></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Requires expertise </li></ul></ul><ul><ul><li>Intra-agent behaviour specification </li></ul></ul><ul><ul><li>Hard to build </li></ul></ul>
    5. 5. Behaviour Models <ul><li>Perception: cons > pros </li></ul>Possible cause of low adoption by practitioners
    6. 6. What do practitioners use? <ul><li>Scenario notations, Use Cases </li></ul><ul><li>Inter-agent specification </li></ul><ul><li>Simple syntax </li></ul><ul><li>Intuitive semantics </li></ul><ul><li>MSC, UML Interaction Diagram </li></ul>User Retrieve money Pay Bills Actuator
    7. 7. Scenario notations <ul><li>pros : </li></ul><ul><ul><li>Easy syntax, intuitive semantic </li></ul></ul><ul><ul><li>Popular among practitioners </li></ul></ul><ul><li>cons : </li></ul><ul><ul><li>Generally informal (no suitable for formal analysis) </li></ul></ul><ul><ul><li>Example of execution (not comprehensive) </li></ul></ul><ul><ul><li>Limited expressiveness </li></ul></ul>
    8. 8. Summary analysis requirements Behaviour Models
    9. 9. Proposal: Synthesis from Scenarios synthesis Behaviour Models scenarios scenario notation analysis requirements
    10. 10. Our Contribution <ul><li>Novel Scenario Language with Trigger </li></ul><ul><ul><li>Tree based semantics, allows existential and universal with trigger </li></ul></ul><ul><li>Synthesis algorithm for the new Language </li></ul><ul><ul><li>Characterising all models that satisfy the scenario </li></ul></ul>synthesis Behaviour Models scenario notation
    11. 11. Scenario Language: Basic Chart <ul><li>Example of execution (MSC, UML Seq. Diag.) </li></ul><ul><li>Partial order semantics </li></ul><ul><li>Defines a finite language of finite words </li></ul><ul><li>{ pwd verify verifying wait ok , </li></ul><ul><li>pwd verify wait veryfing ok } </li></ul>
    12. 12. Scenario Language with Prechart (or Trigger) <ul><li>Live Sequence Chart (LSC): </li></ul><ul><ul><li>Existential Live Sequence Chart ( eLSC ) </li></ul></ul><ul><ul><ul><li>Example of a system run ≈ MSC </li></ul></ul></ul><ul><ul><li>Universal Live Sequence Chart ( uLSC ) </li></ul></ul><ul><ul><ul><li>Rule for all system runs ≈ Property </li></ul></ul></ul>
    13. 13. Existential Live Sequence Chart (eLSC) <ul><li>Trace based semantics: </li></ul><ul><ul><li>interaction described by the scenario must be present somewhere in the trace </li></ul></ul><ul><li>A set of traces satisfy if at least one satisfies </li></ul>
    14. 14. Universal Live Sequence Chart (uLSC) Prechart Mainchart … pwd verify nok pwd verify nok pwd verify nok x pwd verify ok … <ul><li>Trace based semantics </li></ul><ul><ul><li>Every time the Prechart holds, the Mainchart must follow next </li></ul></ul><ul><li>A set of traces satisfy if all satisfy </li></ul>
    15. 15. Labelled Transition System (LTS) as a set of traces <ul><li>A LTS defines a set of traces </li></ul><ul><li>LTS satisfy the scenario if its set of traces do it: </li></ul><ul><li>- uLSC : All traces satisfy the scenario </li></ul><ul><li>- eLSC : At least one trace satisfy the scenario </li></ul>
    16. 16. Models and Scenarios b d c d c (dc) ∞  b c … x 0 1 2 . . . A trace does not satisfy  the model does not satisfy the uLSC uLSC
    17. 17. Models and Scenarios b d c d c (dc) ∞  b c … 0 1 2 . . . There is a trace that satisfies  the model satisfies the eLSC eLSC
    18. 18. New language: Motivation <ul><li>eLSC not very expressive. </li></ul><ul><li>Just an example of a user that logs in and retrieves money </li></ul>
    19. 19. New language: Motivation <ul><li>uLSC may be too restrictive </li></ul>… pwd verify wait verifying wait ok getBalance() … x <ul><li>Every time the user logs in, must try to retrieve money (and succeed) </li></ul>
    20. 20. Existential Triggered Scenario (eTS) P M <ul><li>Execution tree based semantics: </li></ul><ul><ul><li>Every time the Trigger holds, there must exists an execution branch where the Mainchart holds next </li></ul></ul>
    21. 21. Does the model satisfy the eTS? Does its tree satify the eTS? b d c
    22. 22. eTS: Summary <ul><li>Rule over entire system-to-be behaviour </li></ul><ul><li>Requires possibility of Mainchart when Prechart holds </li></ul><ul><li>Complementary to uLSC </li></ul><ul><li>uLSC – LTL formula </li></ul><ul><li>eTS - CTL formula </li></ul><ul><li>Semantics ≈ Use Cases with preconditions </li></ul>
    23. 23. Universal Triggered Scenario (uTS) P M <ul><li>Execution tree based semantics: </li></ul><ul><ul><li>Every time the Trigger holds, only the Mainchart can come next. Also every word in the Mainchart must be in at least one branch </li></ul></ul>
    24. 24. Universal Triggered Scenario (uTS) Does this tree satify the uTS ? b d c NO
    25. 25. TS extension <ul><li>Conditions in the Trigger: Fluent Propositional Logic formula </li></ul>u userLoggedIn
    26. 26. Synthesis from TS synthesis TS Behaviour model
    27. 27. Synthesis from this eTS  d c b
    28. 28. Synthesising a LTS <ul><li>Several LTS satisfy the scenario </li></ul><ul><li>Choosing one is taking an arbitrary decision </li></ul><ul><li>Choosing one that characterises them all (through simulation or trace inclusion) does not work </li></ul>
    29. 29. Solution: synthesise a Modal Transition System (MTS) <ul><li>Extend LTS with an extra set of transitions </li></ul><ul><ul><li>Required or Must transitions </li></ul></ul><ul><ul><li>Possible or May transitions </li></ul></ul><ul><li>An LTS L is an implementation of an MTS M if </li></ul><ul><ul><li>all required behaviour in M is in L, and </li></ul></ul><ul><ul><li>all behaviour in L is possible in M </li></ul></ul>request reply request? reply? request reply request reply request reply
    30. 30. <ul><li>MTS have a refinement relation: “more defined than” </li></ul><ul><li>MTS refinement preserves implementation </li></ul>Solution: synthesise a MTS request? reply? Implementations (LTS) request reply request? reply? Refined + - request reply request reply request reply
    31. 31. MTS refinement preserves scenarios Refinements TS LTSs: Satisfy the scenario Synthesis MTS Characterises LTSs that satisfy the TS satisfies
    32. 32. Combining scenarios Synthesised MTSs Refinements TS Refinements TS Merge
    33. 33. Combining properties and scenarios Synthesised MTSs Refinements Refinements FLTL property TS Merge
    34. 34. Methodology Synthesis Feedback Elaboration Model Checking, Simulation, Animation Validation eTS FLTL properties uTS
    35. 35. Summarising <ul><li>New scenario-based language </li></ul><ul><ul><li>based on LSC with branching semantic </li></ul></ul><ul><ul><li>TS have existential with trigger </li></ul></ul><ul><ul><li>Existential Fits with Use Case w/Preconditions </li></ul></ul><ul><li>MTS Synthesis algorithm </li></ul><ul><ul><li>No arbitrary choice of LTS </li></ul></ul><ul><ul><li>Characterisation of all LTSs satisfying TS </li></ul></ul><ul><ul><li>Allows evolution through refinement </li></ul></ul><ul><ul><li>Allows integrating multiple sources (merge) </li></ul></ul><ul><li>Applicable to other scenario notations </li></ul>
    36. 36. Future Work <ul><li>Distributed Synthesis </li></ul><ul><ul><li>Problems of composition of MTS (not complete) </li></ul></ul><ul><ul><li>Distributed synthesis with trigger is tricky </li></ul></ul><ul><li>Synthesise using scenarios and Architecture Diagrams </li></ul>