lecture 9 live sequence charts
play

Lecture 9: Live Sequence Charts 2017-06-19 Prof. Dr. Andreas - PowerPoint PPT Presentation

Softwaretechnik / Software-Engineering Lecture 9: Live Sequence Charts 2017-06-19 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universitt Freiburg, Germany 9 2017-06-19 main Topic Area Requirements


  1. Softwaretechnik / Software-Engineering Lecture 9: Live Sequence Charts 2017-06-19 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany – 9 – 2017-06-19 – main –

  2. Topic Area Requirements Engineering: Content • Introduction VL 6 • Requirements Specification • Desired Properties • Kinds of Requirements • Analysis Techniques . . . • Documents • Dictionary, Specification • Specification Languages • Natural Language • Decision Tables VL 7 • Syntax, Semantics . . . • Completeness, Consistency, ... • Scenarios VL 8 . • User Stories, Use Cases . . – 9 – 2017-06-19 – Sblockcontent – • Live Sequence Charts • Syntax, Semantics VL 9 . • Working Definition: Software . . • Discussion 2 /54

  3. – 9 – 2017-06-19 – main – 3 /54

  4. Content • Formal Methods in Requirements Engineering • Software & Software Specification , formally • Requirements Engineering , formally • Examples : • Decision Tables • Use Cases • Live Sequence Charts • LSC Semantics : • Full LSC syntax • Activation, Pre-Chart, Chart Mode • Automaton Construction • Loop / Progress / Exit Conditions • LSCs vs. Software • Excursion: Symbolic Büchi Automata – 9 – 2017-06-19 – Scontent – • Methodology • Requirements Engineering with scenarios • Strengthening scenarions into requirements 4 /54 • Requirements Engineering Wrap-Up

  5. Formal Methods in Requirements Engineering Needs! Solution! Needs! spec 1 spec 2a § spec 2b ... ... e need 1 ... e need 2 prop. 1 → → → need 3 prop. 2 ... ... Customer Developer Customer Developer Customer Developer Developer Customer announcement offer software contract software delivery (Lastenheft) (Pflichtenheft) (incl. Pflichtenheft) • We would like to precisely and objectively specify the allowed softwares that make the customer happy. – 9 – 2017-06-19 – Sformalre – 5 /54

  6. Formal Methods in Requirements Engineering Needs! Solution! Needs! spec 1 spec 2a § spec 2b ... ... e need 1 ... e need 2 prop. 1 → → → need 3 prop. 2 ... ... Customer Developer Customer Developer Customer Developer Developer Customer announcement offer software contract software delivery (Lastenheft) (Pflichtenheft) (incl. Pflichtenheft) • We would like to precisely and objectively specify the allowed softwares that make the customer happy. • In other words, we want to formally define a satisfies relation between softwares and software specifications. That is, given a software S and a software specification S , we want to define when (and only when) software S satisfies software specification S , denoted by S | = S . – 9 – 2017-06-19 – Sformalre – 5 /54

  7. Formal Methods in Requirements Engineering Needs! Solution! Needs! spec 1 spec 2a § spec 2b ... ... e need 1 ... e need 2 prop. 1 → → → need 3 prop. 2 ... ... Customer Developer Customer Developer Customer Developer Developer Customer announcement offer software contract software delivery (Lastenheft) (Pflichtenheft) (incl. Pflichtenheft) • We would like to precisely and objectively specify the allowed softwares that make the customer happy. • In other words, we want to formally define a satisfies relation between softwares and software specifications. That is, given a software S and a software specification S , we want to define when (and only when) software S satisfies software specification S , denoted by S | = S . • Once again: – 9 – 2017-06-19 – Sformalre – • S | = S : specification is satisfied , S is one “allowed” design, should be accepted. • S �| = S : specification is not satisfied , S may not satisfy customer’s needs. 5 /54

  8. Software and Software Specification, formally Definition. Software is a finite description S of a (possibly infinite) set � S � of (finite or infinite) computation paths of the form α 1 α 2 σ 0 − − → σ 1 − − → σ 2 · · · where • σ i ∈ Σ , i ∈ N 0 , is called state (or configuration ), and • α i ∈ A , i ∈ N 0 , is called action (or event ). The (possibly partial) function � · � : S �→ � S � is called interpretation of S . – 9 – 2017-06-19 – Sformalre – 6 /54

  9. Software and Software Specification, formally Definition. Software is a finite description S of a (possibly infinite) set � S � of (finite or infinite) computation paths of the form α 1 α 2 σ 0 − − → σ 1 − − → σ 2 · · · where • σ i ∈ Σ , i ∈ N 0 , is called state (or configuration ), and • α i ∈ A , i ∈ N 0 , is called action (or event ). The (possibly partial) function � · � : S �→ � S � is called interpretation of S . Definition. A software specification is a finite description S of a (possibly infinite) set � S � of softwares, i.e. – 9 – 2017-06-19 – Sformalre – � S � = { ( S 1 , � · � 1 ) , ( S 2 , � · � 2 ) , . . . } . The (possibly partial) function � · � : S �→ � S � is called interpretation of S . 6 /54

  10. Software Satisfies Software Specification Needs! Solution! Needs! spec 1 spec 2a § spec 2b ... ... e need 1 ... e need 2 prop. 1 → → → need 3 prop. 2 ... ... Customer Developer Customer Developer Customer Developer Developer Customer announcement offer software contract software delivery (Lastenheft) (Pflichtenheft) (incl. Pflichtenheft) Definition. Software ( S, � · � ) satisfies software specification S , denoted by S | = S , if and only if ( S, � · � ) ∈ � S � . – 9 – 2017-06-19 – Sformalre – 7 /54

  11. Software Satisfies Software Specification: Example Software Specification S : T : room ventilation r 1 r 2 r 3 b button pressed? × × − off ventilation off? × − ∗ on ventilation on? − × ∗ start ventilation × − − go stop ventilation − × − stop Define: ( S, � · � ) ∈ � S � if and only if for all α 1 α 2 σ 0 − − → σ 1 − − → σ 2 · · · ∈ � S � and for all i ∈ N 0 , ∃ r ∈ T • σ i | = F ( r ) . – 9 – 2017-06-19 – Sformalre – 8 /54

  12. Software Satisfies Software Specification: Example Software Specification Software S : • Assume we have a program S for the room ventilation controller. T : room ventilation r 1 r 2 r 3 b button pressed? × × − • Assume we can observe at well-defined off ventilation off? × − ∗ points in time the conditions b , off , on , go , on ventilation on? − × ∗ stop when the software runs. start ventilation × − − go stop ventilation − × − stop • Then the behaviour � S � of S can be viewed as computation paths of the form τ τ Define: ( S, � · � ) ∈ � S � if and only if for all σ 0 − → σ 1 − → σ 2 · · · α 1 α 2 where each σ i is a valuation of b , off , on , go , σ 0 − − → σ 1 − − → σ 2 · · · ∈ � S � stop , i.e. σ i : { b, off , on , go , stop } → B . and for all i ∈ N 0 , ∃ r ∈ T • σ i | = F ( r ) . – 9 – 2017-06-19 – Sformalre – 8 /54

  13. Software Satisfies Software Specification: Example Needs! Solution! Needs! spec 1 spec 2a § spec 2b ... ... e need 1 ... e need 2 prop. 1 → → → need 3 prop. 2 ... ... Customer Developer Customer Developer Customer Developer Developer Customer announcement offer software contract software delivery (Lastenheft) (Pflichtenheft) (incl. Pflichtenheft) Software Specification Software S : • Assume we have a program S for the room ventilation controller. T : room ventilation r 1 r 2 r 3 button pressed? × × − b • Assume we can observe at well-defined ventilation off? × − ∗ off points in time the conditions b , off , on , go , ventilation on? − × ∗ on stop when the software runs. start ventilation × − − go stop stop ventilation − × − • Then the behaviour � S � of S can be viewed as computation paths of the form τ τ Define: ( S, � · � ) ∈ � S � if and only if for all σ 0 − → σ 1 − → σ 2 · · · α 1 α 2 where each σ i is a valuation of b , off , on , go , − − → σ 1 − − → σ 2 · · · ∈ � S � σ 0 stop , i.e. σ i : { b, off , on , go , stop } → B . and for all i ∈ N 0 , – 9 – 2017-06-19 – Sformalre – ∃ r ∈ T • σ i | = F ( r ) . 8 /54

Recommend


More recommend