+ All Categories
Home > Documents > CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi...

CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi...

Date post: 05-Jan-2016
Category:
Upload: sybil-blair
View: 214 times
Download: 1 times
Share this document with a friend
Popular Tags:
13
CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution
Transcript
Page 1: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

CSV 889: Concurrent Software Verification

Subodh SharmaIndian Institute of Technology Delhi

Symbolic Execution

Page 2: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Runtime Verification vs Symbolic Execution

Courtesy: Zvonimir slides from sv 2012 course

Page 3: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Key developements

• King, CACM 1976

• Still an active area of research– CUTE [UIUC]– KLEE [Stanford]– Java Path Finder [NASA] ...

Page 4: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Nuts and Bolts of Symbolic Execution

• Treat values of variables as symbolic• For “program path” collect constraints over

symbolic expressions– Known as “Path Conditions”

• Check feasibility at branches– By using either SAT or SMT tools – Could be used for pruning infeasible paths

• Fork and proceed

Page 5: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Example I

Concrete execution x = 3, y = 2

Page 6: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Example I

Symbolic execution x = a, y = b

Page 7: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Problems with Symbolic Execution

• Constraints– Linear arithmetic– nonlinear – higher order functions– unknown data structure invariants

Page 8: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Example II

Courtesy: S. Anand, 2009

What constraints to generate for data structure updates?

Page 9: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Example II

Courtesy: S. Anand, 2009

Use data structure invariants

Page 10: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Example II

Courtesy: S. Anand, 2009

Use data structure invariants

Page 11: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Dealing with Functions

Goal: Find an input to crash the program

What is the total number of program paths leading to error()?

Key idea is to compute function summaries!

Courtesy: S. Anand, 2009

Page 12: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Dealing with Functions

Courtesy: S. Anand, 2009

Page 13: CSV 889: Concurrent Software Verification Subodh Sharma Indian Institute of Technology Delhi Symbolic Execution.

Summary

• TODAY: Basics of Symbolic Execution and the problems with it

• NEXT CLASS: State-of-the-art Symbolic execution engines (KLEE, CUTE) + Handling Concurrency


Recommended