fast-forward runtime monitoring — an industrial case study

34
Semantics & Verificatio n Research Group Department of Computer Science University of Malta Fast-Forward Runtime Monitoring — An Industrial Case Study Christian Colombo Gordon Pace University of Malta

Upload: paloma

Post on 24-Feb-2016

50 views

Category:

Documents


0 download

DESCRIPTION

Fast-Forward Runtime Monitoring — An Industrial Case Study. Christian Colombo Gordon Pace University of Malta. Runtime Verification in Industry. Fear of intrusiveness Code modification Slowdown. Runtime Verification in Industry. Fear of intrusiveness Code modification Slowdown. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fast-Forward Runtime Monitoring — An Industrial Case Study

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Fast-Forward Runtime Monitoring— An Industrial Case Study

Christian ColomboGordon Pace

University of Malta

Page 2: Fast-Forward Runtime Monitoring — An Industrial Case Study

2

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Runtime Verification in Industry

• Fear of intrusiveness– Code modification– Slowdown

Page 3: Fast-Forward Runtime Monitoring — An Industrial Case Study

3

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Runtime Verification in Industry

• Fear of intrusiveness– Code modification– Slowdown

Page 4: Fast-Forward Runtime Monitoring — An Industrial Case Study

4

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Asynchronous Monitoring

Page 5: Fast-Forward Runtime Monitoring — An Industrial Case Study

5

Semantics &Verification

Research GroupDepartment of Computer Science

University 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

Page 6: Fast-Forward Runtime Monitoring — An Industrial Case Study

6

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Approach

• Pausing the system might not always be desirable

Page 7: Fast-Forward Runtime Monitoring — An Industrial Case Study

7

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Approach

• Fast-forwarding the monitor might be a better option

Page 8: Fast-Forward Runtime Monitoring — An Industrial Case Study

8

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

ApproachSystem

Monitor

System

Monitor

Page 9: Fast-Forward Runtime Monitoring — An Industrial Case Study

9

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

ApproachSystem

Monitor

System

MonitorMonitor

Page 10: Fast-Forward Runtime Monitoring — An Industrial Case Study

10

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

ApproachSystem

Monitor

System

Monitor

Page 11: Fast-Forward Runtime Monitoring — An Industrial Case Study

11

Semantics &Verification

Research GroupDepartment of Computer Science

University 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

Page 12: Fast-Forward Runtime Monitoring — An Industrial Case Study

12

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Specification

ab a

cb b

a

Page 13: Fast-Forward Runtime Monitoring — An Industrial Case Study

13

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Normal Monitor Fast-forward Monitor

a c f e w e r w r e r t t r y b q xNormal Trace

z b y k w g h g s y n m pAbstracted Trace

Monitor Configurations Monitor Configurations

Page 14: Fast-Forward Runtime Monitoring — An Industrial Case Study

14

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Normal Monitor Fast-forward Monitor

12

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

Page 15: Fast-Forward Runtime Monitoring — An Industrial Case Study

15

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Normal Monitor Fast-forward Monitor

12

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

Page 16: Fast-Forward Runtime Monitoring — An Industrial Case Study

16

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Normal Monitor Fast-forward Monitor

12

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

Page 17: Fast-Forward Runtime Monitoring — An Industrial Case Study

17

Semantics &Verification

Research GroupDepartment of Computer Science

University 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''

Page 18: Fast-Forward Runtime Monitoring — An Industrial Case Study

18

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Faithful Fast-Forwarding

1

w

w'

w''

1

α(w)

α(w')

α(w'')

Page 19: Fast-Forward Runtime Monitoring — An Industrial Case Study

19

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Over Approximation

1

w

w'1

α(w)

α(w')

α(w'')

Page 20: Fast-Forward Runtime Monitoring — An Industrial Case Study

20

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Under Approximation

1

w

w'

w''

1

α(w)

α(w')

Page 21: Fast-Forward Runtime Monitoring — An Industrial Case Study

21

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Case Study

Page 22: Fast-Forward Runtime Monitoring — An Industrial Case Study

22

Semantics &Verification

Research GroupDepartment of Computer Science

University 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?

Page 23: Fast-Forward Runtime Monitoring — An Industrial Case Study

23

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

ExampleTrace

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

Page 24: Fast-Forward Runtime Monitoring — An Industrial Case Study

24

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Example – Monitors Trace

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

Monitors

U1U2U3U4U5U6

Page 25: Fast-Forward Runtime Monitoring — An Industrial Case Study

25

Semantics &Verification

Research GroupDepartment of Computer Science

University 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

Page 26: Fast-Forward Runtime Monitoring — An Industrial Case Study

26

Semantics &Verification

Research GroupDepartment of Computer Science

University 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

Page 27: Fast-Forward Runtime Monitoring — An Industrial Case Study

27

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Code

Page 28: Fast-Forward Runtime Monitoring — An Industrial Case Study

28

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Code

Page 29: Fast-Forward Runtime Monitoring — An Industrial Case Study

29

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Code

Page 30: Fast-Forward Runtime Monitoring — An Industrial Case Study

30

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Code

Page 31: Fast-Forward Runtime Monitoring — An Industrial Case Study

31

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Theory Instantiation

System

Monitor

System

SQL Monitor SQL Monitor

Page 32: Fast-Forward Runtime Monitoring — An Industrial Case Study

32

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Results

• Normal monitoring– 15 hours / week’s data

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

• Fast-forward : Normal 1 : 25

Page 33: Fast-Forward Runtime Monitoring — An Industrial Case Study

33

Semantics &Verification

Research GroupDepartment of Computer Science

University of Malta

Applications of Results

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

Page 34: Fast-Forward Runtime Monitoring — An Industrial Case Study

34

Semantics &Verification

Research GroupDepartment of Computer Science

University 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