Docsity

Runtime Verification - Lecture Slides | CIS 700, Study notes of Computer Science

Partial preview of the text

Download Runtime Verification - Lecture Slides | CIS 700 and more Study notes Computer Science in PDF only on Docsity!

  • Runtime Verification (RV) Usa Sammapun University of Pennsylvania September 29,

Introduction

Modeling language

:

CCS, CSP, Kripke^ Verification

:

Model Checking

Language: Java, C, C++, etc.. Verification

:

Formal Test Generation

Language

: CTL

Motivation |^

Limitation of current verificationtechniques^ z^

Model checking z Testing

Model Checking |^

Pro^ z^

Formal z Complete – Provides guarantees

|^

Con^ z^

Doesn’t scale well z Checks design, not implementation

How does RV verify? |^

1. Specify

formal requirements

|^

2. Extract

information from current

executing program

|^

3. Check

the execution against formal

requirements

Runtime Verification

Program

Verifier

ExecutionInformation

Check

Sat / Unsat

Feedback

User

JPaX: Java PathExplorer Klaus Havelund Grigore Rosu (NASA) [HR01, HR04]

JPaX |^

Checks the execution of

Java

program

z^ During program testing to gain info about execution z^ During operation to survey safety critical systems

|^

Extracts interesting events from an executingprogram |^

Checks those events^ z^

Logic based monitoring z Error pattern analysis^ •^

Deadlock • Data race

JPaX Verifier^ Instrumentation(Extracting Info)

Observer (Checking)

Interconnection

Instrumentation Module: How JPaX extracts info

|^

Given^ z^

Java bytecode z Instrumentation specification |^

To extract^ z^

Examine java bytecode z Insert some code at places specifiedinstrumentation specification^ • Logic based / error pattern analysis z Send this info to the observer

Not all info is needed

class C {int x;main() {

x = -1;eval(x,-1);x = -2;eval(x,-2);x = 1;eval(x,1);x = -3;eval(x,-3); }^

}

instrumentation:monitor C.x;proposition A is C.x > 0

Send(A)

Send(A)

Send(A,false)

true

A^

false

false

X = -

X = -

X = 1

X = -

Sent to observer:[ (A,false), A, A ]

Not all info is needed |^

What

eval(x,value)

does

z^ Look at all propositions

P^

corresponding to

variable

x

z^ Evaluate the value of

P^

(true, false)

  • Using value of x z^ If

P^

has no value,

  • Send event
(P, P_val)
to observer

z^ Else

  • If
P^ changes value,
  • Send
(P)
to observer

Interconnection Module

|^

Send extracted info^ z^

From the java program

to the observer

z^ Via socket, shared memory, file |^

Extraced Info^ z^

Event stream

Event Stream

|^

Similar to Kripke structure |^

Kripke |^

Event Stream (Trace)

N^ ,N^1

2

T,N^1

2

N^ ,T^1

2

!A^

A^

!A

[ (A,false), A, A ]