• Ingen resultater fundet

02917 Advanced Topics in Embedded Systems

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "02917 Advanced Topics in Embedded Systems"

Copied!
36
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

02917 Advanced Topics in Embedded Systems

Brief Introduction to Duration Calculus

Michael R. Hansen

(2)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(3)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(4)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(5)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(6)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(7)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(8)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Plan for today:

A motivating example wireless sensor networks

Brief introduction to Duration Calculus

Overview of fundamental (un)decidability results

A basic decidability results – with non-elementary complexity

Towards efficient model checking for Duration Calculus based on approximations

A decision procedure for Presburger Arithmetic At 1 pm: IMM summer party.

(9)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Nodes with solar panels

A node of a wireless sensor network has a solar panel:

(10)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Energy consumption depends on usage

A node has a platform consisting of several components:

(11)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

WSN-Model using parallel automata

A wireless sensor network can be modelled by parallel automata:

WSN = ∥ni=1(Nodei ∥Environmenti) Nodei = SolarPaneli ∥Applicationi Environmenti = Suni

Applicationi = ∥mji

=1Programj∥Platformi

Platformi = Processori∥Sensori ∥Memoryi∥Radioi

...

(12)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

WSN-Requirements expressed in Duration Calculus

Requirements can be modelled by Duration Calculus

There should be sufficient energy during the lifetime:

p(ℓ≤KE0+ Σici

∫suni

| {z }

stored energy

−Σjkj

∫programj

| {z }

consumed energy

>0)

Succinct formulation

Tool support

(13)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

WSN-Requirements expressed in Duration Calculus

Requirements can be modelled by Duration Calculus

There should be sufficient energy during the lifetime:

p(ℓ≤KE0+ Σici

∫suni

| {z }

stored energy

−Σjkj

∫programj

| {z }

consumed energy

>0)

Succinct formulation

Tool support

(14)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

WSN-Requirements expressed in Duration Calculus

Requirements can be modelled by Duration Calculus

There should be sufficient energy during the lifetime:

p(ℓ≤KE0+ Σici

∫suni

| {z }

stored energy

−Σjkj

∫programj

| {z }

consumed energy

>0)

Succinct formulation

Tool support

(15)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

WSN-Requirements expressed in Duration Calculus

Requirements can be modelled by Duration Calculus

There should be sufficient energy during the lifetime:

p(ℓ≤KE0+ Σici∫ suni

| {z }

stored energy

−Σjkj

programj

| {z }

consumed energy

>0)

Succinct formulation

Tool support

(16)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(17)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(18)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(19)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(20)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(21)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Background

Provable Correct Systems (ProCoS, ESPRIT BRA 3104) Bjørner Langmaack Hoare Olderog

Project case study: Gas Burner Sørensen Ravn Rischel

Intervals properties

Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit Clock Temporal,. . .,Alur, Dill, Jahanian, Mok, Koymans, Harel, Lichtenstein, Pnueli,. . .

Duration of states

Duration Calculus Zhou Hoare Ravn 91

— an Interval Temporal Logic Halpern Moszkowski Manna

Logical Calculi, Applications, Mechanical Support

Duration Calculus: A formal approach to real-time systems Zhou Chaochen and Michael R. Hansen

Springer 2004

Current focus: Tool support with applications

(22)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

A ProCoS Case Study: Gas Burner System

State variablesmodellingGas andFlame:

G,F:𝕋ime→ {0,1}

State expressionmodelling that gas isLeaking L=ˆG∧ ¬F

Requirement

Gas must at most be leaking 1/20 of the elapsed time (e−b)≥60s ⇒ 20∫e

bL(t)dt ≤(e−b)

(23)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

A ProCoS Case Study: Gas Burner System

State variablesmodellingGas andFlame:

G,F:𝕋ime→ {0,1}

State expressionmodelling that gas isLeaking L=ˆG∧ ¬F

Requirement

Gas must at most be leaking 1/20 of the elapsed time (e−b)≥60s ⇒ 20∫e

bL(t)dt ≤(e−b)

(24)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

A ProCoS Case Study: Gas Burner System

State variablesmodellingGas andFlame:

G,F:𝕋ime→ {0,1}

State expressionmodelling that gas isLeaking L=ˆG∧ ¬F

Requirement

Gas must at most be leaking 1/20 of the elapsed time (e−b)≥60s ⇒ 20∫e

bL(t)dt ≤(e−b)

(25)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Gas Burner example: Design decisions

Leaks are detectable and stoppable within 1s:

∀c,d:bc<de.(L[c,d] ⇒ (d−c)≤1s) where

P[c,d] =ˆ ∫d

cP(t) = (dc)>0 which reads “P holds throughout[c,d]”

At least 30s between leaks:

∀c,d,r,s:bc<r<s<de.

(L[c,r]∧ ¬L[r,s]∧L[s,d]) ⇒ (s−r)≥30s

Proof obligation: Conjunction of design decisions implies the requirements.

(26)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Gas Burner example: Design decisions

Leaks are detectable and stoppable within 1s:

∀c,d:bc<de.(L[c,d] ⇒ (d−c)≤1s) where

P[c,d] =ˆ ∫d

cP(t) = (dc)>0 which reads “P holds throughout[c,d]”

At least 30s between leaks:

∀c,d,r,s:bc<r<s<de.

(L[c,r]∧ ¬L[r,s]∧L[s,d]) ⇒ (s−r)≥30s

Proof obligation: Conjunction of design decisions implies the requirements.

(27)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Gas Burner example: Design decisions

Leaks are detectable and stoppable within 1s:

∀c,d:bc<de.(L[c,d] ⇒ (d−c)≤1s) where

P[c,d] =ˆ ∫d

cP(t) = (dc)>0 which reads “P holds throughout[c,d]”

At least 30s between leaks:

∀c,d,r,s:bc<r<s<de.

(L[c,r]∧ ¬L[r,s]∧L[s,d]) ⇒ (s−r)≥30s

Proof obligation: Conjunction of design decisions implies the requirements.

(28)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Interval Logic - Halpern Moszkowski Manna 83

Terms: 𝜃 ::= xv∣𝜃1+𝜃n∣ . . . Temporal Variable v:𝕀ntv→ℝ Formulas: 𝜙 ::= 𝜃1=𝜃n∣ ¬𝜙∣𝜙∨𝜓∣𝜙𝜓∣(∃x)𝜙∣ . . . chop

𝜙:𝕀ntv→ {tt,ff}

Chop:

𝜙𝜓

z }| {

b m e

| {z }

𝜙 | {z }

𝜓

for somem:bme

In DC: 𝕀ntv={[a,b]a,b∈ℝ∧ab}

(29)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Interval Logic - Halpern Moszkowski Manna 83

Terms: 𝜃 ::= xv∣𝜃1+𝜃n∣ . . . Temporal Variable v:𝕀ntv→ℝ Formulas: 𝜙 ::= 𝜃1=𝜃n∣ ¬𝜙∣𝜙∨𝜓∣𝜙𝜓∣(∃x)𝜙∣ . . . chop

𝜙:𝕀ntv→ {tt,ff}

Chop:

𝜙𝜓

z }| {

b m e

| {z }

𝜙 | {z }

𝜓

for somem:bme

In DC: 𝕀ntv={[a,b]a,b∈ℝ∧ab}

(30)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Interval Logic - Halpern Moszkowski Manna 83

Terms: 𝜃 ::= xv∣𝜃1+𝜃n∣ . . . Temporal Variable v:𝕀ntv→ℝ Formulas: 𝜙 ::= 𝜃1=𝜃n∣ ¬𝜙∣𝜙∨𝜓∣𝜙𝜓∣(∃x)𝜙∣ . . . chop

𝜙:𝕀ntv→ {tt,ff}

Chop:

𝜙𝜓

z }| {

b m e

| {z }

𝜙 | {z }

𝜓

for somem:bme

In DC: 𝕀ntv={[a,b]a,b∈ℝ∧ab}

(31)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Duration Calculus - Zhou Hoare Ravn 91

Extends Interval Temporal Logic as follows:

State variables P: 𝕋ime→ {0,1} Finite Variability

State expressions S ::= 0∣1∣P∣ ¬S∣S1S2

S:𝕋ime→ {0,1} pointwise defined

Durations ∫

S:𝕀ntv→ℝdefined on[b,e]by

e b

S(t)dt

–Temporal variables with a structure

(32)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Duration Calculus - Zhou Hoare Ravn 91

Extends Interval Temporal Logic as follows:

State variables P: 𝕋ime→ {0,1} Finite Variability

State expressions S ::= 0∣1∣P∣ ¬S∣S1S2

S:𝕋ime→ {0,1} pointwise defined

Durations ∫

S:𝕀ntv→ℝdefined on[b,e]by

e b

S(t)dt

–Temporal variables with a structure

(33)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Duration Calculus - Zhou Hoare Ravn 91

Extends Interval Temporal Logic as follows:

State variables P: 𝕋ime→ {0,1} Finite Variability

State expressions S ::= 0∣1∣P∣ ¬S∣S1S2

S:𝕋ime→ {0,1} pointwise defined

Durations ∫

S:𝕀ntv→ℝdefined on[b,e]by

e b

S(t)dt

–Temporal variables with a structure

(34)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Example: Gas Burner

Requirement

ℓ≥60 ⇒ 20∫ L≤ℓ Design decisions

D1 =ˆ □(⌈⌈L⌉⌉ ⇒ ℓ≤1)

D2 =ˆ □((⌈⌈L⌉⌉⌈⌈¬L⌉⌉⌈⌈L⌉⌉) ⇒ ℓ≥30) whereℓdenotes thelengthof the interval, and

♢𝜙 =ˆtrue𝜙true “for some sub-interval:𝜙”

□𝜙 =ˆ¬♢¬𝜙 “for all sub-intervals:𝜙”

⌈⌈P⌉⌉ =ˆ∫

P=ℓ ∧ ℓ >0 “P holds throughout a non-point interval”

succinct formulation — no interval endpoints

(35)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Example: Gas Burner

Requirement

ℓ≥60 ⇒ 20∫ L≤ℓ Design decisions

D1 =ˆ □(⌈⌈L⌉⌉ ⇒ ℓ≤1)

D2 =ˆ □((⌈⌈L⌉⌉⌈⌈¬L⌉⌉⌈⌈L⌉⌉) ⇒ ℓ≥30) whereℓdenotes thelengthof the interval, and

♢𝜙 =ˆtrue𝜙true “for some sub-interval:𝜙”

□𝜙 =ˆ¬♢¬𝜙 “for all sub-intervals:𝜙”

⌈⌈P⌉⌉ =ˆ∫

P=ℓ ∧ ℓ >0 “P holds throughout a non-point interval”

succinct formulation — no interval endpoints

(36)

02917 Advanced

Topics in Embedded

Systems Michael R. Hansen

Example: Gas Burner

Requirement

ℓ≥60 ⇒ 20∫ L≤ℓ Design decisions

D1 =ˆ □(⌈⌈L⌉⌉ ⇒ ℓ≤1)

D2 =ˆ □((⌈⌈L⌉⌉⌈⌈¬L⌉⌉⌈⌈L⌉⌉) ⇒ ℓ≥30) whereℓdenotes thelengthof the interval, and

♢𝜙 =ˆtrue𝜙true “for some sub-interval:𝜙”

□𝜙 =ˆ¬♢¬𝜙 “for all sub-intervals:𝜙”

⌈⌈P⌉⌉ =ˆ∫

P=ℓ ∧ ℓ >0 “P holds throughout a non-point interval”

succinct formulation — no interval endpoints

Referencer

RELATEREDE DOKUMENTER

?Energy control, air-conditioning, safety systems, etc.

• Project case study: Gas Burner Sørensen Ravn Rischel Intervals properties.. Timed Automata, Real-time Logic, Metric Temporal Logic, Explicit

Satisfiability is reduced to emptiness of regular languages Decidable result for both discrete and continuous time Seemingly small extensions give undecidable subsets.. RDC

FAU SAR.2 Restricted audit review FAU STG.1 Protected audit trail storage FCS CKM.1 Cryptographic key generation FCS CKM.2 Cryptographic key distribution FCS CKM.4 Cryptographic

This brings another problem. We can guarantee the safety or the security, but not both. Safety requires slow updates to validate the system and ensure it is still safe. Security

FDP ITC.1 Import of user data without security attributes (Limited) FDP ITC.1.1 The TSF shall enforce the Workflow flow SFP and the limited application SFP when importing user

Embedded systems kernel development and implementation, single address space operating systems, generalized bootstrapping.... 2.2 Introduction to

Integrated Management Information Systems an holistic