61
Automatic Verification of RMA Programs via Abstraction Extrapolation Cedric Baumann 1 , Andrei Marian Dan 1 , Yuri Meshman 2 , Torsten Hoefler 1 , Martin Vechev 1 1 Department of Computer Science, ETH Zurich, Switzerland 2 IMDEA Software Institute, Madrid, Spain 1

Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Automatic Verification of RMA Programs viaAbstraction Extrapolation

Cedric Baumann1, Andrei Marian Dan1, Yuri Meshman2,

Torsten Hoefler1, Martin Vechev1

1 Department of Computer Science, ETH Zurich, Switzerland2 IMDEA Software Institute, Madrid, Spain

1

Page 2: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

2

High-Performance Computing

Modern datacenters

Widely supported (Cray Aries and Gemini,Infiniband, IBM Blue Gene and Percs)

Page 3: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

3

Page 4: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

X = get(Y, P2);

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

4

Page 5: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

X = get(Y, P2);

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

5

Page 6: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

6

Page 7: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

7

Page 8: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

8

Page 9: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Remote Memory Access (RMA) Networks

MEMORY MEMORY

NIC

PCIe

CPU

NIC

PCIe

CPU

(X) (Y)

Low latency High bandwidth

9

Page 10: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Goal

Given an infinite-state program P running on an RMA network and a safety specification S, does P satisfy S under RMA?

P ⊨RMA S

10

RMA asynchronous executions determine a weak-consistency memory model, more relaxed than x86 TSO, PSO, RMO

Page 11: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

11

Page 12: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Sequential Consistency (SC) Yes

12

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

Page 13: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Sequential Consistency (SC) Yes

Remote Memory Access (RMA) No13

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

Page 14: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

Sequential Consistency (SC) Yes

Remote Memory Access (RMA) No14

Page 15: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);flush(P1);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

15

Page 16: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);flush(P1);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

Remote Memory Access (RMA) Yes16

Page 17: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 1:

shared X = 1;

Process 2:

shared Y = 2, Z = 0;local a;

put(X, P1, Y);flush(P1);store Y = 3;Z = get(X, P1);load a = Z;

assert final (a != 3);

Remote Memory Access (RMA) Yes17

Page 18: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

This work

Main steps:

1. Prove that P satisfies S under SC:P ⊨SC S

2. Construct P’ under SC that captures all behaviors of P under RMA: P’ ⊨SC S ⇒ P ⊨RMA S

3. Prove that P’ ⊨SC S

18

Page 19: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

This work

Key Idea: Extrapolate the abstraction of P under SC to an abstraction of P under RMA

Main steps:

1. Prove that P satisfies S under SC:P ⊨SC S

2. Construct P’ under SC that captures all behaviors of P under RMA: P’ ⊨SC S ⇒ P ⊨RMA S

3. Prove that P’ ⊨SC S

19

Page 20: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Predicate Abstraction

Successful for sequential program analysis:

Original by Graf and Saidi (CAV '96)

Used by Microsoft's SLAM for device drivers (PLDI '01)

Work for SC concurrent programs and weak memory models (x86 TSO, PSO):

Kroening et al. (CAV '11), Gupta et al. (CAV '11), Dan et al. (SAS '13)

20

Page 21: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Classic Predicate Abstraction

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Build a boolean program B that over-approximates the behaviors of P:

B ⊨SC S ⇒ P ⊨SC S

21

Page 22: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Classic Predicate Abstraction

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Build a boolean program B that over-approximates the behaviors of P:

B ⊨SC S ⇒ P ⊨SC S

Using an abstract model checker, verify that B satisfies S:

B ⊨SC S

22

Page 23: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 1: Verify program P under SC

Assume the RMA statements execute synchronously

put(Y, P1, X); Y = X;

23

Page 24: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 1: Verify program P under SC

Assume the RMA statements execute synchronously

put(Y, P1, X); Y = X;

Find a set of predicates V

Build the boolean program B that over-approximates P, using V

Verify that B satisfies the property S under sequential consistency

24

Page 25: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 2: Encode RMA effects into the program

Program P

Reduction

Program P’

Reduce the problem of verifying P under RMA to the problem of verifying P’ under SC

P’ ⊨SC S ⇒ P ⊨RMA S

25

Page 26: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 2: Encode RMA effects into the program

put(Y, P1, X);Program P

Reduction

Program P’

26

Page 27: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 2: Encode RMA effects into the program

put(Y, P1, X);

if (!putActive) //boolean flagputActive = true ;XSet = {X}; //set variable

elseaddToSet(XSet, X); //adds X to XSet

Program P

Reduction

Program P’

27

Page 28: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Process 2:

shared Y = 0;local r;

load r = Y;

Example program P under RMA semantics

Process 1:

shared X = 0;

put(Y, P2, X);store X = 1;

28

Page 29: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Theorem. P’ under SC soundly approximates P under RMA.

Process 1:

shared X = 0;

//put(Y, P2, X);putActive = true ;XSet = {X};

//store X = 1;store X = 1;addToSet(Xset, X);

Process 2:

shared Y = 0;local r;

//nondeterministic opif (*)

Y = randomElem(XSet);putActive = false;

//load r = Y;load r = Y;

Example: Reduced program P’ under SC that captures the behaviors of P under RMA

29

Page 30: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Find new predicates for program P’

Predicates for the boolean flags:

(putActive == true)

30

Page 31: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Find new predicates for program P’

Predicates for the boolean flags:

(putActive == true)

Predicates for the set variables?

31

Page 32: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Idea: Discover predicates for P’ using the predicates for program P under SC.

Preds V

Pred Extrapolation

Preds V’

32

Page 33: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Idea: Discover predicates for P’ using the predicates for program P under SC.

(X < 0)Preds V

Pred Extrapolation

Preds V’

33

Page 34: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Idea: Discover predicates for P’ using the predicates for program P under SC.

(X < 0)

(XSet < 0)

Preds V

Pred Extrapolation

Preds V’

34

Page 35: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Step 3: Prove that P’ ⊨SC S

Idea: Discover predicates for P’ using the predicates for program P under SC.

(X < 0)

(XSet < 0)

Preds V

Pred Extrapolation

Preds V’

(X < Y)

(XSet < Y)

(X < YSet)

35

Page 36: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Logic of the predicates (first attempt)

(XSet < 0)

true, ∀ e ∈ XSet | e < 0

*, otherwise

false, ∃ e ∈ XSet | e ≥ 0

36

Page 37: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Logic of the predicates (first attempt)

(XSet < 0)

true, ∀ e ∈ XSet | e < 0

*, otherwise

false, ∃ e ∈ XSet | e ≥ 0

Problem: Would have to add the predicate (XSet ≥ 0) to track whether all elements of the set are greater than 0.

37

Page 38: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Logic of the predicates for the set variables

(XSet < 0)

true, ∀ e ∈ XSet | e < 0

*, otherwise

false, ∀ e ∈ XSet | e ≥ 0

Solution: Refine the case when the predicate is false

38

Page 39: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

So far

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Prove that P ⊨SC S39

Page 40: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Problem

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’2x3x

Prove that P ⊨SC S40

Page 41: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Problem

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’2x

Predicate Abstraction

Timeout

3x

Prove that P ⊨SC S41

Page 42: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Problem

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’2x

Predicate Abstraction

Timeout

Most time used by the SMT solver, computing the abstract transformers

3x

Prove that P ⊨SC S42

Page 43: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Core problem: computing abstract transformers

∀ st ∈ Statements∀ p ∈ V’

∀ c ∈ Cubes(V’)if c ⇒ wp(p, st) //SMT call

add c to the transformer

Literals q = p or q = ¬p, p ∈ V’Cubes(V’) = {q1 ∧ … ∧ qj}

|Cubes(V’)| = 3|V’|

43

Page 44: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Key Idea

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Prove that P ⊨SC S

44

Page 45: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Key Idea

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Prove that P ⊨SC S

45

Page 46: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Key Idea

Program P Preds V

Predicate Abstraction

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Bool Prog Extrapolation

Bool Prog B’

Prove that P ⊨SC S

Bool Prog B

46

Page 47: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Boolean Program Extrapolation

Extrapolate the abstract transformers from the boolean program of the SC proof.

Zero calls to the SMT solver for building the boolean program

Theorem. The boolean program B’ soundly approximates of the boolean program PredicateAbstraction(P’, V’).

47

Page 48: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P’

Preds V Preds V’

(X>0), (Y>Z), (Z>0) (X>0), (Y>Z), (Z>0)(YSet>Z), ...

Abstract transformer for randomElem

48

Program P

Bool Prog B Bool Prog B’

addElem(Yset, Y)

?

Page 49: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P’

Preds V Preds V’

(X>0), (Y>Z), (Z>0) (X>0), (Y>Z), (Z>0)(YSet>Z), ...

Abstract transformer for randomElem

49

Program P

Bool Prog B Bool Prog B’

addElem(Yset, Y)

(YSet>Z) = true, (YSet>Z) ∧ (Y>Z)false, ¬(YSet>Z) ∧ ¬(Y>Z)*, otherwise

Page 50: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P’

X = randomElem(YSet)

Preds V Preds V’

(X>0), (Y>Z), (Z>0) (X>0), (Y>Z), (Z>0)(YSet>Z), ...

Abstract transformer for randomElem

50

Program P

Bool Prog B Bool Prog B’

?

Page 51: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P’

X = randomElem(YSet)

Preds V Preds V’

(X>0), (Y>Z), (Z>0) (X>0), (Y>Z), (Z>0)(YSet>Z), ...

Abstract transformer for randomElem

51

Program P

X = Y

Bool Prog B

(X>0) = true, (Y>Z) ∧ (Z>0)false, ¬(Y>Z) ∧ ¬(Z>0)*, otherwise

Bool Prog B’

?

Page 52: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P’

X = randomElem(YSet)

Preds V Preds V’

(X>0), (Y>Z), (Z>0) (X>0), (Y>Z), (Z>0)(YSet>Z), ...

Abstract transformer for randomElem

52

Program P

X = Y

Bool Prog B

(X>0) = true, (Y>Z) ∧ (Z>0)false, ¬(Y>Z) ∧ ¬(Z>0)*, otherwise

Bool Prog B’

(X>0) = true, (YSet>Z) ∧ (Z>0)false, ¬(YSet>Z) ∧ ¬(Z>0)*, otherwise

Page 53: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Bool Prog Extrapolation

Bool Prog B’

Abstract Model Checker

Verified Counter ExProve that P ⊨SC S

Prove that P ⊨RMA S53

Page 54: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Implementation

Predicate Abstraction: cone of influence, Z3 SMT solver

3-valued model checker: Fender

Benchmarks: 14 concurrent algorithms, 2-3 processes, 25-85 lines of code, several have infinite number of states

Specifications: mutual exclusion or reachability invariants

Flush search: start with flush after each remote statement, and try removing

54

Page 55: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

SC Predicate Abstraction RMA Predicate Abstraction

Algorithm |V| B (s) B (loc) |V’| B’ (loc) Fender (s)

Min flush

Dekker 11 1 498 29 2068 294 4/12

Peterson 10 1 356 21 1045 3 4/7

ABP 16 1 485 20 662 1 2/2

Pc1 18 2 658 35 3797 65 2/7

Pgsql 12 1 418 18 1549 1 2/4

Qw 13 2 487 29 1544 1345 4/5

Sober 23 7 831 48 8466 4 0/9

Kessel 18 3 534 36 1621 45 4/10

Loop2_TLM 29 66 1068 43 1986 2204 2/4

Szymanski 34 228 1182 64 7081 316 7/14

Queue 13 35 572 22 1104 14 1/2

Ticket 17 117 640 43 3615 3493 5/6

Bakery 19 337 828 41 2947 203 6/10

RMA Lock 24 50 763 60 5932 65679 9/18 55

Page 56: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

56

SC Predicate Abstraction RMA Predicate Abstraction

Algorithm |V| B (s) B (loc) |V’| B’ (loc) Fender (s)

Min flush

Dekker 11 1 498 29 2068 294 4/12

Peterson 10 1 356 21 1045 3 4/7

ABP 16 1 485 20 662 1 2/2

Pc1 18 2 658 35 3797 65 2/7

Pgsql 12 1 418 18 1549 1 2/4

Qw 13 2 487 29 1544 1345 4/5

Sober 23 7 831 48 8466 4 0/9

Kessel 18 3 534 36 1621 45 4/10

Loop2_TLM 29 66 1068 43 1986 2204 2/4

Szymanski 34 228 1182 64 7081 316 7/14

Queue 13 35 572 22 1104 14 1/2

Ticket 17 117 640 43 3615 3493 5/6

Bakery 19 337 828 41 2947 203 6/10

RMA Lock 24 50 763 60 5932 65679 9/18

Page 57: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

57

SC Predicate Abstraction RMA Predicate Abstraction

Algorithm |V| B (s) B (loc) |V’| B’ (loc) Fender (s)

Min flush

Dekker 11 1 498 29 2068 294 4/12

Peterson 10 1 356 21 1045 3 4/7

ABP 16 1 485 20 662 1 2/2

Pc1 18 2 658 35 3797 65 2/7

Pgsql 12 1 418 18 1549 1 2/4

Qw 13 2 487 29 1544 1345 4/5

Sober 23 7 831 48 8466 4 0/9

Kessel 18 3 534 36 1621 45 4/10

Loop2_TLM 29 66 1068 43 1986 2204 2/4

Szymanski 34 228 1182 64 7081 316 7/14

Queue 13 35 572 22 1104 14 1/2

Ticket 17 117 640 43 3615 3493 5/6

Bakery 19 337 828 41 2947 203 6/10

RMA Lock 24 50 763 60 5932 65679 9/18

Page 58: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

58

SC Predicate Abstraction RMA Predicate Abstraction

Algorithm |V| B (s) B (loc) |V’| B’ (loc) Fender (s)

Min flush

Dekker 11 1 498 29 2068 294 4/12

Peterson 10 1 356 21 1045 3 4/7

ABP 16 1 485 20 662 1 2/2

Pc1 18 2 658 35 3797 65 2/7

Pgsql 12 1 418 18 1549 1 2/4

Qw 13 2 487 29 1544 1345 4/5

Sober 23 7 831 48 8466 4 0/9

Kessel 18 3 534 36 1621 45 4/10

Loop2_TLM 29 66 1068 43 1986 2204 2/4

Szymanski 34 228 1182 64 7081 316 7/14

Queue 13 35 572 22 1104 14 1/2

Ticket 17 117 640 43 3615 3493 5/6

Bakery 19 337 828 41 2947 203 6/10

RMA Lock 24 50 763 60 5932 65679 9/18

Page 59: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

59

SC Predicate Abstraction RMA Predicate Abstraction

Algorithm |V| B (s) B (loc) |V’| B’ (loc) Fender (s)

Min flush

Dekker 11 1 498 29 2068 294 4/12

Peterson 10 1 356 21 1045 3 4/7

ABP 16 1 485 20 662 1 2/2

Pc1 18 2 658 35 3797 65 2/7

Pgsql 12 1 418 18 1549 1 2/4

Qw 13 2 487 29 1544 1345 4/5

Sober 23 7 831 48 8466 4 0/9

Kessel 18 3 534 36 1621 45 4/10

Loop2_TLM 29 66 1068 43 1986 2204 2/4

Szymanski 34 228 1182 64 7081 316 7/14

Queue 13 35 572 22 1104 14 1/2

Ticket 17 117 640 43 3615 3493 5/6

Bakery 19 337 828 41 2947 203 6/10

RMA Lock 24 50 763 60 5932 65679 9/18

Page 60: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P Program P’

Preds V Preds V’

Bool Prog B Bool Prog B’

Reduction

Conclusion

Pred Extrapolation

Bool Prog Extrapolation

P ⊨SC S P ⊨RMA S

60

Page 61: Automatic Verication of RMA Programs via Abstraction …practicalsynthesis.github.io/papers/slides-vmcai18.pdf · Automatic Verification of RMA Programs via Abstraction Extrapolation

Program P Preds V

Predicate Abstraction

Bool Prog B

Abstract Model Checker

Verified Counter Ex

Program P Preds V

ReductionPred

Extrapolation

Program P’ Preds V’

Bool Prog Extrapolation

Bool Prog B’

Abstract Model Checker

Verified Counter ExProve that P ⊨SC S

Prove that P ⊨RMA S61