Lecture 09: Live Sequence Charts 2015-06-11 Prof. Dr. Andreas - - PowerPoint PPT Presentation

lecture 09 live sequence charts
SMART_READER_LITE
LIVE PREVIEW

Lecture 09: Live Sequence Charts 2015-06-11 Prof. Dr. Andreas - - PowerPoint PPT Presentation

Softwaretechnik / Software-Engineering Lecture 09: Live Sequence Charts 2015-06-11 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal 09 2015-06-11 main Albert-Ludwigs-Universit at Freiburg, Germany Contents & Goals Last


slide-1
SLIDE 1

– 09 – 2015-06-11 – main –

Softwaretechnik / Software-Engineering

Lecture 09: Live Sequence Charts

2015-06-11

  • Prof. Dr. Andreas Podelski, Dr. Bernd Westphal

Albert-Ludwigs-Universit¨ at Freiburg, Germany

slide-2
SLIDE 2

Contents & Goals

– 09 – 2015-06-11 – Sprelim –

2/50 Last Lecture:

  • Scenarios and Anti-Scenarios
  • User Stories, Use Cases, Use Case Diagrams
  • LSC: abstract and concrete syntax

This Lecture:

  • Educational Objectives: Capabilities for following tasks/questions.
  • Which are the cuts and firedsets of this LSC?
  • Construct the TBA of a given LSC body.
  • Given a set of LSCs, which scenario/anti-scenario/requirement is formalised by them?
  • Formalise this positive scenario/anti-scenario/requirement using LSCs.
  • Content:
  • Excursion: automata accepting infinite words
  • Cuts and Firedsets, automaton construction
  • existential LSCs, pre-charts, universal LSCs
  • Requirements Engineering: conclusions
slide-3
SLIDE 3

Recall: LSC Body Syntax

– 09 – 2015-06-11 – main –

3/50

LSC Body Example

– 08 – 2015-06-08 – Slscsyn –

29/78

  • L : l1,0 ≺ l1,1 ≺ l1,2 ≺ l1,3,

l1,2 ≺ l1,4, l2,0 ≺ l2,1 ≺ l2,2 ≺ l2,3, l3,0 ≺ l3,1 ≺ l3,2, l1,1 ≺ l2,1, l2,2 ≺ l1,2, l2,3 ≺ l1,3, l3,2 ≺ l1,4, l2,2 ∼ l3,1,

  • I = {{l1,0, l1,1, l1,2, l1,3, l1,4}, {l2,0, l2,1, l2,2, l2,3}, {l3,0, l3,1, l3,2}},
  • Msg = {(l1,1, A, l2,1), (l2,2, B, l1,2), (l2,2, C, l3,1), (l2,3, D, l1,3), (l3,2, E, l1,4)}
  • Cond = {({l2,2}, c2 ∧ c3)},
  • LocInv = {(l1,1, ◦, c1, l1,2, •)}

I1 I2 c2 ∧ c3 I3 A B C D E c1

slide-4
SLIDE 4

LSC Semantics

– 09 – 2015-06-11 – main –

4/50

slide-5
SLIDE 5

The Big Picture

– 09 – 2015-06-11 – Slsc –

5/50

  • Recall: decision tables
  • By the standard semantics, a decision table T is software,

T = {σ0

α1

− → σ1

α2

− → σ2 · · · | · · · } is a set of computation paths.

slide-6
SLIDE 6

The Big Picture

– 09 – 2015-06-11 – Slsc –

5/50

  • Recall: decision tables
  • By the standard semantics, a decision table T is software,

T = {σ0

α1

− → σ1

α2

− → σ2 · · · | · · · } is a set of computation paths.

  • Recall: Decision tables as software specification:

But We Want A Software Specification, Don’t We...?

– 07 – 2015-05-21 – Set –

16/54

slide-7
SLIDE 7

The Big Picture

– 09 – 2015-06-11 – Slsc –

5/50

  • Recall: decision tables
  • By the standard semantics, a decision table T is software,

T = {σ0

α1

− → σ1

α2

− → σ2 · · · | · · · } is a set of computation paths.

  • Recall: Decision tables as software specification:

But We Want A Software Specification, Don’t We...?

– 07 – 2015-05-21 – Set –

16/54

  • We want the same for LSCs.
slide-8
SLIDE 8

The Big Picture

– 09 – 2015-06-11 – Slsc –

5/50

  • Recall: decision tables
  • By the standard semantics, a decision table T is software,

T = {σ0

α1

− → σ1

α2

− → σ2 · · · | · · · } is a set of computation paths.

  • Recall: Decision tables as software specification:

But We Want A Software Specification, Don’t We...?

– 07 – 2015-05-21 – Set –

16/54

  • We want the same for LSCs.
  • We will give a procedure to construct for each LSC L an automaton B(L ).

The language (or semantics) of L is the set of comp. paths accepted by B(L ). Thus an LSC is also software.

slide-9
SLIDE 9

The Big Picture

– 09 – 2015-06-11 – Slsc –

5/50

  • Recall: decision tables
  • By the standard semantics, a decision table T is software,

T = {σ0

α1

− → σ1

α2

− → σ2 · · · | · · · } is a set of computation paths.

  • Recall: Decision tables as software specification:

But We Want A Software Specification, Don’t We...?

– 07 – 2015-05-21 – Set –

16/54

  • We want the same for LSCs.
  • We will give a procedure to construct for each LSC L an automaton B(L ).

The language (or semantics) of L is the set of comp. paths accepted by B(L ). Thus an LSC is also software.

  • Problem: computation paths may be infinite → B¨

uchi acceptance.

slide-10
SLIDE 10

Excursion: Symbolic Büchi Automata

– 09 – 2015-06-11 – main –

6/50

slide-11
SLIDE 11

From Finite Automata to Symbolic Büchi Automata

– 09 – 2015-06-11 – Stba –

7/50 q1 q2 1 A: Σ = {0, 1} q1 q2 1 B: Σ = {0, 1} q1 q2 1 1 B′: Σ = {0, 1} q1 q2 even(x)

  • dd(x)

Asym: Σ = ({x} → N) q1 q2 even(x)

  • dd(x)

Bsym: Σ = ({x} → N) B¨ uchi infinite words symbolic symbolic B¨ uchi infinite words

slide-12
SLIDE 12

Symbolic Büchi Automata

– 09 – 2015-06-11 – Stba –

8/50

Definition. A Symbolic B¨ uchi Automaton (TBA) is a tuple B = (C, Q, qini, →, QF ) where

  • C is a set of atomic propositions,
  • Q is a finite set of states,
  • qini ∈ Q is the initial state,
  • → ⊆ Q × Φ(C) × Q is the finite transition relation.

Each transitions (q, ψ, q′) ∈ → from state q to state q′ is labelled with a formula ψ ∈ Φ(C).

  • QF ⊆ Q is the set of fair (or accepting) states.
slide-13
SLIDE 13

Run of TBA

– 09 – 2015-06-11 – Stba –

9/50

  • Definition. Let B = (C, Q, qini, →, QF ) be a TBA and

w = σ1, σ2, σ3, · · · ∈ (C → B)ω an infinite word, each letter is a valuation of CB. An infinite sequence ̺ = q0, q1, q2, . . . ∈ Qω

  • f states is called run of B over w if and only if
  • q0 = qini,
  • for each i ∈ N0 there is a transition (qi, ψi, qi+1) ∈→ s.t. σi |

= ψi. Example:

q1 q2 even(x)

  • dd(x)

Bsym: Σ = ({x} → N)

slide-14
SLIDE 14

The Language of a TBA

– 09 – 2015-06-11 – Stba –

10/50

Definition. We say TBA B = (C, Q, qini, →, QF ) accepts the word w = (σi)i∈N0 ∈ (C → B)ω if and only if B has a run ̺ = (qi)i∈N0

  • ver w such that fair (or accepting) states are visited infinitely often by

̺, i.e., such that ∀ i ∈ N0 ∃ j > i : qj ∈ QF . We call the set Lang(B) ⊆ (C → B)ω of words that are accepted by B the language of B.

slide-15
SLIDE 15

Example

– 09 – 2015-06-11 – Stba –

11/50 run: ̺ = q0, q1, q2, . . . ∈ Qω s.t. σi | = ψi, i ∈ N0.

q1 q2 q3 q4 q5 q6 q7

¬a a ¬b b ∧ φ ¬(c ∨ e) c ∧ e ¬(d ∨ f) d ∧ ¬f f ∧ ¬d ¬f f ¬d d d ∧ f true b ∧ ¬φ

slide-16
SLIDE 16

LSC Semantics: TBA Construction

– 09 – 2015-06-11 – main –

12/50

slide-17
SLIDE 17

LSC Semantics: It’s in the Cuts!

– 09 – 2015-06-11 – Scutfire –

13/50

slide-18
SLIDE 18

LSC Semantics: It’s in the Cuts!

– 09 – 2015-06-11 – Scutfire –

13/50

Definition. Let ((L, , ∼), I, Msg, Cond, LocInv, Θ) be an LSC body. A non-empty set ∅ = C ⊆ L is called a cut of the LSC body iff C

  • is downward closed, i.e.

∀ l, l′ ∈ L • l′ ∈ C ∧ l l′ = ⇒ l ∈ C,

  • is closed under simultaneity, i.e.

∀ l, l′ ∈ L • l′ ∈ C ∧ l ∼ l′ = ⇒ l ∈ C, and

  • comprises at least one location per instance line, i.e.

∀ I ∈ I • C ∩ I = ∅.

slide-19
SLIDE 19

LSC Semantics: It’s in the Cuts!

– 09 – 2015-06-11 – Scutfire –

13/50

Definition. Let ((L, , ∼), I, Msg, Cond, LocInv, Θ) be an LSC body. A non-empty set ∅ = C ⊆ L is called a cut of the LSC body iff C

  • is downward closed, i.e.

∀ l, l′ ∈ L • l′ ∈ C ∧ l l′ = ⇒ l ∈ C,

  • is closed under simultaneity, i.e.

∀ l, l′ ∈ L • l′ ∈ C ∧ l ∼ l′ = ⇒ l ∈ C, and

  • comprises at least one location per instance line, i.e.

∀ I ∈ I • C ∩ I = ∅.

The temperature function is extended to cuts as follows: Θ(C) =

  • hot

, if ∃ l ∈ C • (∄ l′ ∈ C • l ≺ l′) ∧ Θ(l) = hot cold , otherwise that is, C is hot if and only if at least one of its maximal elements is hot.

slide-20
SLIDE 20

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-21
SLIDE 21

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-22
SLIDE 22

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-23
SLIDE 23

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-24
SLIDE 24

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-25
SLIDE 25

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-26
SLIDE 26

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-27
SLIDE 27

Cut Examples

– 09 – 2015-06-11 – Scutfire –

14/50 ∅ = C ⊆ L — downward closed — simultaneity closed — at least one loc. per instance line

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-28
SLIDE 28

A Successor Relation on Cuts

– 09 – 2015-06-11 – Scutfire –

15/50

The partial order “” and the simultaneity relation “∼” of locations induce a direct successor relation on cuts of L as follows: Definition. Let C ⊆ L bet a cut of LSC body ((L, , ∼), I, Msg, Cond, LocInv, Θ). A set ∅ = F ⊆ L is called fired-set F of C if and only if

  • C ∩ F = ∅ and C ∪ F is a cut, i.e. F is closed under simultaneity,
  • all locations in F are direct ≺-successors of the front of C, i.e.

∀ l ∈ F ∃ l′ ∈ C • l′ ≺ l ∧ (∄ l′′ ∈ C • l′ ≺ l′′),

  • locations in F, that lie on the same instance line, are pairwise unordered, i.e.

∀ l = l′ ∈ F • (∃ I ∈ I • {l, l′} ⊆ I) = ⇒ l l′ ∧ l′ l,

  • for each asynchronous message reception in F, the corresponding sending is

already in C, ∀ (l, E, l′) ∈ Msg • l′ ∈ F = ⇒ l ∈ C. The cut C′ = C∪F is called direct successor of C via F, denoted by C F C′.

slide-29
SLIDE 29

Successor Cut Example

– 09 – 2015-06-11 – Scutfire –

16/50

C ∩ F = ∅ — C ∪ F is a cut — only direct ≺-successors — same instance line on front pairwise unordered — sending of asynchronous reception already in

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-30
SLIDE 30

Successor Cut Example

– 09 – 2015-06-11 – Scutfire –

16/50

C ∩ F = ∅ — C ∪ F is a cut — only direct ≺-successors — same instance line on front pairwise unordered — sending of asynchronous reception already in

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-31
SLIDE 31

Language of LSC Body: Example

– 09 – 2015-06-11 – Scutfire –

17/50

I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

q1 q2 q3 q4 q5 q6 q7

¬E! E! ¬E? E? ∧ φ F! F! ¬(F? ∨ G! ∨ G?) G! ∧ G? ∧ ¬F? F? ∧ ¬(G! ∧ G?) ¬F? F? ¬(G! ∧ G?) G! ∧ G? G! ∧ G? ∧ F? true E? ∧ ¬φ

The TBA B(L ) of LSC L over C and E is (C, Q, qini, →, QF ) with

  • Q is the set of cuts of L , qini is the instance heads cut,
  • C = C ∪ E!?, where E!? = {E!, E? | E ∈ E},
  • → consists of loops, progress transitions (from F), and legal exits (cold cond./local inv.),
  • QF = {C ∈ Q | Θ(C) = cold ∨ C = L} is the set of cold cuts and the maximal cut.
slide-32
SLIDE 32

TBA Construction Principle

– 09 – 2015-06-11 – Scutfire –

18/50 Recall: The TBA B(L ) of LSC L is (C, Q, qini, →, QF ) with

  • Q is the set of cuts of L , qini is the instance heads cut,
  • C = C ∪ {E!, E? | E ∈ E},
  • → consists of loops, progress transitions (from F), and legal exits (cold cond./local inv.),
  • F = {C ∈ Q | Θ(C) = cold ∨ C = L} is the set of cold cuts.

→= {(q, , q) | q ∈ Q} ∪ {(q, , q′) | q F q′} ∪ {(q, , L) | q ∈ Q}

slide-33
SLIDE 33

TBA Construction Principle

– 09 – 2015-06-11 – Scutfire –

18/50 Recall: The TBA B(L ) of LSC L is (C, Q, qini, →, QF ) with

  • Q is the set of cuts of L , qini is the instance heads cut,
  • C = C ∪ {E!, E? | E ∈ E},
  • → consists of loops, progress transitions (from F), and legal exits (cold cond./local inv.),
  • F = {C ∈ Q | Θ(C) = cold ∨ C = L} is the set of cold cuts.

So in the following, we “only” need to construct the transitions’ labels:

→= {(q, , q) | q ∈ Q} ∪ {(q, , q′) | q F q′} ∪ {(q, , L) | q ∈ Q}

slide-34
SLIDE 34

TBA Construction Principle

– 09 – 2015-06-11 – Scutfire –

18/50 Recall: The TBA B(L ) of LSC L is (C, Q, qini, →, QF ) with

  • Q is the set of cuts of L , qini is the instance heads cut,
  • C = C ∪ {E!, E? | E ∈ E},
  • → consists of loops, progress transitions (from F), and legal exits (cold cond./local inv.),
  • F = {C ∈ Q | Θ(C) = cold ∨ C = L} is the set of cold cuts.

So in the following, we “only” need to construct the transitions’ labels:

→= {(q, ψloop(q), q) | q ∈ Q} ∪ {(q, ψprog(q, q′), q′) | q F q′} ∪ {(q, ψexit(q), L) | q ∈ Q}

slide-35
SLIDE 35

TBA Construction Principle

– 09 – 2015-06-11 – Scutfire –

18/50 Recall: The TBA B(L ) of LSC L is (C, Q, qini, →, QF ) with

  • Q is the set of cuts of L , qini is the instance heads cut,
  • C = C ∪ {E!, E? | E ∈ E},
  • → consists of loops, progress transitions (from F), and legal exits (cold cond./local inv.),
  • F = {C ∈ Q | Θ(C) = cold ∨ C = L} is the set of cold cuts.

So in the following, we “only” need to construct the transitions’ labels:

→= {(q, ψloop(q), q) | q ∈ Q} ∪ {(q, ψprog(q, q′), q′) | q F q′} ∪ {(q, ψexit(q), L) | q ∈ Q}

q . . .

ψloop(q): “what allows us to stay at cut q” “. . . F1” ψprog(q, q′): “characterisation

  • f firedset Fn”

ψexit(q): “what allows us to legally exit” true

I1 I2 c2 ∧ c3 I3 A B C D E c1

slide-36
SLIDE 36

TBA Construction Principle

– 09 – 2015-06-11 – Slscsem –

19/50 So in the following, we “only” need to construct the transitions’ labels:

→= {(q, ψloop(q), q) | q ∈ Q} ∪ {(q, ψprog(q, q′), q′) | q F q′} ∪ {(q, ψexit(q), L) | q ∈ Q}

q q1 . . . qn

ψloop(q) =

=:ψhot

loop(q)

  • ψMsg(q) ∧ ψLocInv

hot

(q) ∧ψLocInv

cold

(q) ψexit(q) = ψhot

loop(q) ∧ ¬ψLocInv cold

(q) ∨

1≤i≤n ψhot prog(q, qi) ∧

  • ¬ψLocInv,•

cold

(q, qi) ∨ ¬ψCond

cold (q, qi)

  • ψprog(q, qn) =

ψhot

prog(q, qn) ∧ ψCond cold (q, qn) ∧ ψLocInv,• cold

(q, qn) ψhot

prog(q, qn) = ψMsg(q, qn)

∧ ψCond

hot (q, qn) ∧ ψLocInv,• hot

(q, qn) true

I1 I2 c2 ∧ c3 I3 A B C D E c1

slide-37
SLIDE 37

Loop Condition

– 09 – 2015-06-11 – Slscsem –

20/50

ψloop(q) = ψMsg(q) ∧ ψLocInv

hot

(q) ∧ ψLocInv

cold

(q)

  • ψMsg(q) = ¬

1≤i≤n ψMsg(q, qi) ∧

  • strict =

ψ∈E!?∩Msg(L) ¬ψ

  • ψLocInv

θ

(q) =

ℓ=(l,ι,φ,l′,ι′)∈LocInv, Θ(ℓ)=θ, ℓ active at q φ

A location l is called front location of cut C if and only if ∄ l′ ∈ L • l ≺ l′. Local invariant (l0, ι0, φ, l1, ι1) is active at cut (!) q if and only if l0 l l1 for some front location l of cut (!) q.

  • Msg(F) = {E! | (l, E, l′) ∈ Msg, l ∈ F} ∪ {E? | (l, E, l′) ∈ Msg, l′ ∈ F}
  • Msg(F1, . . . , Fn) =

1≤i≤n Msg(Fi)

I1 I2 c2 ∧ c3 I3 A B C D E c1

slide-38
SLIDE 38

Progress Condition

– 09 – 2015-06-11 – Slscsem –

21/50

ψhot

prog(q, qi) = ψMsg(q, qn) ∧ ψCond hot (q, qn) ∧ ψLocInv,• hot

(qn)

  • ψMsg(q, qi) =

ψ∈Msg(qi\q) ψ ∧ j=i

  • ψ∈(Msg(qj\q)\Msg(qi\q)) ¬ψ

  • strict =

ψ∈(E!?∩Msg(L))\Msg(Fi) ¬ψ

  • ψCond

θ

(q, qi) =

γ=(L,φ)∈Cond, Θ(γ)=θ, L∩(qi\q)=∅ φ

  • ψLocInv,•

θ

(q, qi) =

λ=(l,ι,φ,l′,ι′)∈LocInv, Θ(λ)=θ, λ •-active at qi φ

Local invariant (l0, ι0, φ, l1, ι1) is •-active at q if and only if

  • l0 ≺ l ≺ l1, or
  • l = l0 ∧ ι0 = •, or
  • l = l1 ∧ ι1 = •

for some front location l of cut (!) q.

I1 I2 c2 ∧ c3 I3 A B C D E c1

slide-39
SLIDE 39

Example

– 09 – 2015-06-11 – Slscsem –

22/50

q1 q2 q3 q4 q5 q6 q7

true I1 I2

φ

I3

E F G

l1,0 l1,1 l1,2 l2,0 l2,1 l2,2 l2,3 l3,0 l3,1

slide-40
SLIDE 40

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).
slide-41
SLIDE 41

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

Concrete syntax:

LSC: L1 AC: c1 AM: initial I: permissive

I1 I2 I3

E F G

slide-42
SLIDE 42

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

A set of words W ⊆ (C → B)ω is accepted by L if and only if

ΘL am = initial am = invariant cold hot where ac = ac0 ∧ ψCond

cold (∅, C0) ∧ ψMsg(∅, C0); C0 is the minimal (or instance heads) cut.

slide-43
SLIDE 43

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

A set of words W ⊆ (C → B)ω is accepted by L if and only if

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

hot where ac = ac0 ∧ ψCond

cold (∅, C0) ∧ ψMsg(∅, C0); C0 is the minimal (or instance heads) cut.

slide-44
SLIDE 44

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

A set of words W ⊆ (C → B)ω is accepted by L if and only if

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∃ w ∈ W ∃ k ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

hot where ac = ac0 ∧ ψCond

cold (∅, C0) ∧ ψMsg(∅, C0); C0 is the minimal (or instance heads) cut.

slide-45
SLIDE 45

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

A set of words W ⊆ (C → B)ω is accepted by L if and only if

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∃ w ∈ W ∃ k ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

hot ∀ w ∈ W • w0 | = ac = ⇒ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

where ac = ac0 ∧ ψCond

cold (∅, C0) ∧ ψMsg(∅, C0); C0 is the minimal (or instance heads) cut.

slide-46
SLIDE 46

Finally: The LSC Semantics

– 09 – 2015-06-11 – Slscsem –

23/50

A full LSC L = (((L, , ∼), I, Msg, Cond, LocInv, Θ), ac0, am, ΘL ) consist of

  • body ((L, , ∼), I, Msg, Cond, LocInv, Θ),
  • activation condition ac0 ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).

A set of words W ⊆ (C → B)ω is accepted by L if and only if

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∃ w ∈ W ∃ k ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

hot ∀ w ∈ W • w0 | = ac = ⇒ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∀ w ∈ W ∀ k ∈ N0 • wk | = ac = ⇒ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

where ac = ac0 ∧ ψCond

cold (∅, C0) ∧ ψMsg(∅, C0); C0 is the minimal (or instance heads) cut.

slide-47
SLIDE 47

Activation Condition

– 09 – 2015-06-11 – Slscsem –

24/50

LSC: L1 AC: c1 AM: initial I: permissive

I1 I2 I3

E F G

LSC: L1 AM: initial I: permissive

I1 I2 I3

E F G c1

slide-48
SLIDE 48

LSCs vs. Software

– 09 – 2015-06-11 – main –

25/50

slide-49
SLIDE 49

LSCs vs. Software

– 09 – 2015-06-11 – Sswlsc –

26/50 Let S be a software with S = {π = σ0

α1

− − → σ1

α2

− − → σ2 · · · | · · · }. S is called compatible with LSC L over C and E is if and only if

  • Σ = (C → B), i.e. the states are valuations of the conditions in C,
  • A ⊆ E!?, i.e. the events are of the form E!, E?.
slide-50
SLIDE 50

LSCs vs. Software

– 09 – 2015-06-11 – Sswlsc –

26/50 Let S be a software with S = {π = σ0

α1

− − → σ1

α2

− − → σ2 · · · | · · · }. S is called compatible with LSC L over C and E is if and only if

  • Σ = (C → B), i.e. the states are valuations of the conditions in C,
  • A ⊆ E!?, i.e. the events are of the form E!, E?.

Construct letters by joining σi and αi+1 (viewed as a valuation of E!, E?): w(π) = (σ0 ∪ α1), (σ1 ∪ α2), (σ2 ∪ α3), . . .

slide-51
SLIDE 51

LSCs vs. Software

– 09 – 2015-06-11 – Sswlsc –

26/50 Let S be a software with S = {π = σ0

α1

− − → σ1

α2

− − → σ2 · · · | · · · }. S is called compatible with LSC L over C and E is if and only if

  • Σ = (C → B), i.e. the states are valuations of the conditions in C,
  • A ⊆ E!?, i.e. the events are of the form E!, E?.

Construct letters by joining σi and αi+1 (viewed as a valuation of E!, E?): w(π) = (σ0 ∪ α1), (σ1 ∪ α2), (σ2 ∪ α3), . . . We say S satisfies LSC L (e.g. universal, invariant), denoted by S | = L , if and only if ∀ π ∈ S ∀ k ∈ N0 • w(π)k | = ac = ⇒ w(π)k | = ψCond

hot (∅, C0) ∧ w(π)/k + 1 ∈ Lang(B(L ))

slide-52
SLIDE 52

LSCs vs. Software

– 09 – 2015-06-11 – Sswlsc –

26/50 Let S be a software with S = {π = σ0

α1

− − → σ1

α2

− − → σ2 · · · | · · · }. S is called compatible with LSC L over C and E is if and only if

  • Σ = (C → B), i.e. the states are valuations of the conditions in C,
  • A ⊆ E!?, i.e. the events are of the form E!, E?.

Construct letters by joining σi and αi+1 (viewed as a valuation of E!, E?): w(π) = (σ0 ∪ α1), (σ1 ∪ α2), (σ2 ∪ α3), . . . We say S satisfies LSC L (e.g. universal, invariant), denoted by S | = L , if and only if ∀ π ∈ S ∀ k ∈ N0 • w(π)k | = ac = ⇒ w(π)k | = ψCond

hot (∅, C0) ∧ w(π)/k + 1 ∈ Lang(B(L ))

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∃ w ∈ W ∃ k ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

hot ∀ w ∈ W • w0 | = ac = ⇒ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∀ w ∈ W ∀ k ∈ N0 • wk | = ac = ⇒ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

slide-53
SLIDE 53

LSCs vs. Software

– 09 – 2015-06-11 – Sswlsc –

26/50 Let S be a software with S = {π = σ0

α1

− − → σ1

α2

− − → σ2 · · · | · · · }. S is called compatible with LSC L over C and E is if and only if

  • Σ = (C → B), i.e. the states are valuations of the conditions in C,
  • A ⊆ E!?, i.e. the events are of the form E!, E?.

Construct letters by joining σi and αi+1 (viewed as a valuation of E!, E?): w(π) = (σ0 ∪ α1), (σ1 ∪ α2), (σ2 ∪ α3), . . . We say S satisfies LSC L (e.g. universal, invariant), denoted by S | = L , if and only if ∀ π ∈ S ∀ k ∈ N0 • w(π)k | = ac = ⇒ w(π)k | = ψCond

hot (∅, C0) ∧ w(π)/k + 1 ∈ Lang(B(L ))

ΘL am = initial am = invariant cold ∃ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∃ w ∈ W ∃ k ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

hot ∀ w ∈ W • w0 | = ac = ⇒ w0 | = ψCond

hot (∅, C0) ∧ w/1 ∈ Lang(B(L ))

∀ w ∈ W ∀ k ∈ N0 • wk | = ac = ⇒ wk | = ψCond

hot (∅, C0)∧w/k+1 ∈ Lang(B(L ))

Software S satisfies a set of LSCs L1, . . . , Ln if and only if S | = Li for all 1 ≤ i ≤ n.

slide-54
SLIDE 54

Recall: The Crux of Requirements Engineering

– 09 – 2015-06-11 – Sswlsc –

27/50

(Σ × A)ω

?!

Customer Analyst

requirements analysis

One quite effective approach: try to approximate the requirements with positive and negative scenarios.

  • Dear customer, please describe example usages of the desired system.

“If the system is not at all able to do this, then it’s not what I want.”

  • Dear customer, please describe behaviour that the desired system must not show.

“If the system does this, then it’s not what I want.”

  • From there on, refine and generalise:

what about exceptional cases? what about corner-cases? etc.

slide-55
SLIDE 55

Example: Buy A Softdrink

– 09 – 2015-06-11 – Sswlsc –

28/50 LSC: buy softdrink AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT

slide-56
SLIDE 56

Example: Get Change

– 09 – 2015-06-11 – Sswlsc –

29/50 LSC: get change AC: true AM: invariant I: permissive

User

  • Vend. Ma.

C50 E1 pSOFT SOFT chg-C50

slide-57
SLIDE 57

Example: Don’t Give Two Drinks

– 09 – 2015-06-11 – Sprechart –

30/50

slide-58
SLIDE 58

Example: Don’t Give Two Drinks

– 09 – 2015-06-11 – Sprechart –

30/50 LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

slide-59
SLIDE 59

Pre-Charts

– 09 – 2015-06-11 – Sprechart –

31/50

LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

A full LSC L = (PC, MC, ac0, am, ΘL ) actually consist of

  • pre-chart PC = ((LP , P , ∼P ), IP , MsgP , CondP , LocInvP , ΘP ) (possibly empty),
  • main-chart MC = ((LM, M, ∼M), IM, MsgM, CondM, LocInvM, ΘM) (non-empty),
  • activation condition ac ∈ Φ(C), strictness flag strict (otherwise called permissive)
  • activation mode am ∈ {initial, invariant},
  • chart mode existential (ΘL = cold) or universal (ΘL = hot).
slide-60
SLIDE 60

Pre-Charts Semantics

– 09 – 2015-06-11 – Sprechart –

32/50

LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

ΘL am = initial am = invariant cold

∃ w ∈ W ∃ m ∈ N0 • w0 | = ac ∧ w0 | = ψCond

hot (∅, CP 0 )

∧ w/1, . . . , w/m ∈ Lang(B(PC)) ∧ wm+1 | = ψCond

hot (∅, CM 0 )

∧ w/m + 1 ∈ Lang(B(MC)) ∃ w ∈ W ∃ k < m ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, CP 0 )

∧ w/k + 1, . . . , w/m ∈ Lang(B(PC)) ∧ wm+1 | = ψCond

hot (∅, CM 0 )

∧ w/m + 1 ∈ Lang(B(MC))

hot

∀ w ∈ W • w0 | = ac ∧ w0 | = ψCond

hot (∅, CP 0 )

∧ w/1, . . . , w/m ∈ Lang(B(PC)) ∧ wm+1 | = ψCond

cold (∅, CM 0 )

= ⇒ wm+1 | = ψCond

cold (∅, CM 0 )

∧ w/m + 1 ∈ Lang(B(MC)) ∀ w ∈ W ∀ k ≤ m ∈ N0 • wk | = ac ∧ wk | = ψCond

hot (∅, CP 0 )

∧ w/k + 1, . . . , w/m ∈ Lang(B(PC)) ∧ wm+1 | = ψCond

cold (∅, CM 0 )

= ⇒ wm+1 | = ψCond

cold (∅, CM 0 )

∧ w/m + 1 ∈ Lang(B(MC))

slide-61
SLIDE 61

Note: Scenarios and Acceptance Test

– 09 – 2015-06-11 – Sprechart –

33/50

LSC: buy softdrink AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT

LSC: get change AC: true AM: invariant I: permissive

User

  • Vend. Ma.

C50 E1 pSOFT SOFT chg-C50

LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

  • Existential LSCs∗ may hint at test-cases for the acceptance test!

(∗: as well as (positive) scenarios in general, like use-cases)

slide-62
SLIDE 62

Note: Scenarios and Acceptance Test

– 09 – 2015-06-11 – Sprechart –

33/50

LSC: buy softdrink AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT

LSC: get change AC: true AM: invariant I: permissive

User

  • Vend. Ma.

C50 E1 pSOFT SOFT chg-C50

LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

  • Existential LSCs∗ may hint at test-cases for the acceptance test!

(∗: as well as (positive) scenarios in general, like use-cases)

  • Universal LSCs (and negative/anti-scenarios) in general need exhaustive analysis!
slide-63
SLIDE 63

Note: Scenarios and Acceptance Test

– 09 – 2015-06-11 – Sprechart –

33/50

LSC: buy softdrink AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT

LSC: get change AC: true AM: invariant I: permissive

User

  • Vend. Ma.

C50 E1 pSOFT SOFT chg-C50

LSC:

  • nly one drink

AC: true AM: invariant I: permissive

User

  • Vend. Ma.

E1 pSOFT SOFT SOFT ¬C50! ∧ ¬E1! false

  • Existential LSCs∗ may hint at test-cases for the acceptance test!

(∗: as well as (positive) scenarios in general, like use-cases)

  • Universal LSCs (and negative/anti-scenarios) in general need exhaustive analysis!

(Because they require that the software never ever exhibits the unwanted behaviour.)

slide-64
SLIDE 64

Strenghening Scenarios Into Requirements

– 09 – 2015-06-11 – Sprechart –

34/50

(Σ × A)ω

Customer Analyst

requirements analysis

slide-65
SLIDE 65

Strenghening Scenarios Into Requirements

– 09 – 2015-06-11 – Sprechart –

34/50

(Σ × A)ω

(Σ × A)ω

Customer Analyst

requirements analysis

slide-66
SLIDE 66

Universal LSC: Example

– 09 – 2015-06-11 – Sprechart –

35/50

LSC: buy water AC: true AM: invariant I: strict User CoinValidator ChoicePanel Dispenser C50 pWATER water in stock dWATER OK

slide-67
SLIDE 67

Universal LSC: Example

– 09 – 2015-06-11 – Sprechart –

35/50

LSC: buy water AC: true AM: invariant I: strict User CoinValidator ChoicePanel Dispenser C50 pWATER

¬(C50! ∨ E1! ∨ pSOFT! ∨ pTEA! ∨ pFILLUP!

water in stock dWATER OK

slide-68
SLIDE 68

Universal LSC: Example

– 09 – 2015-06-11 – Sprechart –

35/50

LSC: buy water AC: true AM: invariant I: strict User CoinValidator ChoicePanel Dispenser C50 pWATER

¬(C50! ∨ E1! ∨ pSOFT! ∨ pTEA! ∨ pFILLUP!

water in stock dWATER OK

¬(dSoft! ∨ dTEA!)

slide-69
SLIDE 69

Shortcut: Forbidden Elements

– 09 – 2015-06-11 – Sprechart –

36/50

LSC: buy water AC: true AM: invariant I: strict

User CoinValidator ChoicePanel Dispenser C 5 pWATER

¬(C50! ∨ E1! ∨ pSOFT! ∨ pTEA! ∨ pFILLUP!

water in stock dWATER OK

¬(dSoft! ∨ dTEA!)

LSC: buy water AC: true AM: invariant I: strict

User CoinValidator ChoicePanel Dispenser C 5 p W A T E R water in stock dWATER OK

slide-70
SLIDE 70

Modelling Idiom: Enforcing Order

– 09 – 2015-06-11 – Sprechart –

37/50

LSC: L AM: invariant I: permissive

I1 I2 I3 I4

E F

LSC: L AM: invariant I: permissive

I1 I2 I3 I4

E F

true

slide-71
SLIDE 71

– 09 – 2015-06-11 – Sprechart –

38/50

Requirements on Requirements Specifications

– 05 – 2015-05-11 – Sre –

22/90

A requirements specification should be

  • correct

— it correctly represents the wishes/needs of the customer,

  • complete

— all requirements (existing in somebody’s head, or a document, or . . . ) should be present,

  • relevant

— things which are not relevant to the project should not be constrained,

  • consistent, free of contradictions

— each requirement is compatible with all other requirements; otherwise the requirements are not realisable,

  • neutral, abstract

— a requirements specification does not constrain the realisation more than necessary,

  • traceable, comprehensible

— the sources of requirements are documented, requirements are uniquely identifiable,

  • testable, objective

— the final product can objectively be checked for satisfying a requirement.

slide-72
SLIDE 72

Requirements on LSC Specifications

– 09 – 2015-06-11 – Sprechart –

39/50

  • correctness is relative to “in the head of the

customer” → still difficult;

  • complete: we can at least define a kind of

relative completeness in the sense of “did we cover all (exceptional) cases?”;

  • relevant also not analyseable within LSCs;
  • consistency can formally be analysed!
  • neutral/abstract is relative to the realisation

→ still difficult; But LSCs tend to support abstract specifications; specifying technical details is tedious.

  • traceable/comprehensible are

meta-properties, need to be established separately;

  • a formal requirements specification, e.g.

using LSCs, is immediately

  • bjective/testable.

For Decision Tables, we formally defined additional quality criteria:

  • uselessness/vacuity,
  • determinism may be desired,
  • consistency wrt. domain model.

What about LSCs?

slide-73
SLIDE 73

LSCs vs. MSCs

– 09 – 2015-06-11 – main –

40/50

slide-74
SLIDE 74

LSCs vs. MSCs

– 09 – 2015-06-11 – Sdrawbacks –

41/50

Recall: Most severe drawbacks of, e.g., MSCs:

  • unclear interpretation: example scenario or invariant?
  • unclear activation: what triggers the requirement?
  • unclear progress requirement: must all messages be observed?
  • conditions merely comments
  • no means (in language) to express forbidden scenarios

msc event_ordering

proc_a proc_b proc_c m1

m2 m3 m4

(a)

(ITU-T, 2011)

LSC: buy water AC: true AM: invariant I: strict User CoinValidator ChoicePanel Dispenser C50 p W A T E R

¬(C50! ∨ E1! ∨ pSOFT! ∨ pTEA! ∨ pFILLUP!

water in stock dWATER OK

¬(dSoft! ∨ dTEA!)

slide-75
SLIDE 75

Pushing It Even Further

– 09 – 2015-06-11 – Sdrawbacks –

42/50

(Harel and Marelly, 2003)

slide-76
SLIDE 76

Requirements Engineering Wrap-Up

– 09 – 2015-06-11 – main –

43/50

slide-77
SLIDE 77

Recall: Software Specification Example

– 09 – 2015-06-11 – Swrapup –

44/50

http://commons.wikimedia.org (CC-by-sa 4.0, Dirk Ingo Franke)

Alphabet:

  • M

– dispense cash only,

  • C

– return card only,

  • M

C

– dispense cash and return card.

  • Customer 1 “don’t care”
  • M.C
  • C.M
  • M

C

  • Customer 2 “you choose, but be consistent”

(M.C) or (C.M)

  • Customer 3 “consider human errors”

(C.M)

slide-78
SLIDE 78

Recall: Formal Software Development

– 09 – 2015-06-11 – Swrapup –

45/50

Mmmh, Software!

Requirements S1 = {(M.C, · 1), (C.M, · 1)} Design S2 = {(M.TM.C, · 1), (C.TC.M, · 1)} Implementation S = {σ0

τ

− → σ1

τ

− → σ2 · · · , . . . } Development Process/ Project Management

? ? ? ? ?

slide-79
SLIDE 79

Recall: Formal Software Development

– 09 – 2015-06-11 – Swrapup –

45/50

Mmmh, Software!

Requirements S1 = {(M.C, · 1), (C.M, · 1)} Design S2 = {(M.TM.C, · 1), (C.TC.M, · 1)} Implementation S = {σ0

τ

− → σ1

τ

− → σ2 · · · , . . . } Development Process/ Project Management

? ? ? ? ?

elicit req.(in.) analyst customer

elicitation

req.(in.) formalise req.(fo.) analyst

formalisation

req.(fo.) verify req.(fo.) ✔/✘ analyst

verification

req.(fo.) ✘ fix req.(fo.) analyst

repair

req.(fo.) ✔ validate req.(in.) analyst customer

validation

slide-80
SLIDE 80

Final Remarks

– 09 – 2015-06-11 – Swrapup –

46/50

One sometimes distinguishes:

  • Systems Engineering (develop software for an embedded controller)

Requirements typically stated in terms of system observables (“press WATER button”), needs to be mapped to terms of the software!

  • Software Engineering (develop software which interacts with other software)

Requirements stated in terms of the software.

We touched a bit of both, aimed at a general discussion.

  • Once again (can it be mentioned too often?):

Distinguish domain elements and software elements and (try to) keep them apart to avoid confusion.

slide-81
SLIDE 81

Systems vs. Software Engineering

– 09 – 2015-06-11 – Swrapup –

47/50

A Classification of Software

– 03 – 2015-04-30 – Sprocedure –

32/77

Lehmann (Lehman, 1980; Lehman and Ramil, 2001) distinguishes three classes of software (my interpretation, my examples):

  • S-programs: solve mathematical, abstract problems; can exactly (in particular formally)

be specified; tend to be small; can be developed once and for all. Examples: sorting, compiler (!), compute π or √ · , cryptography, textbook examples, . . .

  • P-programs: solve problems in the real world, e.g. read sensors and drive actors, may be

in feedback loop; specification needs domain model (cf. Bjørner (2006), “A tryptich software development paradigm”); formal specification (today) possible, in terms of domain model, yet tends to be expensive Examples: cruise control, autopilot, traffic lights controller, plant automatisation, . . .

  • E-programs: embedded in socio-technical systems; in particular involve humans;

specification often not clear, not even known; can grow huge; delivering the software induces new needs Examples: basically everything else; word processor, web-shop, game, smart-phone apps, . . .

slide-82
SLIDE 82

Literature Recommendation

– 09 – 2015-06-11 – Swrapup –

48/50

(Rupp and die SOPHISTen, 2014)

slide-83
SLIDE 83

References

– 09 – 2015-06-11 – main –

49/50

slide-84
SLIDE 84

References

– 09 – 2015-06-11 – main –

50/50

Harel, D. and Marelly, R. (2003). Come, Let’s Play: Scenario-Based Programming Using LSCs and the Play-Engine. Springer-Verlag. ITU-T (2011). ITU-T Recommendation Z.120: Message Sequence Chart (MSC), 5 edition. Ludewig, J. and Lichter, H. (2013). Software Engineering. dpunkt.verlag, 3. edition. Rupp, C. and die SOPHISTen (2014). Requirements-Engineering und -Management. Hanser, 6th edition.