Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic...

45
CSE507 Emina Torlak [email protected] courses.cs.washington.edu/courses/cse507/14au/ Computer-Aided Reasoning for Software Symbolic Execution

Transcript of Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic...

Page 1: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

CSE507Emina Torlak [email protected]

courses.cs.washington.edu/courses/cse507/14au/

Computer-Aided Reasoning for Software

Symbolic Execution

Page 2: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Today

2

Page 3: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Today

2

Last lecture• Bounded verification: forward VCG for finitized programs

Page 4: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Today

2

Last lecture• Bounded verification: forward VCG for finitized programs

Today • Symbolic execution: a path-based translation

• Concolic testing

Page 5: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Con

fiden

ce

Cost (programmer effort, time, expertise)

The spectrum of program validation tools

3

VerificationStatic Analysis

Extended Static Checking

Ad-hoc Testing

Concolic Testing & Whitebox Fuzzing

Bounded Verification & Symbolic Execution

Page 6: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Con

fiden

ce

Cost (programmer effort, time, expertise)

The spectrum of program validation tools

3

VerificationStatic Analysis

Extended Static Checking

Ad-hoc Testing

Concolic Testing & Whitebox Fuzzing

E.g., JPF, Klee

Bounded Verification & Symbolic Execution

E.g., SAGE, Pex, CUTE, DART

Page 7: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Symbolic execution

4

1976: A system to generate test data and symbolically execute programs (Lori Clarke)

1976: Symbolic execution and program testing (James King)

2005-present: practical symbolic execution

• Using SMT solvers

• Heuristics to control exponential explosion

• Heap modeling and reasoning about pointers

• Environment modeling

• Dealing with solver limitations

Page 8: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

Page 9: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

Page 10: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

Page 11: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X y ↦ Y

X ≤ Y

Page 12: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X y ↦ Y

X ≤ Y

feasible

Page 13: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X y ↦ Y

X ≤ YX > Y

feasible

Page 14: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true feasible

Page 15: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true

true

feasible

Page 16: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true

true

x ↦ Y y ↦ X

Y - X ≤ 0

feasible

Page 17: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true

true

x ↦ Y y ↦ X

Y - X ≤ 0

feasible

feasible

Page 18: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true

true

x ↦ Y y ↦ X

x ↦ Y y ↦ X

Y - X ≤ 0Y - X > 0

feasible

feasible

Page 19: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution

5

Execute the program on symbolic values.

Symbolic state maps variables to symbolic values.

Path condition is a quantifier-free formula over the symbolic inputs that encodes all branch decisions taken so far.

All paths in the program form its execution tree, in which some paths are feasible and some are infeasible.

def f (x, y): if (x > y):

x = x + y y = x - y x = x - y if (x - y > 0):

assert false return (x, y)

x ↦ X y ↦ Y

x ↦ X + Y y ↦ Y

x ↦ X + Y y ↦ X

x ↦ Y y ↦ X

x ↦ X y ↦ Y

X ≤ YX > Y

true

true

x ↦ Y y ↦ X

x ↦ Y y ↦ X

Y - X ≤ 0Y - X > 0

feasible

feasibleinfeasible

Page 20: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Page 21: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Page 22: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Path explosion: exponentially many paths

Page 23: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Path explosion: exponentially many paths

Heap modeling: symbolic data structures and pointers

Page 24: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Path explosion: exponentially many paths

Heap modeling: symbolic data structures and pointers

Solver limitations: dealing with complex PCs

Page 25: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Path explosion: exponentially many paths

Heap modeling: symbolic data structures and pointers

Solver limitations: dealing with complex PCs

Environment modeling: dealing with native / system / library calls

Page 26: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Classic symbolic execution: practical issues

6

Loops and recursion: infinite execution trees

Path explosion: exponentially many paths

Heap modeling: symbolic data structures and pointers

Solver limitations: dealing with complex PCs

Environment modeling: dealing with native / system / library calls

Page 27: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Loops and recursion

7

Dealing with infinite execution trees:

• Finitize paths by limiting the size of PCs (bounded verification)

• Use loop invariants (verification)

Page 28: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Loops and recursion

7

Dealing with infinite execution trees:

• Finitize paths by limiting the size of PCs (bounded verification)

• Use loop invariants (verification)

init; while (C) {

B; } assert P;

I

Page 29: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

init; assert I; makeSymbolic(targets(B)); assume I; if (C) {

B; assert I;

} else assert P;

Loops and recursion

7

Dealing with infinite execution trees:

• Finitize paths by limiting the size of PCs (bounded verification)

• Use loop invariants (verification)

init; while (C) {

B; } assert P;

I

Page 30: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Path explosion

8

Achieving good coverage in the presence of exponentially many paths:

• Select next branch at random

• Select next branch based on coverage

• Interleave symbolic execution with random testing

Page 31: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Path explosion

8

Achieving good coverage in the presence of exponentially many paths:

• Select next branch at random

• Select next branch based on coverage

• Interleave symbolic execution with random testing

symbolic execution random testing interleaved execution

Page 32: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Heap modeling

9

Modeling symbolic heap values and pointers

• Segmented address space via the theory of arrays (Klee)

• Lazy concretization (JPF)

• Concolic lazy concretization (CUTE)

Page 33: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

General lazy concretization

10

class Node { int elem; Node next;

}

n = symbolic(Node); x = n.next;

Page 34: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

General lazy concretization

10

class Node { int elem; Node next;

}

n = symbolic(Node); x = n.next;

n ↦ A0

elem: ?

next: ?

A0

Page 35: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

General lazy concretization

10

class Node { int elem; Node next;

}

n = symbolic(Node); x = n.next;

n ↦ A0

elem: ?

next: ?

n ↦ A0x ↦ null

A0

A0.next = null

elem: ?

next: null

A0

Page 36: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

General lazy concretization

10

class Node { int elem; Node next;

}

n = symbolic(Node); x = n.next;

n ↦ A0

elem: ?

next: ?

n ↦ A0x ↦ null

A0

n ↦ A0x ↦ A0

A0.next = null

elem: ?

next: null

A0

elem: ?

next: A0

A0

A0.next = A0

Page 37: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

General lazy concretization

10

class Node { int elem; Node next;

}

n = symbolic(Node); x = n.next;

n ↦ A0

elem: ?

next: ?

n ↦ A0x ↦ null

A0

n ↦ A0x ↦ A0

n ↦ A0x ↦ A1

A0.next = null

elem: ?

next: null

A0

elem: ?

next: A1

A0

elem: ?

next: ?

A1

elem: ?

next: A0

A0

A0.next = A0A0.next = A1

Page 38: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Concolic testing

11

typedef struct cell { int v; struct cell *next; } cell;

int f(int v) { return 2*v + 1; }

int testme(cell *p, int x) { if (x > 0) if (p != NULL) if (f(x) == p->v) if (p->next == p) abort(); return 0; }

Page 39: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Concolic testing

11

typedef struct cell { int v; struct cell *next; } cell;

int f(int v) { return 2*v + 1; }

int testme(cell *p, int x) { if (x > 0) if (p != NULL) if (f(x) == p->v) if (p->next == p) abort(); return 0; }

p ↦ nullx ↦ 236

x > 0 ∧ p=null

Execute concretely and symbolically.

Concrete PC

Page 40: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Concolic testing

11

typedef struct cell { int v; struct cell *next; } cell;

int f(int v) { return 2*v + 1; }

int testme(cell *p, int x) { if (x > 0) if (p != NULL) if (f(x) == p->v) if (p->next == p) abort(); return 0; }

p ↦ nullx ↦ 236

x > 0 ∧ p=null

Execute concretely and symbolically.

Negate last decision and solve for new inputs.

Concrete PC

p ↦ A0x ↦ 236

x > 0 ∧ p≠null ∧ p.v ≠ 2x + 1

next: null

v: 634

A0

Page 41: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Concolic testing

11

typedef struct cell { int v; struct cell *next; } cell;

int f(int v) { return 2*v + 1; }

int testme(cell *p, int x) { if (x > 0) if (p != NULL) if (f(x) == p->v) if (p->next == p) abort(); return 0; }

p ↦ nullx ↦ 236

x > 0 ∧ p=null

Execute concretely and symbolically.

Negate last decision and solve for new inputs.

Concrete PC

p ↦ A0x ↦ 236

x > 0 ∧ p≠null ∧ p.v ≠ 2x + 1

next: null

v: 634

A0

p ↦ A0x ↦ 1

x > 0 ∧ p≠null ∧ p.v = 2x + 1 ∧ p.next ≠ p

next: null

v: 3

A0

Page 42: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Concolic testing

11

typedef struct cell { int v; struct cell *next; } cell;

int f(int v) { return 2*v + 1; }

int testme(cell *p, int x) { if (x > 0) if (p != NULL) if (f(x) == p->v) if (p->next == p) abort(); return 0; }

p ↦ nullx ↦ 236

x > 0 ∧ p=null

Execute concretely and symbolically.

Negate last decision and solve for new inputs.

Concrete PC

p ↦ A0x ↦ 236

x > 0 ∧ p≠null ∧ p.v ≠ 2x + 1

next: null

v: 634

A0

p ↦ A0x ↦ 1

x > 0 ∧ p≠null ∧ p.v = 2x + 1 ∧ p.next ≠ p

next: null

v: 3

A0

p ↦ A0x ↦ 1

next: A0v: 3

A0x > 0 ∧ p≠null ∧ p.v = 2x + 1 ∧ p.next = p

Page 43: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Solver limitations

12

Reducing the demands on the solver:

• On-the-fly expression simplification

• Incremental solving

• Solution caching

• Substituting concrete values for symbolic in complex PCs (CUTE)

Page 44: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Environment modeling

13

Dealing with system / native / library calls:

• Partial state concretization

• Manual models of the environment (Klee)

Page 45: Computer-Aided Reasoning for Software CSE507€¦ · Computer-Aided Reasoning for Software Symbolic Execution. Today 2. Today 2 ... E.g., JPF, Klee ... E.g., SAGE, Pex, CUTE, DART.

Summary

14

Today• Practical symbolic execution and concolic testing

Next lecture• Basics of model checking