semantics & verification research group department of computer science university of malta...

Post on 25-Dec-2015

219 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Fast-Forward Runtime Monitoring— An Industrial Case Study

Christian ColomboGordon Pace

University of Malta

2

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Runtime Verification in Industry

• Fear of intrusiveness– Code modification– Slowdown

3

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Runtime Verification in Industry

• Fear of intrusiveness– Code modification– Slowdown

4

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Asynchronous Monitoring

5

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Problem

• It may take too long for the monitor to come/remain up to scratch with the system– During initialisation– During heavy load on system– If monitoring resources are low when

compared to system resources

6

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Approach

• Pausing the system might not always be desirable

7

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Approach

• Fast-forwarding the monitor might be a better option

8

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

ApproachSystem

Monitor

System

Monitor

9

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

ApproachSystem

Monitor

System

MonitorMonitor

10

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

ApproachSystem

Monitor

System

Monitor

11

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Fast-Forwarding

• Ideal– Failure in normal Failure in fast-forward

• Over approximation (high risk)– Failure in normal Failure in fast-forward

• Under approximation (low risk)– Failure in normal Failure in fast-forward

12

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Specification

ab

a

cb b

a

13

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Normal Monitor Fast-forward Monitor

a c f e w e r w r e r t t r y b q x

Normal Trace

z b y k w g h g s y n m p

Abstracted Trace

Monitor Configurations Monitor Configurations

14

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Normal Monitor Fast-forward Monitor

1

2

31

3

a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p

15

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Normal Monitor Fast-forward Monitor

1

2

31

3

13

a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p

z b y k w g h g s y n m p

16

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Normal Monitor Fast-forward Monitor

1

2

31

3

13

13

2

a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p

a c f e w e r w r e r t t r y b q x z b y k w g h g s y n m p

17

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Comparing Monitor Configurations

• To cater for quasi-identical monitor configuration states the notion of equality is defined as:

• B(1) = {w,w’,w’’}• 1 =c 2 iff B(1)=B(2)

1

w

w'

w''

2

w

w'

w''

18

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Faithful Fast-Forwarding

1

w

w'

w''

1

α(w)

α(w')

α(w'')

19

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Over Approximation

1

w

w'1

α(w)

α(w')

α(w'')

20

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Under Approximation

1

w

w'

w''

1

α(w)

α(w')

21

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Case Study

22

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Case Study Initialisation

• System has been running for years• Thousands of users are already active

– How many monitors to be instantiated?– What is their monitor state?– What are their variable values?

23

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

ExampleTrace

U1: DormantU2: LoadU2: PurchaseU1: ThawU1: LoadU1: PurchaseU3: TransferU3: LoadU1: TransferU4: DormantU5: DormantU1: PurchaseU6: TransferU5: ThawU6: Load

24

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Example – Monitors Trace

U1: DormantU2: LoadU2: PurchaseU1: ThawU1: LoadU1: PurchaseU3: TransferU3: LoadU1: TransferU4: DormantU5: DormantU1: PurchaseU6: TransferU5: ThawU6: Load

Monitors

U1U2U3U4U5U6

25

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Example – Monitor States Trace

U1: DormantU2: LoadU2: PurchaseU1: ThawU1: LoadU1: PurchaseU3: TransferU3: LoadU1: TransferU4: DormantU5: DormantU1: PurchaseU6: TransferU5: ThawU6: Load

Monitors

U1U2U3U4U5U6

Monitor States

U1: NonDormU2: NonDormU3: NonDormU4: DormU5: ThawedU6: NonDorm

26

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Example – Timers Trace

4: U1: Dormant 9: U2: Load14: U2: Purchase17: U1: Thaw28: U1: Load34: U1: Purchase45: U3: Transfer49: U3: Load67: U1: Transfer71: U4: Dormant73: U5: Dormant82: U1: Purchase90: U6: Transfer94: U5: Thaw107: U6: Load

Monitors

U1U2U3U4U5U6

Monitor States

U1: NonDormU2: NonDormU3: NonDormU4: DormU5: ThawedU6: NonDorm

Dormancy Timer Reset

U1: 82U2: 14U3: 49U4: n/aU5: n/aU6: 107

Thaw Timer Reset

U1: n/aU2: n/aU3: n/aU4: n/aU5: 94U6: n/a

27

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Code

28

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Code

29

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Code

30

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Code

31

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Theory Instantiation

System

Monitor

System

SQL Monitor SQL Monitor

32

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Results

• Normal monitoring– 15 hours / week’s data

• Fast-forwarded monitoring– 0.6 hours / week’s data

• Fast-forward : Normal 1 : 25

33

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Applications of Results

• Fast monitor bootstrapping• Burst monitoring• Synchronous/asynchronous monitoring

34

Semantics &Verification

Research Group

Department of Computer ScienceUniversity of Malta

Conclusion

• Fine-tune system-monitor relationship• An affective way of initialising monitors quickly• Applied to an industrial case study with

promising results• No automated way• Not easy to write fast monitors

top related