SMT-Style Program Analysis with Value-based Refinements

Size: px
Start display at page:

Download "SMT-Style Program Analysis with Value-based Refinements"

Transcription

1 SMT-Style Program Analysis with Value-based Refinements Vijay D Silva Leopold Haller Daniel Kröning NSV-3 July 15, 2010

2 Outline Imprecision and Refinement in Abstract Interpretation SAT Style Abstract Analysis Value-based Refinement for Intervals

3 Imprecision and Refinement in AI Imprecision in Abstract Interpretation Abstract interpretation sound but not complete. Incompleteness manifests in imprecision during the analysis.

4 Imprecision and Refinement in AI Imprecision in Abstract Interpretation Abstract interpretation sound but not complete. Incompleteness manifests in imprecision during the analysis. [1, 3] [1, 2] [2, 3] [1, 1] [2, 2] [3, 3] Example: Domain of Intervals

5 Imprecision and Refinement in AI Imprecisions in the Domain x:=*; if(x > 5) y := -1; else y := 1; assert(y!= 0); Imprecision in join

6 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in join x:=*; if(x > 5) y := -1; else y := 1; y [ 1, 1], x [6, ] assert(y!= 0);

7 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in join x:=*; if(x > 5) y := -1; else y := 1; y [ 1, 1], x [6, ] y [1, 1], x [, 5] assert(y!= 0);

8 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in join x:=*; if(x > 5) y := -1; else y := 1; assert(y!= 0); y [ 1, 1], x [6, ] y [1, 1], x [, 5] y [ 1, 1] The disjunction y = 1 y = 1 cannot be expressed as an interval.

9 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in transformer x:=y; if(x > 5) assert(y > 5);

10 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in transformer x:=y; if(x > 5) assert(y > 5);

11 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in transformer x:=y; if(x > 5) assert(y > 5); x [6, ]

12 Imprecision and Refinement in AI Imprecisions in the Domain Imprecision in transformer x:=y; if(x > 5) assert(y > 5); x [6, ] Intervals cannot express relational information.

13 Imprecision and Refinement in AI Imprecisions in the Analysis while(x < 50000) { x++; if(y < x) y++; } Imprecision in widening x [50000, 50000], y [0, ] x [0, 0], y [0, 0] x [0, 1], y [0, 1] widening x [0, ], y [0, ] Precision can be lost in the the analysis Refinement of widening studied by, e.g., Gulavani et. al (TACAS 2008), Wang et al. (CAV 2007)

14 Imprecision and Refinement in AI Refining Abstract Domains Global domain refinement

15 Imprecision and Refinement in AI Refining Abstract Domains Global domain refinement More powerful domain... Octagons Polyhedra

16 Imprecision and Refinement in AI Refining Abstract Domains Global domain refinement More powerful domain Disjunctive completion Octagons Polyhedra

17 Imprecision and Refinement in AI Refining Abstract Domains Cardinal power Global domain refinement Reduced product More powerful domain Disjunctive completion Octagons Polyhedra Global refinements potentially expensive. How can we locally refine an abstract domain?

18 Imprecision and Refinement in AI Trace Partitioning Trace partitioning allows for flexible and local refinement

19 Imprecision and Refinement in AI Trace Partitioning Trace partitioning allows for flexible and local refinement Consider separately different sets of traces through a program Similar to case splits in a mathematical proof.

20 Imprecision and Refinement in AI Trace Partitioning Trace partitioning allows for flexible and local refinement Consider separately different sets of traces through a program Similar to case splits in a mathematical proof. Control-flow based trace partitioning x := * [x > 5] y := -1 assert(y!= 0) [x <= 5] y := 1

21 Imprecision and Refinement in AI Trace Partitioning Trace partitioning allows for flexible and local refinement Consider separately different sets of traces through a program Similar to case splits in a mathematical proof. Control-flow based trace partitioning x := * [x > 5] y := -1 assert(y!= 0) y = 1 [x <= 5] y := 1

22 Imprecision and Refinement in AI Trace Partitioning Trace partitioning allows for flexible and local refinement Consider separately different sets of traces through a program Similar to case splits in a mathematical proof. Control-flow based trace partitioning x := * [x > 5] y := -1 assert(y!= 0) y = 1 [x <= 5] y := 1 y = 1

23 Imprecision and Refinement in AI Trace Partitioning Wide range of partitionings possible control flow, values of variables, number of iterations through a loop, etc.

24 Imprecision and Refinement in AI Trace Partitioning Wide range of partitionings possible control flow, values of variables, number of iterations through a loop, etc. Value-based partitioning x:=y; if(x > 5) assert(y > 5);

25 Imprecision and Refinement in AI Trace Partitioning Wide range of partitionings possible control flow, values of variables, number of iterations through a loop, etc. Value-based partitioning assume(y > 5); x:=y; if(x > 5) assert(y > 5); y > 5

26 Imprecision and Refinement in AI Trace Partitioning Wide range of partitionings possible control flow, values of variables, number of iterations through a loop, etc. Value-based partitioning assume(y > 5); assume(y <= 5); x:=y; if(x > 5) assert(y > 5); y > 5

27 Imprecision and Refinement in AI Finding Partitioning Functions Trace partitioning allows one to refine the precision of an analysis down to explicit exploration of all traces.

28 Imprecision and Refinement in AI Finding Partitioning Functions Trace partitioning allows one to refine the precision of an analysis down to explicit exploration of all traces. The main question is:

29 Imprecision and Refinement in AI Finding Partitioning Functions Trace partitioning allows one to refine the precision of an analysis down to explicit exploration of all traces. The main question is: How can we find a good partitioning?

30 Imprecision and Refinement in AI Finding Partitioning Functions Trace partitioning allows one to refine the precision of an analysis down to explicit exploration of all traces. The main question is: How can we find a good partitioning? Precise enough to prove the property, and abstract enough to be efficient.

31 Imprecision and Refinement in AI Finding Partitioning Functions Leino and Logozzo (APLAS 2005): Value-based trace partitionings based on counter examples Gulavani et al. (TACAS 2008): DAG-based Exploration of control-flow paths inside loops with splitting on demand. Gulwani et al. (PLDI 2009): Control-flow refinement for bounds analysis. Harris et al. (POPL 2010): Satisfiability Modulo Path Programs

32 SAT Style Abstract Analysis Value-based Trace Partitionings If the abstract transformer ˆF is too imprecise, find a set of transformers ˆF 1,..., ˆF k, such that γ(µx. ˆFi (X )) µx. F (X ) 1 i k

33 SAT Style Abstract Analysis Value-based Trace Partitionings If the abstract transformer ˆF is too imprecise, find a set of transformers ˆF 1,..., ˆF k, such that γ(µx. ˆFi (X )) µx. F (X ) 1 i k This can be done by clipping the analysis by an abstract element: ˆF i = ˆF a i

34 SAT Style Abstract Analysis Value-based Trace Partitionings If the abstract transformer ˆF is too imprecise, find a set of transformers ˆF 1,..., ˆF k, such that γ(µx. ˆFi (X )) µx. F (X ) 1 i k This can be done by clipping the analysis by an abstract element: ˆF i = ˆF a i

35 SAT Style Abstract Analysis Value-based Trace Partitionings If the abstract transformer ˆF is too imprecise, find a set of transformers ˆF 1,..., ˆF k, such that γ(µx. ˆFi (X )) µx. F (X ) 1 i k This can be done by clipping the analysis by an abstract element: ˆF i = ˆF a i +

36 SAT Style Abstract Analysis Value-based Trace Partitionings If the abstract transformer ˆF is too imprecise, find a set of transformers ˆF 1,..., ˆF k, such that γ(µx. ˆFi (X )) µx. F (X ) 1 i k This can be done by clipping the analysis by an abstract element: ˆF i = ˆF a i + =

37 SAT Style Abstract Analysis Value-based Trace Partitionings New question:

38 SAT Style Abstract Analysis Value-based Trace Partitionings New question: How can we find such a set of elements a 1,..., a k?

39 SAT Style Abstract Analysis Value-based Trace Partitionings New question: How can we find such a set of elements a 1,..., a k? Use the search architecture of a SAT solver!

40 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack

41 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack Main phases of the DPLL procedure:

42 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack Main phases of the DPLL procedure: Decision Assume a value for an undetermined variable

43 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack Main phases of the DPLL procedure: Decision Assume a value for an undetermined variable Propagation Deduce implied variable values

44 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack Main phases of the DPLL procedure: Decision Assume a value for an undetermined variable Propagation Deduce implied variable values Learning Learn reason for conflict and backtrack

45 SAT Style Abstract Analysis DPLL framework decide DPLL procedure propagate Conflict learn backtrack Main phases of the DPLL procedure: Decision Assume a value for an undetermined variable Propagation Deduce implied variable values Learning Learn reason for conflict and backtrack

46 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable?

47 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Decision

48 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Propagation z = 0

49 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Decision y = 1 z = 0

50 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Propagation y = 1 z = 0 z = 1

51 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Propagation y = 1 z = 0 z = 1 Conflict

52 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 1 Learning y = 1 z = 0 z = 1

53 SAT Style Abstract Analysis DPLL Procedure Is φ(x, y, z) satisfiable? x = 0 Learning

54 SAT Style Abstract Analysis SAT-Style Program Analysis SAT-Style Program Analysis Safety proven decide clipped fixpoint generalize backtrack

55 SAT Style Abstract Analysis SAT-Style Program Analysis SAT-Style Program Analysis Safety proven decide clipped fixpoint generalize backtrack Decision Refine current element a by a a

56 SAT Style Abstract Analysis SAT-Style Program Analysis SAT-Style Program Analysis Safety proven decide clipped fixpoint generalize backtrack Decision Refine current element a by a a Propagation Compute clipped fixpoint µx. ˆT (X ) a

57 SAT Style Abstract Analysis SAT-Style Program Analysis SAT-Style Program Analysis Safety proven decide clipped fixpoint generalize backtrack Decision Refine current element a by a a Propagation Compute clipped fixpoint µx. ˆT (X ) a Learning Find a a, such that µx.ˆf (X ) a is safe.

58 SAT Style Abstract Analysis SAT-Style Program Analysis Decision Initially, a = A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

59 SAT Style Abstract Analysis SAT-Style Program Analysis Propagation Initially, a = µx.ˆf (X ) not safe A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

60 SAT Style Abstract Analysis SAT-Style Program Analysis Decision Decision: refine a A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

61 SAT Style Abstract Analysis SAT-Style Program Analysis Propagation Decision: refine a A 1 A 2 A 3 A 4 µx.(ˆf (X ) A 1 ) not safe B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

62 SAT Style Abstract Analysis SAT-Style Program Analysis Decision A 1 A 2 A 3 A 4 Decision: refine a B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

63 SAT Style Abstract Analysis SAT-Style Program Analysis Propagation A 1 A 2 A 3 A 4 Decision: refine a B 1 B 2 B 3 B 4 B 5 µx.(ˆf (X ) B 2 ) safe C 1 C 2 C 3 C 4

64 SAT Style Abstract Analysis SAT-Style Program Analysis Generalization A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

65 SAT Style Abstract Analysis SAT-Style Program Analysis Generalization A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 µx.ˆf (X ) A 2 safe C 1 C 2 C 3 C 4

66 SAT Style Abstract Analysis SAT-Style Program Analysis Generalization A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 µx.ˆf (X ) A 2 safe C 1 C 2 C 3 C 4

67 SAT Style Abstract Analysis SAT-Style Program Analysis Generalization Backtrack and continue A 1 A 2 A 3 A 4 B 1 B 2 B 3 B 4 B 5 C 1 C 2 C 3 C 4

68 SAT Style Abstract Analysis Comments on Analysis When can we efficiently prove safety with this?

69 SAT Style Abstract Analysis Comments on Analysis When can we efficiently prove safety with this? When there is a small and finite number of elements a1,..., a k such that the fixpoints µx.(ˆf (X ) a i ) can be put together to form a concrete postfixpoint.

70 SAT Style Abstract Analysis Comments on Analysis When can we efficiently prove safety with this? When there is a small and finite number of elements a1,..., a k such that the fixpoints µx.(ˆf (X ) a i ) can be put together to form a concrete postfixpoint. Specific implementation issues: Generalization step Decision heuristic

71 Value-based Refinement for Intervals Value-based Refinement for Intervals We have created a preliminary instantiation of this framework for the domain of intervals.

72 Value-based Refinement for Intervals Value-based Refinement for Intervals We have created a preliminary instantiation of this framework for the domain of intervals. Decision: Choose an initial assignment for all variables

73 Value-based Refinement for Intervals Value-based Refinement for Intervals We have created a preliminary instantiation of this framework for the domain of intervals. Decision: Choose an initial assignment for all variables Propagation: Compute forward interpretation for this initial value

74 Value-based Refinement for Intervals Value-based Refinement for Intervals We have created a preliminary instantiation of this framework for the domain of intervals. Decision: Choose an initial assignment for all variables Propagation: Compute forward interpretation for this initial value Generalization and Learning: Generalize the result by locally generalizing intervals. Remove generalized initial values from selection pool

75 Value-based Refinement for Intervals Example 1 Decision [x > 5] [x<= 5] Choose initial: x = 0, y = 0 y:=-1 y:=1 assert(y!=0);

76 Value-based Refinement for Intervals Example 1 Propagation Choose initial: x = 0, y = 0 [x > 5] [x<= 5] x = 0, y = 0 y:=-1 y:=1 x = 0, y = 1 assert(y!=0); x = 0, y = 1

77 Value-based Refinement for Intervals Example 1 Generalization Choose initial: x = 0, y = 0 [x > 5] [x<= 5] x = 0, y = 0 y:=-1 y:=1 x = 0, y = 1 assert(y!=0);

78 Value-based Refinement for Intervals Example 1 Generalization Choose initial: x = 0, y = 0 [x > 5] [x<= 5] x = 0, y = 0 y:=-1 y:=1 y > 0 assert(y!=0);

79 Value-based Refinement for Intervals Example 1 Generalization Choose initial: x = 0, y = 0 [x > 5] [x<= 5] x = 0, y = 0 y:=-1 y:=1 y > 0 assert(y!=0);

80 Value-based Refinement for Intervals Example 1 Generalization Choose initial: x = 0, y = 0 [x > 5] [x<= 5] y:=-1 y:=1 y > 0 assert(y!=0);

81 Value-based Refinement for Intervals Example 1 Generalization Generalized init: x 5 [x > 5] [x<= 5] y:=-1 y:=1 y > 0 assert(y!=0);

82 Value-based Refinement for Intervals Example 1 Decision x 5 [x > 5] [x<= 5] Choose initial: x = 8, y = 0 y:=-1 y:=1 assert(y!=0);

83 Value-based Refinement for Intervals Example 1 Propagation x 5 Choose initial: x = 8, y = 0 [x > 5] [x<= 5] x = 8, y = 0 y:=-1 y:=1 x = 8, y = 1 assert(y!=0); x = 8, y = 1

84 Value-based Refinement for Intervals Example 1 Generalization x 5 Generalized init: x > 5 [x > 5] [x<= 5] y:=-1 y:=1 y < 0 assert(y!=0);

85 Value-based Refinement for Intervals Example 1 Generalization x 5 x > 5 [x > 5] [x<= 5] y:=-1 y:=1 assert(y!=0);

86 Value-based Refinement for Intervals Example 2 Decision x:=y x = 0, y = 1 [x>=5] [x<5] assert(y<5)

87 Value-based Refinement for Intervals Example 2 Propagation [x>=5] x = 0, y = 1 x:=y x = 1, y = 1 [x<5] x = 1, y = 1 assert(y<5) x = 1, y = 1

88 Value-based Refinement for Intervals Example 2 Generalized init: y < 5 Generalization [x>=5] x:=y y < 5 [x<5] y < 5 assert(y<5)

89 Value-based Refinement for Intervals Example 2 y < 5 Generalization x:=y [x>=5] [x<5] assert(y<5)

90 Value-based Refinement for Intervals Example 2 y < 5 Decision x:=y x = 0, y = 6 [x>=5] [x<5] assert(y<5)

91 Value-based Refinement for Intervals Example 2 y < 5 Propagation [x>=5] x = 0, y = 6 x:=y x = 6, y = 6 [x<5] assert(y<5) x = 6, y = 6

92 Value-based Refinement for Intervals Example 2 Generalization [x>=5] x:=y [x<5] assert(y<5) y < 5 Generalized init: y 5 x 5 y < 5

93 Value-based Refinement for Intervals Example 2 y < 5 y 5 x:=y [x>=5] [x<5] assert(y<5)

94 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver.

95 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds.

96 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds. Generalization step: 0 a 5, b > 5, c < 10 Repair using SAT solver assert(a <= 10 a >= -10) b > 5

97 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds. Generalization step: 0 a 5, b > 5, c < 10 assert(a <= 10 a >= -10) b > 5 Repair using SAT solver Increase bounds by search

98 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds. Generalization step: 0 a, b > 5, c < 10 assert(a <= 10 a >= -10) b > 5 Repair using SAT solver Increase bounds by search

99 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds. Generalization step: 0 a, b > 5, c < 10 assert(a <= 10 a >= -10) b > 5 Repair using SAT solver Increase bounds by search

100 Value-based Refinement for Intervals Notes on Implementation Initial values chosen by call to a SAT solver. Generalization uses local repair (SMPP): Set every location to For each invalid triple {pre} stmt {post} repair with {pre} from forward analysis. generalize using search on bounds. Generalization step: 10 a, b > 5, c < 10 assert(a <= 10 a >= -10) b > 5 Repair using SAT solver Increase bounds by search

101 Value-based Refinement for Intervals Preliminary benchmarks Selection of NEC Small Static Analysis Benchmarks (slightly modified) Interval analysis too imprecise in all cases

102 Value-based Refinement for Intervals Preliminary benchmarks Selection of NEC Small Static Analysis Benchmarks (slightly modified) Interval analysis too imprecise in all cases Inst. # paths (SCC-decomp.) runtime (s) iterations inf1.c 36 * * inf2.c inf3.c inf4.c 1080 * * inf5.c inf6.c inf7.c inf8.c

103 Value-based Refinement for Intervals Preliminary benchmarks Selection of NEC Small Static Analysis Benchmarks (slightly modified) Interval analysis too imprecise in all cases Inst. # paths (SCC-decomp.) runtime (s) iterations inf1.c 36 * * inf2.c inf3.c inf4.c 1080 * * inf5.c inf6.c inf7.c inf8.c Does not work if fully relational information is required (inf1.c,inf4.c) assume(x > y); assert(x > y);

104 Value-based Refinement for Intervals Current Work Extending the prototype into a tool

105 Value-based Refinement for Intervals Current Work Extending the prototype into a tool Move towards a fully SAT-style analyzer

106 Value-based Refinement for Intervals Current Work Extending the prototype into a tool Move towards a fully SAT-style analyzer Handling of floating-point numbers

107 Value-based Refinement for Intervals Current Work Extending the prototype into a tool Move towards a fully SAT-style analyzer Handling of floating-point numbers Move to more powerful domains

108 Value-based Refinement for Intervals Current Work Extending the prototype into a tool Move towards a fully SAT-style analyzer Handling of floating-point numbers Move to more powerful domains Use trace partitioning and SMT/SAT-style analysis as glue to combine a static analyzer with a bounded model checker.

Embedded Software Verification Challenges and Solutions. Static Program Analysis

Embedded Software Verification Challenges and Solutions. Static Program Analysis Embedded Software Verification Challenges and Solutions Static Program Analysis Chao Wang chaowang@nec-labs.com NEC Labs America Princeton, NJ ICCAD Tutorial November 11, 2008 www.nec-labs.com 1 Outline

More information

HySAT. what you can use it for how it works example from application domain final remarks. Christian Herde /12

HySAT. what you can use it for how it works example from application domain final remarks. Christian Herde /12 CP2007: Presentation of recent CP solvers HySAT what you can use it for how it works example from application domain final remarks Christian Herde 25.09.2007 /2 What you can use it for Satisfiability checker

More information

Numeric Bounds Analysis with Conflict-Driven Learning

Numeric Bounds Analysis with Conflict-Driven Learning Numeric Bounds Analysis with Conflict-Driven Learning Vijay D Silva, Leopold Haller, Daniel Kroening, and Michael Tautschnig Computer Science Department, University of Oxford name.surname@cs.ox.ac.uk Abstract.

More information

Lifting CDCL to Template-based Abstract Domains for Program Verification

Lifting CDCL to Template-based Abstract Domains for Program Verification Lifting CDCL to Template-based Abstract Domains for Program Verification Rajdeep Mukherjee 1, Peter Schrammel 2, Leopold Haller 3, Daniel Kroening 1, and Tom Melham 1 1 University of Oxford, UK 2 University

More information

Widening Operator. Fixpoint Approximation with Widening. A widening operator 2 L ˆ L 7``! L is such that: Correctness: - 8x; y 2 L : (y) v (x y)

Widening Operator. Fixpoint Approximation with Widening. A widening operator 2 L ˆ L 7``! L is such that: Correctness: - 8x; y 2 L : (y) v (x y) EXPERIENCE AN INTRODUCTION WITH THE DESIGN TOF A SPECIAL PURPOSE STATIC ANALYZER ABSTRACT INTERPRETATION P. Cousot Patrick.Cousot@ens.fr http://www.di.ens.fr/~cousot Biarritz IFIP-WG 2.3 2.4 meeting (1)

More information

Block-wise abstract interpretation by combining abstract domains with SMT

Block-wise abstract interpretation by combining abstract domains with SMT Block-wise abstract interpretation by combining abstract domains with SMT Jiahong Jiang, Liqian Chen, Xueguang Wu, Ji Wang National University of Defense Technology, China 01/16/2017 VMCAI 2017 Overview

More information

Control-Flow Refinment via Partial Evaluation

Control-Flow Refinment via Partial Evaluation Control-Flow Refinment via Partial Evaluation Jesús Doménech 1, Samir Genaim 2, and John P. Gallagher 3 1 Universidad Complutense de Madrid, Spain jdomenec@ucm.es 2 Universidad Complutense de Madrid, Spain

More information

A New Abstraction Framework for Affine Transformers

A New Abstraction Framework for Affine Transformers A New Abstraction Framework for Affine Transformers Tushar Sharma and Thomas Reps SAS 17 Motivations Prove Program Assertions Function and loop summaries Sound with respect to bitvectors A NEW ABSTRACTION

More information

Interval Polyhedra: An Abstract Domain to Infer Interval Linear Relationships

Interval Polyhedra: An Abstract Domain to Infer Interval Linear Relationships Interval Polyhedra: An Abstract Domain to Infer Interval Linear Relationships Liqian Chen 1,2 Antoine Miné 3,2 Ji Wang 1 Patrick Cousot 2,4 1 National Lab. for Parallel and Distributed Processing, Changsha,

More information

DPLL(Γ+T): a new style of reasoning for program checking

DPLL(Γ+T): a new style of reasoning for program checking DPLL(Γ+T ): a new style of reasoning for program checking Dipartimento di Informatica Università degli Studi di Verona Verona, Italy June, 2011 Motivation: reasoning for program checking Program checking

More information

Duet: Static Analysis for Unbounded Parallelism

Duet: Static Analysis for Unbounded Parallelism Duet: Static Analysis for Unbounded Parallelism Azadeh Farzan and Zachary Kincaid University of Toronto Abstract. Duet is a static analysis tool for concurrent programs in which the number of executing

More information

SLR: Path-Sensitive Analysis through Infeasible-Path Detection and Syntactic Language Refinement.

SLR: Path-Sensitive Analysis through Infeasible-Path Detection and Syntactic Language Refinement. SLR: Path-Sensitive Analysis through Infeasible-Path Detection and Syntactic Language Refinement. Gogul Balakrishnan 1, Sriram Sankaranarayanan 1, Franjo Ivančić 1, Ou Wei 2, and Aarti Gupta 1 1 NEC Laboratories

More information

Tree Interpolation in Vampire

Tree Interpolation in Vampire Tree Interpolation in Vampire Régis Blanc 1, Ashutosh Gupta 2, Laura Kovács 3, and Bernhard Kragl 4 1 EPFL 2 IST Austria 3 Chalmers 4 TU Vienna Abstract. We describe new extensions of the Vampire theorem

More information

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion Using a Lazy CNF Conversion Stéphane Lescuyer Sylvain Conchon Université Paris-Sud / CNRS / INRIA Saclay Île-de-France FroCoS 09 Trento 18/09/2009 Outline 1 Motivation and background Verifying an SMT solver

More information

Bounded Model Checking Of C Programs: CBMC Tool Overview

Bounded Model Checking Of C Programs: CBMC Tool Overview Workshop on Formal Verification and Analysis Tools, CFDVS, IIT-Bombay - Feb 21,2017 Bounded Model Checking Of C Programs: CBMC Tool Overview Prateek Saxena CBMC Developed and Maintained by Dr Daniel Kröning

More information

Deductive Methods, Bounded Model Checking

Deductive Methods, Bounded Model Checking Deductive Methods, Bounded Model Checking http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Deductive methods Pavel Parízek Deductive Methods, Bounded

More information

Complete Instantiation of Quantified Formulas in Satisfiability Modulo Theories. ACSys Seminar

Complete Instantiation of Quantified Formulas in Satisfiability Modulo Theories. ACSys Seminar Complete Instantiation of Quantified Formulas in Satisfiability Modulo Theories Yeting Ge Leonardo de Moura ACSys Seminar 2008.12 Motivation SMT solvers have been successful Quantified smt formulas are

More information

Leonardo de Moura and Nikolaj Bjorner Microsoft Research

Leonardo de Moura and Nikolaj Bjorner Microsoft Research Leonardo de Moura and Nikolaj Bjorner Microsoft Research A Satisfiability Checker with built-in support for useful theories Z3 is a solver developed at Microsoft Research. Development/Research driven by

More information

Relational Abstract Domains for the Detection of Floating-Point Run-Time Errors

Relational Abstract Domains for the Detection of Floating-Point Run-Time Errors ESOP 2004 Relational Abstract Domains for the Detection of Floating-Point Run-Time Errors Antoine Miné École Normale Supérieure Paris FRANCE This work was partially supported by the ASTRÉE RNTL project

More information

Functor abstract domain by example

Functor abstract domain by example A Parametric Segmentation Functor for Fully Automatic and Scalable Array Content Analysis Scalability Patrick Cousot, NYU & ENS Radhia Cousot, CNRS & ENS & MSR Francesco Logozzo, MSR Precision // here:

More information

Applications of Logic in Software Engineering. CS402, Spring 2016 Shin Yoo

Applications of Logic in Software Engineering. CS402, Spring 2016 Shin Yoo Applications of Logic in Software Engineering CS402, Spring 2016 Shin Yoo Acknowledgements I borrow slides from: Moonzoo Kim Theo C. Ruys (http://spinroot.com/spin/doc/ SpinTutorial.pdf) CBMC & Daniel

More information

Decomposition Instead of Self- Composition for Proving the Absence of Timing Channels

Decomposition Instead of Self- Composition for Proving the Absence of Timing Channels Decomposition Instead of Self- Composition for Proving the Absence of Timing Channels PLDI June 20th, 2017 Timos Antonopoulos, Yale Paul Gazzillo, Yale Michael Hicks, UMD Eric Koskinen, Yale Tachio Terauchi,

More information

4.1 Review - the DPLL procedure

4.1 Review - the DPLL procedure Applied Logic Lecture 4: Efficient SAT solving CS 4860 Spring 2009 Thursday, January 29, 2009 The main purpose of these notes is to help me organize the material that I used to teach today s lecture. They

More information

Why does ASTRÉE scale up?

Why does ASTRÉE scale up? Form Methods Syst Des (2009) 35: 229 264 DOI 10.1007/s10703-009-0089-6 Why does ASTRÉE scale up? Patrick Cousot Radhia Cousot Jérôme Feret Laurent Mauborgne Antoine Miné Xavier Rival Published online:

More information

VS 3 : SMT Solvers for Program Verification

VS 3 : SMT Solvers for Program Verification VS 3 : SMT Solvers for Program Verification Saurabh Srivastava 1,, Sumit Gulwani 2, and Jeffrey S. Foster 1 1 University of Maryland, College Park, {saurabhs,jfoster}@cs.umd.edu 2 Microsoft Research, Redmond,

More information

Applications of Program analysis in Model-Based Design

Applications of Program analysis in Model-Based Design Applications of Program analysis in Model-Based Design Prahlad Sampath (Prahlad.Sampath@mathworks.com) 2018 by The MathWorks, Inc., MATLAB, Simulink, Stateflow, are registered trademarks of The MathWorks,

More information

Constraint Programming

Constraint Programming Depth-first search Let us go back to foundations: DFS = Depth First Search Constraint Programming Roman Barták Department of Theoretical Computer Science and Mathematical Logic 2 3 4 5 6 7 8 9 Observation:

More information

Using Counterexamples for Improving the Precision of Reachability Computation with Polyhedra

Using Counterexamples for Improving the Precision of Reachability Computation with Polyhedra Using Counterexamples for Improving the Precision of Reachability Computation with Polyhedra Chao Wang 1, Zijiang Yang 2, Aarti Gupta 1, and Franjo Ivančić 1 1 NEC Laboratories America, Princeton, NJ 08540,

More information

The Apron Library. Bertrand Jeannet and Antoine Miné. CAV 09 conference 02/07/2009 INRIA, CNRS/ENS

The Apron Library. Bertrand Jeannet and Antoine Miné. CAV 09 conference 02/07/2009 INRIA, CNRS/ENS The Apron Library Bertrand Jeannet and Antoine Miné INRIA, CNRS/ENS CAV 09 conference 02/07/2009 Context : Static Analysis What is it about? Discover properties of a program statically and automatically.

More information

Iterative Program Analysis Abstract Interpretation

Iterative Program Analysis Abstract Interpretation Iterative Program Analysis Abstract Interpretation Summary by Ben Riva & Ofri Ziv Soundness Theorem Theorem: If a computation fixed-point is sound, then its least-fixed-point is sound. More precisely,

More information

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura μz Fix- point engine in Z3 Krystof Hoder Nikolaj Bjorner Leonardo de Moura Fixed Points Fixed point of funcaon f is an a such that f(a)=a Minimal fixed point a wrt. (paraal) ordering < for each fixed point

More information

Software Model Checking. Xiangyu Zhang

Software Model Checking. Xiangyu Zhang Software Model Checking Xiangyu Zhang Symbolic Software Model Checking CS510 S o f t w a r e E n g i n e e r i n g Symbolic analysis explicitly explores individual paths, encodes and resolves path conditions

More information

Frama-C Value Analysis

Frama-C Value Analysis Frama-C Value Analysis Séminaire CAP TRONIC Virgile Prevosto virgile.prevosto@cea.fr June 18 th, 2015 Outline Introduction Abstract domains Arithmetic Memory Methodology Basic commands Parameters Introduction

More information

Predicate Refinement Heuristics in Program Verification with CEGAR

Predicate Refinement Heuristics in Program Verification with CEGAR Predicate Refinement Heuristics in Program Verification with CEGAR Tachio Terauchi (JAIST) Part of this is joint work with Hiroshi Unno (U. Tsukuba) 1 Predicate Abstraction with CEGAR Iteratively generate

More information

F-Soft: Software Verification Platform

F-Soft: Software Verification Platform F-Soft: Software Verification Platform F. Ivančić, Z. Yang, M.K. Ganai, A. Gupta, I. Shlyakhter, and P. Ashar NEC Laboratories America, 4 Independence Way, Suite 200, Princeton, NJ 08540 fsoft@nec-labs.com

More information

State of Practice. Automatic Verification of Embedded Control Software with ASTRÉE and beyond

State of Practice. Automatic Verification of Embedded Control Software with ASTRÉE and beyond Automatic Verification of Embedded Control Software with ASTRÉE and beyond Patrick Cousot Jerome C. Hunsaker Visiting Professor Department of Aeronautics and Astronautics, MIT cousot mit edu www.mit.edu/~cousot

More information

Xuandong Li. BACH: Path-oriented Reachability Checker of Linear Hybrid Automata

Xuandong Li. BACH: Path-oriented Reachability Checker of Linear Hybrid Automata BACH: Path-oriented Reachability Checker of Linear Hybrid Automata Xuandong Li Department of Computer Science and Technology, Nanjing University, P.R.China Outline Preliminary Knowledge Path-oriented Reachability

More information

Configurable Software Model Checking

Configurable Software Model Checking Configurable Software Model Checking CPAchecker Dirk Beyer Dirk Beyer 1 / 26 Software Verification C Program int main() { int a = foo(); int b = bar(a); } assert(a == b); Verification Tool TRUE i.e., specification

More information

Verasco: a Formally Verified C Static Analyzer

Verasco: a Formally Verified C Static Analyzer Verasco: a Formally Verified C Static Analyzer Jacques-Henri Jourdan Joint work with: Vincent Laporte, Sandrine Blazy, Xavier Leroy, David Pichardie,... June 13, 2017, Montpellier GdR GPL thesis prize

More information

Pluggable SAT-Solvers for SMT-Solvers

Pluggable SAT-Solvers for SMT-Solvers Pluggable SAT-Solvers for SMT-Solvers Bas Schaafsma DISI, University of Trento & Fondazione Bruno Kessler May 29, 2013 http://mathsat.fbk.eu/ 1 The SAT/SMT problem Applications of SAT/SMT-Solvers Motivation

More information

Proving Properties of non-array Programs

Proving Properties of non-array Programs Proving Properties of non-array Programs Thanks to Priyanka Darke Tata Research Development and Design Centre, Pune, India December 13, 2017 Copyright 2012 Tata Consultancy Services Limited 1 Background

More information

Application of Propositional Logic II - How to Test/Verify my C program? Moonzoo Kim

Application of Propositional Logic II - How to Test/Verify my C program? Moonzoo Kim Application of Propositional Logic II - How to Test/Verify my C program? Moonzoo Kim 2 Solving Various Problems using SAT Solver Sudoku Puzzle Encoding 1 Encoding 2 Verify/Testing C Programs Encoding 3

More information

Simplifying Loop Invariant Generation Using Splitter Predicates. Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University

Simplifying Loop Invariant Generation Using Splitter Predicates. Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University Simplifying Loop Invariant Generation Using Splitter Predicates Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University Loops and Loop Invariants Loop Head x = 0; while( x

More information

HECTOR: Formal System-Level to RTL Equivalence Checking

HECTOR: Formal System-Level to RTL Equivalence Checking ATG SoC HECTOR: Formal System-Level to RTL Equivalence Checking Alfred Koelbl, Sergey Berezin, Reily Jacoby, Jerry Burch, William Nicholls, Carl Pixley Advanced Technology Group Synopsys, Inc. June 2008

More information

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013 Principles of Program Analysis Lecture 1 Harry Xu Spring 2013 An Imperfect World Software has bugs The northeast blackout of 2003, affected 10 million people in Ontario and 45 million in eight U.S. states

More information

Abstraction techniques for Floating-Point Arithmetic

Abstraction techniques for Floating-Point Arithmetic Abstraction techniques for Floating-Point Arithmetic Angelo Brillout 1, Daniel Kroening 2 and Thomas Wahl 2 1 ETH Zurich, 2 Oxford University ETH Zürich Floating-Point Arithmetic (FPA) Used for embedded

More information

Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C

Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C Structuring an Abstract Interpreter through Value and State Abstractions: EVA, an Evolved Value Analysis for Frama C David Bühler CEA LIST, Software Safety Lab Frama-C & SPARK Day 2017 May 30th, 2017 David

More information

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan Remember Symbolic Model Checking Represent sets of states and the transition relation as Boolean logic formulas

More information

Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security

Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2014 Outline Overview Syntactic Analysis Abstract

More information

Program Analysis and Constraint Programming

Program Analysis and Constraint Programming Program Analysis and Constraint Programming Joxan Jaffar National University of Singapore CPAIOR MasterClass, 18-19 May 2015 1 / 41 Program Testing, Verification, Analysis (TVA)... VS... Satifiability/Optimization

More information

Interpolation-based Software Verification with Wolverine

Interpolation-based Software Verification with Wolverine Interpolation-based Software Verification with Wolverine Daniel Kroening 1 and Georg Weissenbacher 2 1 Computer Science Department, Oxford University 2 Department of Electrical Engineering, Princeton University

More information

Lecture 6. Abstract Interpretation

Lecture 6. Abstract Interpretation Lecture 6. Abstract Interpretation Wei Le 2014.10 Outline Motivation History What it is: an intuitive understanding An example Steps of abstract interpretation Galois connection Narrowing and Widening

More information

Inductive Invariant Generation via Abductive Inference

Inductive Invariant Generation via Abductive Inference Inductive Invariant Generation via Abductive Inference Isil Dillig Department of Computer Science College of William & Mary idillig@cs.wm.edu Thomas Dillig Department of Computer Science College of William

More information

Formally Certified Satisfiability Solving

Formally Certified Satisfiability Solving SAT/SMT Proof Checking Verifying SAT Solver Code Future Work Computer Science, The University of Iowa, USA April 23, 2012 Seoul National University SAT/SMT Proof Checking Verifying SAT Solver Code Future

More information

Lecture 7. Search. Search. Foundations of Constraint Programming

Lecture 7. Search. Search. Foundations of Constraint Programming Lecture 7 1 Outline Introduce search trees Discuss various types of labeling trees, in particular trees for - forward checking - partial look ahead - maintaining arc consistency (MAC) Discuss various search

More information

CS 510/13. Predicate Abstraction

CS 510/13. Predicate Abstraction CS 50/3 Predicate Abstraction Predicate Abstraction Extract a finite state model from an infinite state system Used to prove assertions or safety properties Successfully applied for verification of C programs

More information

Abstraction Refinement for Bounded Model Checking

Abstraction Refinement for Bounded Model Checking Abstraction Refinement for Bounded Model Checking Anubhav Gupta 1 and Ofer Strichman 2 1 School of Computer Science, Carnegie Mellon University, USA anubhav@cs.cmu.edu 2 Information Systems Engineering,

More information

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner?y, Aina Niemetz?y and Armin Biere?? Johannes Kepler University y Stanford University SMT Workshop July 22-23, 2017 Heidelberg, Germany Introduction

More information

Program Static Analysis. Overview

Program Static Analysis. Overview Program Static Analysis Overview Program static analysis Abstract interpretation Data flow analysis Intra-procedural Inter-procedural 2 1 What is static analysis? The analysis to understand computer software

More information

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner, Aina Niemetz and Armin Biere Johannes Kepler University Stanford University SMT Workshop July 22-23, 2017 Heidelberg, Germany Introduction Counterexample-Guided

More information

An Introduction to Satisfiability Modulo Theories

An Introduction to Satisfiability Modulo Theories An Introduction to Satisfiability Modulo Theories Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se February 13, 2019 1/28 Outline From theory... From DPLL to DPLL(T) Slides courtesy of Alberto

More information

Alternation for Termination

Alternation for Termination Alternation for Termination William R. Harris 1, Akash Lal 2, Aditya V. Nori 2, and Sriram K. Rajamani 2 1 University of Wisconsin; Madison, WI, USA 2 Microsoft Research India; Bangalore, India Abstract.

More information

An Abstract Domain for Certifying Neural Networks. Department of Computer Science

An Abstract Domain for Certifying Neural Networks. Department of Computer Science An Abstract Domain for Certifying Neural Networks Gagandeep Singh Timon Gehr Markus Püschel Martin Vechev Department of Computer Science Adversarial input perturbations Neural network f 8 I " Neural network

More information

A CSP Search Algorithm with Reduced Branching Factor

A CSP Search Algorithm with Reduced Branching Factor A CSP Search Algorithm with Reduced Branching Factor Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

SAT Based Efficient Directed Test Generation Techniques

SAT Based Efficient Directed Test Generation Techniques SAT Based Efficient Directed Test Generation Techniques Presented by Mingsong Chen Software Engineering Institute East China Normal University May 5, 2011 Outline Introduction Model Checking Based Test

More information

The Reachability-Bound Problem

The Reachability-Bound Problem The Reachability-Bound Problem Sumit Gulwani Microsoft Research sumitg@microsoft.com Florian Zuleger TU Darmstadt zuleger@forstye.cs.tu-darmstadt.de Abstract We define the reachability-bound problem to

More information

Fast Algorithms for Octagon Abstract Domain

Fast Algorithms for Octagon Abstract Domain Research Collection Master Thesis Fast Algorithms for Octagon Abstract Domain Author(s): Singh, Gagandeep Publication Date: 2014 Permanent Link: https://doi.org/10.3929/ethz-a-010154448 Rights / License:

More information

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Formal Methods Boolean Satisfiability Solving Sanjit A. Seshia EECS, UC Berkeley The Boolean Satisfiability Problem (SAT) Given: A Boolean formula F(x 1, x 2, x 3,, x n ) Can F evaluate to 1

More information

CAV Verification Mentoring Workshop 2017 SMT Solving

CAV Verification Mentoring Workshop 2017 SMT Solving CAV Verification Mentoring Workshop 2017 SMT Solving Alberto Griggio Fondazione Bruno Kessler Trento, Italy The SMT problem Satisfiability Modulo Theories Given a (quantifier-free) FOL formula and a (decidable)

More information

Automatic Software Verification

Automatic Software Verification Automatic Software Verification Instructor: Mooly Sagiv TA: Oded Padon Slides from Eran Yahav and the Noun Project, Wikipedia Course Requirements Summarize one lecture 10% one lecture notes 45% homework

More information

Yices 1.0: An Efficient SMT Solver

Yices 1.0: An Efficient SMT Solver Yices 1.0: An Efficient SMT Solver SMT-COMP 06 Leonardo de Moura (joint work with Bruno Dutertre) {demoura, bruno}@csl.sri.com. Computer Science Laboratory SRI International Menlo Park, CA Yices: An Efficient

More information

Course Summary! What have we learned and what are we expected to know?

Course Summary! What have we learned and what are we expected to know? Course Summary! What have we learned and what are we expected to know? Overview! Introduction Modelling in MiniZinc Finite Domain Constraint Solving Search Linear Programming and Network Flow Mixed Integer

More information

Ranking Functions for Loops with Disjunctive Exit-Conditions

Ranking Functions for Loops with Disjunctive Exit-Conditions Ranking Functions for Loops with Disjunctive Exit-Conditions Rody Kersten 1 Marko van Eekelen 1,2 1 Institute for Computing and Information Sciences (icis), Radboud University Nijmegen 2 School for Computer

More information

Symbolic Execution, Dynamic Analysis

Symbolic Execution, Dynamic Analysis Symbolic Execution, Dynamic Analysis http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Symbolic execution Pavel Parízek Symbolic Execution, Dynamic Analysis

More information

Automated Debugging with Error Invariants

Automated Debugging with Error Invariants Automated Debugging with Error Invariants Thomas Wies New York University joint work with Jürgen Christ, Evren Ermis (Freiburg University), Martin Schäf (SRI), Daniel Schwartz-Narbonne (NYU) Faulty Shell

More information

Seminar in Software Engineering Presented by Dima Pavlov, November 2010

Seminar in Software Engineering Presented by Dima Pavlov, November 2010 Seminar in Software Engineering-236800 Presented by Dima Pavlov, November 2010 1. Introduction 2. Overview CBMC and SAT 3. CBMC Loop Unwinding 4. Running CBMC 5. Lets Compare 6. How does it work? 7. Conclusions

More information

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura μz Fix- point engine in Z3 Krystof Hoder Nikolaj Bjorner Leonardo de Moura Mo?va?on Horn EPR applica?ons (Datalog) Points- to analysis Security analysis Deduc?ve data- bases and knowledge bases (Yago)

More information

4/24/18. Overview. Program Static Analysis. Has anyone done static analysis? What is static analysis? Why static analysis?

4/24/18. Overview. Program Static Analysis. Has anyone done static analysis? What is static analysis? Why static analysis? Overview Program Static Analysis Program static analysis Abstract interpretation Static analysis techniques 2 What is static analysis? The analysis to understand computer software without executing programs

More information

Introduction to CBMC: Part 1

Introduction to CBMC: Part 1 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 Arie Gurfinkel, Sagar Chaki October 2, 2007 Many slides are courtesy of Daniel Kroening Bug Catching with SAT Solvers Main

More information

Verifying Concurrent Programs

Verifying Concurrent Programs Verifying Concurrent Programs Daniel Kroening 8 May 1 June 01 Outline Shared-Variable Concurrency Predicate Abstraction for Concurrent Programs Boolean Programs with Bounded Replication Boolean Programs

More information

A Gentle Introduction to Program Analysis

A Gentle Introduction to Program Analysis A Gentle Introduction to Program Analysis Işıl Dillig University of Texas, Austin January 21, 2014 Programming Languages Mentoring Workshop 1 / 24 What is Program Analysis? Very broad topic, but generally

More information

The SMT-LIB 2 Standard: Overview and Proposed New Theories

The SMT-LIB 2 Standard: Overview and Proposed New Theories 1 / 23 The SMT-LIB 2 Standard: Overview and Proposed New Theories Philipp Rümmer Oxford University Computing Laboratory philr@comlab.ox.ac.uk Third Workshop on Formal and Automated Theorem Proving and

More information

SAT Solver. CS 680 Formal Methods Jeremy Johnson

SAT Solver. CS 680 Formal Methods Jeremy Johnson SAT Solver CS 680 Formal Methods Jeremy Johnson Disjunctive Normal Form A Boolean expression is a Boolean function Any Boolean function can be written as a Boolean expression s x 0 x 1 f Disjunctive normal

More information

Algebraic Program Analysis

Algebraic Program Analysis Introduction to Algebraic Program Analysis Zachary Kincaid 1 Thomas Reps 2,3 1 Princeton University 2 University of Wisconsin-Madison 3 GrammaTech, Inc. January 8, 2018 1 Program analysis Design algorithms

More information

Symbolic Execution with Interval Constraint Solving and Meta-Heuristic Search

Symbolic Execution with Interval Constraint Solving and Meta-Heuristic Search Symbolic Execution with Interval Constraint Solving and Meta-Heuristic Search Mateus Borges, Marcelo d'amorim (Fed. U. Pernambuco, Brazil) Saswat Anand (Georgia Inst. of Technology) David Bushnell, Corina

More information

Timing Analysis. Dr. Florian Martin AbsInt

Timing Analysis. Dr. Florian Martin AbsInt Timing Analysis Dr. Florian Martin AbsInt AIT OVERVIEW 2 3 The Timing Problem Probability Exact Worst Case Execution Time ait WCET Analyzer results: safe precise (close to exact WCET) computed automatically

More information

Combining Abstraction Refinement and SAT-Based Model Checking

Combining Abstraction Refinement and SAT-Based Model Checking Combining Abstraction Refinement and SAT-Based Model Checking Nina Amla and Kenneth L. McMillan Cadence Design Systems Abstract. Unbounded model checking methods based on Boolean satisfiability (SAT) solvers

More information

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Isil Dillig, Thomas Dillig, Alex Aiken Stanford University Scalability and Formula Size Many program analysis

More information

Building a specialized static analyzer

Building a specialized static analyzer Building a specialized static analyzer The Astrée experience Antoine Miné CNRS, École Normale Supérieure Security and Reliability of Software Systems 12 December 2008 Antoine Miné Building a specialized

More information

Using widenings to infer loop invariants inside an SMT solver, or: A theorem prover as abstract domain

Using widenings to infer loop invariants inside an SMT solver, or: A theorem prover as abstract domain Using widenings to infer loop invariants inside an SMT solver, or: A theorem prover as abstract domain K. Rustan M. Leino and Francesco Logozzo Microsoft Research, Redmond, WA, USA fleino,logozzog@microsoft.com

More information

Finite Model Generation for Isabelle/HOL Using a SAT Solver

Finite Model Generation for Isabelle/HOL Using a SAT Solver Finite Model Generation for / Using a SAT Solver Tjark Weber webertj@in.tum.de Technische Universität München Winterhütte, März 2004 Finite Model Generation for / p.1/21 is a generic proof assistant: Highly

More information

LEARNING TO INSTANTIATE QUANTIFIERS

LEARNING TO INSTANTIATE QUANTIFIERS LEARNING TO INSTANTIATE QUANTIFIERS Armin Biere 1 joint work with Mathias Preiner 1,2, Aina Niemetz 1,2 TACAS 17, SMT 17, PhD Thesis Mathias Preiner in 2017 1 Johannes Kepler University Linz 2 Stanford

More information

An Improved Separation of Regular Resolution from Pool Resolution and Clause Learning

An Improved Separation of Regular Resolution from Pool Resolution and Clause Learning An Improved Separation of Regular Resolution from Pool Resolution and Clause Learning Maria Luisa Bonet and Sam Buss Theory and Applications of Satisfiability Testing SAT 2012 Trento, Italy July 17, 2012

More information

Areas related to SW verif. Trends in Software Validation. Your Expertise. Research Trends High level. Research Trends - Ex 2. Research Trends Ex 1

Areas related to SW verif. Trends in Software Validation. Your Expertise. Research Trends High level. Research Trends - Ex 2. Research Trends Ex 1 Areas related to SW verif. Trends in Software Validation Abhik Roychoudhury CS 6214 Formal Methods Model based techniques Proof construction techniques Program Analysis Static Analysis Abstract Interpretation

More information

CODE ANALYSIS CARPENTRY

CODE ANALYSIS CARPENTRY SEAN HEELAN THE (IN)COMPLETE GUIDE TO CODE ANALYSIS CARPENTRY ( Or how to avoid braining yourself when handed an SMT solving hammer Immunity Inc. Part I: Down the Rabbit Hole Propositional Logic Mechanical

More information

A Combination Framework for Tracking Partition Sizes

A Combination Framework for Tracking Partition Sizes A Combination Framework for Tracking Partition Sizes Sumit Gulwani Microsoft Research sumitg@microsoft.com Tal Lev-Ami Tel-Aviv University tla@post.tau.ac.il Mooly Sagiv Tel-Aviv University msagiv@post.tau.ac.il

More information

JPF SE: A Symbolic Execution Extension to Java PathFinder

JPF SE: A Symbolic Execution Extension to Java PathFinder JPF SE: A Symbolic Execution Extension to Java PathFinder Saswat Anand 1,CorinaS.Păsăreanu 2, and Willem Visser 2 1 College of Computing, Georgia Institute of Technology saswat@cc.gatech.edu 2 QSS and

More information

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214 Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in

More information

Reduced branching-factor algorithms for constraint satisfaction problems

Reduced branching-factor algorithms for constraint satisfaction problems Reduced branching-factor algorithms for constraint satisfaction problems Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

TNT. Runtime Errors. Proving Non-Termination. Proving Non-Termination. Non-Termination Errors. TNT: Testing Non-Termination

TNT. Runtime Errors. Proving Non-Termination. Proving Non-Termination. Non-Termination Errors. TNT: Testing Non-Termination Runtime Errors Proving Non-Termination Ashutosh K. Gupta Thomas A. Henzinger Rupak Majumdar MPI-SWS EPFL UCLA Andrey Rybalchenko Ru-Gang Xu MPI-SWS UCLA 2 Non-Termination Errors Proving Non-Termination...

More information