Constraint-Based Search Strategies For Bounded Program Verification. Michel RUEHER

Size: px
Start display at page:

Download "Constraint-Based Search Strategies For Bounded Program Verification. Michel RUEHER"

Transcription

1 Constraint-Based For Bounded Program Verification Michel RUEHER University of Nice Sophia-Antipolis / I3S CNRS, France (joined work with Hélène COLLAVIZZA, Nguyen Le VINH and Pascal Van HENTENRYCK) January 25, 2011 N I I Tokyo This work was partially supported by the ANR-07-SESUR-003 project CAVERN and the ANR-07 TLOG 022 project TESTEC 1

2 Outline on Constraint Programming (CP) and on Bounded Model Checking (BMC) A CP framework for Bounded Program Verification, a Depth First Dynamic Exploration of the CFG, a Non Sequential Exploration Strategy of the CFG 2

3 on Constraint Programming on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 3

4 Constraint Programming: Constraint Programming is a way of modeling and solving combinatorial optimization problems CP combines techniques from artificial intelligence, logic programming, and operations research There exist several industrial solvers (e.g., ILOG/IBM, Eclipse, Xpress-Kalis, Comet), and academic solvers (e.g., Gecode, Choco, Minion) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm Many industrial applications, e.g., timetabling (Dutch railway), hardware verification (Intel), scheduling, planning,... 4

5 CP: key features Domain filtering Consider each constraint separately and remove values that are trivially inconsistent ing strategies Try to exploit the structure of the problem... and Global Constraints Use (efficient) specific algorithms for some subclasses of constraints on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 5

6 CP filtering / solving Example: variables/domains x 1 {1, 2}, x 2 {0, 1, 2, 3}, x 3 {2, 3} constraints x 1 > x 2 on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) 6

7 CP filtering / solving Example: variables/domains x 1 {1, 2} x 2 {0, 1, 2/,3/ }, x 3 {2, 3} constraints x 1 > x 2 x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 7

8 CP filtering / solving Example: domains x 1 {1} x 2 {0, 1/ }, x 3 {2, 3} constraints x 1 > x 2 x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 8

9 CP filtering / solving Example: domains x 1 { 1/ } x 2 { 0/,1/ }, x 3 { 2/, 3/ } constraints x 1 > x 2 x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 9

10 CP filtering / solving domains x 1 {2} x 2 {0, 1}, x 3 { 2/,3} constraints x 1 > x 2 x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 10

11 CP filtering / solving domains x 1 {2} x 2 {0/, 1}, x 3 {2/,3} constraints x 1 > x 2 x 1 + x 2 = x 3 alldifferent(x 1, x 2, x 3 ) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 11

12 CP: Global Constraints Example: alldifferent Constraints: alldifferent(x 1, x 2, x 3, x 4, x 5, x 6 ) Domains: x 1 {1, 2}, x 2 {1, 2, 3}, x 3 {1, 3} x 4 {3, 4}, x 5 {1, 4, 6}, x 5 {5, 6, 7} Algorithm: matching bipartite graph (or network flow algorithm) on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 12

13 CP: ing strategies Heuristics choosing the variable to instantiate choosing the value for the selected variable Popular heuristic: First fail "To succeed, try first where you are most likely to fail" on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 13

14 on Bounded Model Checking on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 14

15 on BMC Mechanically check properties of models Widely used in hardware verification and software verification Automatic generation of counterexamples on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 15

16 BMC: key features Models finite automates, labelled transition systems Properties: Safety something bad should not happen Liveness something good should happen on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm Bound k look only for counter examples made of k states 16

17 Algorithm for Model Checking Safety % set of states: S, initial states: I, transition relation: T % bad states B reachable from I via T? bounded_model_checker forward (I, T, B, k) S C = ; S N = I; n = 1 while S C S N and n < k do if B S N then return found error trace to bad states ; else S C = S N ; S N = S C T (S C ); n = n + 1; done return no bad state reachable ; on CP CP: Overview CP Solving Global & on BMC BMC: overview Algorithm 17

18 CP framework CP & BMC A CP framework for Bounded Program Verification Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 18

19 of CP framework Bounded program verification (the array lengths, the variable values and the loops are bounded) Constraint stores to represent the specification and the program CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment Program is partially correct if the constraint store implies the post-conditions Non deterministically exploration of execution paths array assignment conditional instruction while instruction strategies 19

20 CP framework & BMC BMC: Bounded Model Checking BMC: falsification of a given property is checked for a given bound BMC mainly involves three steps: 1. the program is unwound k times, 2. the unwounded program and the property are translated into a big propositional formula φ φ is satisfiable iff there exists a counterexample of depth less than k 3. A SAT-solver or SMT-solver is used for checking the satisfiability of φ CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 20

21 CP framework & BMC... CP For Bounded Program Verification CP : falsification of a given property is checked for a given bound CP & BMC Pre-processing A small example CP mainly involves three steps: 1. the program is unwound k times, 2. An annotated and simplified CFG is built 3. Program is translated in constraints on the fly A list of solvers tried in sequence (LP, MILP, Boolean, CP) Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 21

22 CP framework & BMC... CP framework Specification constraints Program constraints (on the fly) Solving Process List of solvers tried in sequence on each selected node of the CFG Takes advantage of the structure of the program BMC based on SAT / SMT solvers Program & specification Big Boolean formula Solving Process SAT solvers or SMT solvers (SAT solvers & specialised solvers) spurious solutions backtracks Critical issue: minimum conflict sets CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 22

23 CP framework, pre-processing Pre-processing 1. P is unwound k times P uw CP & BMC 2. P uw DSA Puw, Dynamic Single Assignment form (each variable is assigned exactly once on each program path) 3. DSA Puw is simplified according to the specific property prop by applying slicing techniques 4. Domains of all variables are filtered by propagating constant values along G, the simplified CFG Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 23

24 A small example void foo(int a, int b) int c, d, e, f ; if(a >= 0) { if(a < 10) {f = b 1;} else {f = b a; } c = a; if(b >= 0) {d = a; e = b;} else {d = a; e = b;} } else { c = b; d = 1; e = a; if(a > b) {f = b + e + a;} else {f = e a b;} } c = c + d + e; assert(c >= d + e); // property p 1 assert(f >= b e); // property p 2 CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 24

25 A small example(continued) Initial CFG CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 25

26 A small example(continued) Simplified CFG CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 26

27 CP framework, language Java programs and JML specifications JML = Comments in java code ( javadoc like) (can be compiled and executed at run time) Properties are directly expressed on the program variables no need for abstraction Pre-conditions and post-relations Exists and Forall quantifiers CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies C programs and assertions 27

28 CP framework, restrictions Unit code validation Data types : integers, arrays of integers Bounded programs : array lengths, number of unfoldings of loops, size of integers are known Normal behaviours of the method (no exception) CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction JML specification : post condition : the conjunction of use cases of the method strategies possibly a precondition 28

29 Building the constraint store: principle Each expression is mapped to a constraint: ρ transforms program expressions into constraints CP & BMC SSA-like variable renaming: σ[v] is the current renaming of variable v Pre-processing A small example Language and restrictions Building the constraint store scalar assignment JML : \forall i conjunction of conditions \exist i disjunction of conditions (i has bounded values) array assignment conditional instruction while instruction strategies 29

30 Building the constraint store... scalar assignment Program σ 2 = σ 1 [v/σ 1 (v) + 1] & c 2 (ρ σ 2 v) = (ρ σ 1 e) [v e, l], σ 1, c 1 [l], σ 2, c 1 c 2 x=x+1; y=x*y; x=x+y; Constraints {x 1 = x 0 + 1, y 1 = x 1 y 0, x 2 = x 1 y 1 } CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 30

31 Building the constraint store... array assignment σ 2 = σ 1 [a/σ 1 (a) + 1] c 2 (ρ σ 2 a)[ρ σ 1 e 1 ] = (ρ σ 1 e 2 ) c 3 i 0..a.length(ρ σ 1 e 1 ) i (ρ σ 2 a)[i] = (ρ σ 1 a)[i] [a[e 1 ] e 2, l], σ 1, c 1 [l], σ 2, c 1 c 2 c 3 Program (a.length=8) a[i] = x; Constraints {a 1 [i 0 ] = x 0, i 0 0 a 1 [0] = a 0 [0], i 0 1 a 1 [1] = a 0 [1],..., i 0 7 a 1 [7] = a 0 [7]} CP & BMC Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies guard body is a guarded constraint a[i] = x is the element constraint: i and x are constrained variables whose values may be unknown 31

32 Building the constraint store... conditional instruction: if b i ; l CP & BMC c (ρ σ b) is satisfiable if b i ; l, σ, c i ; l, σ, c (ρ σ b) Pre-processing A small example Language and restrictions Building the constraint store scalar assignment array assignment c (ρ σ b) is satisfiable if b i ; l, σ, c l, σ, c (ρ σ b) conditional instruction while instruction strategies 32

33 Building the constraint store... while instruction: while b i ; l CP & BMC Pre-processing c (ρ σ b) is satisfiable while b i ; l, σ, c i; while b i ; l, σ, c (ρ σ b) A small example Language and restrictions Building the constraint store scalar assignment array assignment conditional instruction while instruction c (ρ σ b) is satisfiable while b i; l, σ, c l, σ, c (ρ σ b) strategies 33

34 strategies, Depth first exploration of the CFG CP & BMC Pre-processing A small example Language and restrictions, Non sequential exploration of the CFG Building the constraint store scalar assignment array assignment conditional instruction while instruction strategies 34

35 A Depth First Dynamic Exploration of the CFG Example Implementation & Implementation 35

36 , Translate precondition of the specification (if it exists) into a set of constraints PRECOND Example Translate post condition of the specification into a set of constraints POSTCOND Implementation & Implementation Explore each branch B i of the program and translate instructions of B i into a set of constraints PROG_Bi 36

37 , the validation process For each branch B i, solve CSPi = PROG_Bi PRECOND NOT(POSTCOND) If for each branch B i CSPi is inconsistent, then the program is conform with its specification If for a branch B i CSPi has a solution, then this solution is a test case which illustrates a non-conformity Example Implementation & Implementation! Inconsistencies of CSPi are detected at each node of the control flow graph 37

38 Binary search (1) requires (\forall int && (\result!=-1 ==> t[\result] == v) (\result==-1 ==> \forall int k; 0<=k<t.length; 1 static int binary_search(int[] t, int v) 2 int l = 0; 3 int u = t.length-1; 4 while (l <= u) 5 int m = (l + u) / 2; 6 if (t[m]==v) return m; 7 if (t[m] > v) 8 u = m - 1; 9 else 10 l = m + 1; // ERROR else u = m - 1; 11 return -1; Example Implementation & Implementation 38

39 Binary search (2) Precondition \forall int i;i>=0 && i<t.length-1;t[i]<=t[i+1] CSP t 0 [0] t 0 [1] t 0 [1] t 0 [2]... t 0 [6] t 0 [7] Example Implementation & Implementation Initialization int l=0;int u=t.length-1; CSP CSP l 0 = 0 u 0 = 7 39

40 Binary search (2) Precondition \forall int i;i>=0 && i<t.length-1;t[i]<=t[i+1] CSP t 0 [0] t 0 [1] t 0 [1] t 0 [2]... t 0 [6] t 0 [7] Example Implementation & Implementation Initialization int l=0;int u=t.length-1; CSP CSP l 0 = 0 u 0 = 7 40

41 Binary search (3) Loop while (l<=u) Enter into the loop since l 0 u 0 is consistent with the current constraint store CSP CSP l 0 u 0 Example Implementation & Implementation Assignment int m=(l+u)/2; CSP CSP m 0 = (l 0 + u 0 )/2 = 3 41

42 Binary search (3) Loop while (l<=u) Enter into the loop since l 0 u 0 is consistent with the current constraint store CSP CSP l 0 u 0 Example Implementation & Implementation Assignment int m=(l+u)/2; CSP CSP m 0 = (l 0 + u 0 )/2 = 3 42

43 Binary search (4) Conditional if (t[m]==v) return m; t 0 [m 0 ] = v 0 is consistent with the constraint store so take the if part CSP CSP t 0 [m 0 ] = v 0 Example Implementation & Implementation Complete execution path p whose constraint store c p is: c pre l 0 = 0 u 0 = 7 m 0 = 3 t 0 [m 0 ] = v 0 43

44 Binary search (4) Conditional if (t[m]==v) return m; t 0 [m 0 ] = v 0 is consistent with the constraint store so take the if part CSP CSP t 0 [m 0 ] = v 0 Example Implementation & Implementation Complete execution path p whose constraint store c p is: c pre l 0 = 0 u 0 = 7 m 0 = 3 t 0 [m 0 ] = v 0 44

45 Binary search (5) Return statement has been reached add negation of post condition and link JML \result variable with returned value m 0 \result!=-1 ==> t[\result] == v) && (\result==-1 ==> \forall int k; 0<=k<t.length; t[k]!=v) \m 0! = 1 t 0 [m 0 ]! = v 0 \m 0 = 1 (t 0 [0] = v 0 t 0 [1] = v 0... t 0 [6] = v 0 ) solve the CSP There is No solution so the program is correct along this execution path Example Implementation & Implementation Go back to conditional if (t[m]==v) to explore the else part 45

46 Binary search (5) Return statement has been reached add negation of post condition and link JML \result variable with returned value m 0 \result!=-1 ==> t[\result] == v) && (\result==-1 ==> \forall int k; 0<=k<t.length; t[k]!=v) \m 0! = 1 t 0 [m 0 ]! = v 0 \m 0 = 1 (t 0 [0] = v 0 t 0 [1] = v 0... t 0 [6] = v 0 ) solve the CSP There is No solution so the program is correct along this execution path Example Implementation & Implementation Go back to conditional if (t[m]==v) to explore the else part 46

47 Implementation Dedicated solvers ad-hoc simplifier : trivial simplifications and calculus on constants linear solver (LP algorithm) + MIP solver Boolean solver (SAT solver) (Boolean relaxation of the non linear constraints) CSP solver : used if none of the other solver did find an inconsistency Prototype Example Implementation & Implementation Solvers : Ilog CPLEX11 and JSolver4verif Written in Java using JDT (eclipse) for parsing Java programs!! CPLEX is unsafe but Neumaier & Shcherbina method for computing a certificate of infeasibility 47

48 Current prototype On the fly validation : if c then... else... If c can be simplified into constant value true or false, select the branch which corresponds to c If c is linear 1. add decision c in linear_csp 2. solve linear_csp if linear_csp has no solution, condition c is not feasible for the current path choose another path Example Implementation & Implementation if linear_csp has a solution, we can t conclude anything on complete_csp investigate both branches c and c 48

49 Current prototype On the fly validation : if c then... else... If c is NOT linear : 1. abstract decision c and add it in boolean_csp 2. solve boolean_csp boolean_csp has no solution choose another path if boolean_csp has a solution investigate both branches c and c Example Implementation & Implementation Boolean abstraction hash-table of decisions : keys are decisions, values are Boolean variables sub-expressions are shared rewriting 49

50 Current prototype On the fly validation : loops Let c be the entrance condition if c is trivially simplified to true or false enter or exit the loop if {c + linear_csp } is inconsistent add c to the CSPs and exit the loop Example Implementation & Implementation In other cases, unfold loop max times: If max is reached add c to the CSPs and exit the loop Else investigate both paths 50

51 We compared CPBVP with the following frameworks: ESC/Java, an Extended Static Checker for Java run-time errors in JML-annotated Java programs (static analysis of the code and its annotations) CBMC, a Bounded Model Checker for ANSI-C and C++ programs verification of array bounds (buffer overflows), pointer safety, exceptions, and user-specified assertions BLAST, a software model checker for C program (Berkeley Lazy Abstraction Software Verification Tool) EUREKA, a C bounded model checker which uses an SMT solver instead of an SAT solver Why, a verification platform which integrates provers (proof assistants such as Coq, PVS, HOL 4,...) and decision procedures (Simplify, Yices,...) Example Implementation & Implementation 51

52 Binary search length time 1.08s 1.69s 4.04s 17.01s s CBMC time 1.37s 1.43s KO Why inv 11.18s KO ESC/Java Error BLAST KO EUREKA tool : cannot handle because of expression m = (u + l)/2 CP execution paths explored given by the recurrence relation: P(2) = P(4); P(2n) = 2P(n) + log(n) length ESC/Java CBMC WHY inv BLAST s 1.21 s 1.38s KO KO s s 1.69s KO KO s s 7.62s KO KO s s 27.05s KO KO s s s KO KO Table: Experimental Results for an Incorrect Binary Example Implementation & Implementation CBMC and ESC/Java only show the decisions taken along the faulty path (they do not provide any value for the array nor the searched data) 52

53 Binary search length time 1.08s 1.69s 4.04s 17.01s s CBMC time 1.37s 1.43s KO Why inv 11.18s KO ESC/Java Error BLAST KO EUREKA tool : cannot handle because of expression m = (u + l)/2 CP execution paths explored given by the recurrence relation: P(2) = P(4); P(2n) = 2P(n) + log(n) length ESC/Java CBMC WHY inv BLAST s 1.21 s 1.38s KO KO s s 1.69s KO KO s s 7.62s KO KO s s 27.05s KO KO s s s KO KO Table: Experimental Results for an Incorrect Binary Example Implementation & Implementation CBMC and ESC/Java only show the decisions taken along the faulty path (they do not provide any value for the array nor the searched data) 53

54 Tritype Takes 3 integers (triangle sides) and returns the type of triangle CP :10 paths explored among 57 correspond to actual inputs because of complex conditionals CP and Why : time does not depend on the size of the integers earlier approach (Boolean abstraction, TACAS 06): 8.52s for integers coded on 16 bits, 92 spurious paths Example Implementation & Implementation ESC/Java CBMC Why BLAST time 0.287s 1.828s 0.82s 8.85s KO 54

55 Sum of squares requires (n == & (\forall int i; i>=0 & (0<=t[i] & & (\alldifferent ensures \result == 1 int sum(int[] t, int n) 2 int s = 0; 3 int i = 0; 4 while (i!=t.length) 5 s=s+t[i]*t[i] 6 i =i+1; 7 return s; Example Implementation & Implementation Using global constraint alldiff Solving non linear problems s for n = 10 55

56 Role of the different solvers CPLEX, the MIP solver, plays a key role in all these benchmarks: Example Tritype: the CP solver is never called Binary search: there are only length calls to the CP solver (and much more calls to CPLEX) but almost 75% of the CPU time is spent in the CP solver Implementation & Implementation Sum of squares: 80% of the CPU time is spent in the CP solver 56

57 Critical issues We do not need the Boolean abstraction to capture the control structure of the program Use the CFG and constraints to prune the search space Example Implementation & Implementation Depth first dynamic exploration of the CFG Efficient if the variables are instantiated early Blind searching: post-condition becomes active very late 57

58 A Non Sequential Exploration Strategy of the CFG A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 58

59 , A new search strategy for verifying a restricted class of Java or C programs: Non sequential dynamic exploration of the CFG Goal: generating counterexamples for real time applications A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 59

60 Non sequential dynamic constraint based exploration strategy Essential observation When the program is in an SSA-like form, a path can be built in a non-sequential dynamic way CFG does not have to be explored in a top down (or bottom up) way: compatible blocks can just be collected in a non-deterministic way Constraint solving is integrated with state exploration to prune the state space as early as possible A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 60

61 Non sequential dynamic constraint based exploration strategy starts from the post-condition and dynamically collects program blocks which involve variables of the post-condition Collecting as much information as possible on a given variable enforces the constraints on its domain and reduces the search space A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 61

62 A small example void foo(int a, int b) int c, d, e, f ; if(a >= 0) { if(a < 10) {f = b 1;} else {f = b a; } c = a; if(b >= 0) {d = a; e = b;} else {d = a; e = b;} } else { c = b; d = 1; e = a; if(a > b) {f = b + e + a;} else {f = e a b;} } c = c + d + e; assert(c >= d + e); // property p 1 assert(f >= b e); // property p 2 A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 62

63 A small example(continued) To prove property p 1, select node (4) the condition in node (0) must be true S = {c 1 < d 0 + e 0 c 1 = c 0 + d 0 + e 0 c 0 = a 0 a 0 0} = {a 0 < 0 a 0 0}... inconsistent A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 63

64 A small example(continued) Select node (8) condition in node (0) must be false S = {c 1 < d 0 + e 0 c 1 = c 0 + d 0 + e 0 c 0 = b 0 d 0 = 1 e 0 = a 0 a 0 < 0} = {a 0 < 0 b 0 < 0} Solution {a 0 = 1, b 0 = 1} A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 64

65 , Algorithm (scheme) S negation of prop % constraint store Q variables in prop % queue of variables IF Q, v POP(Q) for a program block PB(v) where v is defined PUSH(Q, new_var), new_var = new variables ( input variables) of PB(v) S S {definition of v and conditions required to reach definition of v } IF S is inconsistent, backtrack & search another definition (otherwise the dual condition is cut off) IF Q = search for an instantiation of the input variables (= counterexample) If no solution exists, backtracks. A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 65

66 FM Application: Description of the module A real time industrial application from a car manufacturer (provided by Geensoft) Flasher Manager (FM): controller that drives several functions related to the flashing lights Purpose: to indicate a direction change to lock and unlock the car from the distance to activate the warning lights A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work Simulink model of FM C function f 1 66

67 FM Application: Simulink model (1) A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 67

68 FM Application: Simulink model (2) A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 68

69 FM Application: Function f 1 Simulink model of FM C function f 1 81 Boolean variables (6 inputs, 2 outputs) and 28 integer variables 300 lines of code: nested conditionals including linear operations and constant assignments Piece of code: A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 69

70 FM Application: property p 1 Property p 1 : The lights should never remain lit Property p 1 concerns the behaviour of FM for an infinite time period p 1 is violated when the lights remain on for N consecutive time periods a loop (bounded by N) that counts the number of times where the output of FM has consecutively been true A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work Challenge: bound N as great as possible 70

71 : tools, implemented in Comet, a hybrid optimization platform for solving combinatorial problems *, an optimized version of based on a dynamic top down strategy CBMC, one of the best bounded model checkers were performed on a Quad-core Intel Xeon X GHz clocked with 16Gb memory All times are given in seconds. A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 71

72 (results) Solving time: N CBMC * TO TO 400 TO 4.66 TO Pre-processing time: N CBMC * TO A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 72

73 Discussion on the binary search Length CBMC * TO TO TO TO TO TO and CBMC waste a lot of time in exploring the different paths * incrementally adds the decisions taken along a path well adapted for the Binary program A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 73

74 Discussion (continued) Future work on other applications Extension of our prototype handling pointers interfacing with a floating point number solver Combining strategies A small example Algorithm FM Application Description Simulink model Program Discussion Binary search Future work 74

75 A Constraint-Programming for Bounded Program Verification Hélène Collavizza, Michel Rueher, and Pascal Van Hentenryck Constraints Journal, Springer Verlag, vol. 15(2): , Efficient Constraint-Based Dynamic For Generating Counterexamples Hélène Collavizza, Nguyen Le Vinh, Michel Rueher, Samuel Devulder, Thierry Gueguen 26th ACM Symposium On Applied Computing, Software Verification and Testing Track,Taiwan, March

76 Thank you :) 76

On Search Strategies for Constraint-Based Bounded Model Checking. Michel RUEHER

On Search Strategies for Constraint-Based Bounded Model Checking. Michel RUEHER raft On Search Strategies for Constraint-Based Bounded Model Checking Michel RUEHER Joined work with Hélène Collavizza, Nguyen Le Vinh, Olivier Ponsini and Pascal Van Hentenryck University Nice Sophia-Antipolis

More information

Varia%ons autour de la vérifica%on sous contraintes Michel Rueher

Varia%ons autour de la vérifica%on sous contraintes Michel Rueher Varia%ons autour de la vérifica%on sous contraintes Michel Rueher (en collabora+on avec Hélène Collavizza, Claude Michel, Olivier Ponsini, Le Vinh Nguyen, Mohamed Said Belaid, Mohammed Bekkouche) Journée

More information

Automatic Verification of Loop Invariants

Automatic Verification of Loop Invariants Automatic Verification of Loop Invariants Olivier Ponsini, Hélène Collavizza, Carine Fédèle, Claude Michel, Michel Rueher University of Nice Sophia Antipolis, I3S/CNRS BP 145, 06903 Sophia Antipolis Cedex,

More information

Constraint-Based Error Localization. Mohammed, Bekkouche, Hélène Collavizza, Michel Rueher. University of Nice Sophia-Antipolis.

Constraint-Based Error Localization. Mohammed, Bekkouche, Hélène Collavizza, Michel Rueher. University of Nice Sophia-Antipolis. Constraint-Based Error Localization Mohammed, Bekkouche, Hélène Collavizza, Michel Rueher University of Nice Sophia-Antipolis France Réunion VACSIM 14 Octobre 2014 I3S CNRS raft 1 Problem 2 Motivating

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

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

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

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

Handling Loops in Bounded Model Checking of C Programs via k-induction

Handling Loops in Bounded Model Checking of C Programs via k-induction Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Handling Loops in Bounded Model Checking of C Programs via k-induction Mikhail Y. R. Gadelha, Hussama I. Ismail, and

More information

Applying Multi-Core Model Checking to Hardware-Software Partitioning in Embedded Systems

Applying Multi-Core Model Checking to Hardware-Software Partitioning in Embedded Systems V Brazilian Symposium on Computing Systems Engineering Applying Multi-Core Model Checking to Hardware-Software Partitioning in Embedded Systems Alessandro Trindade, Hussama Ismail, and Lucas Cordeiro Foz

More information

Verifying Temporal Properties via Dynamic Program Execution. Zhenhua Duan Xidian University, China

Verifying Temporal Properties via Dynamic Program Execution. Zhenhua Duan Xidian University, China Verifying Temporal Properties via Dynamic Program Execution Zhenhua Duan Xidian University, China Main Points Background & Motivation MSVL and Compiler PPTL Unified Program Verification Tool Demo Conclusion

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

Model Checking Embedded C Software using k-induction and Invariants

Model Checking Embedded C Software using k-induction and Invariants FEDERAL UNIVERSITY OF RORAIMA and FEDERAL UNIVESITY OF AMAZONAS Model Checking Embedded C Software using k-induction and Invariants Herbert Rocha, Hussama Ismail, Lucas Cordeiro and Raimundo Barreto Agenda

More information

BITCOIN MINING IN A SAT FRAMEWORK

BITCOIN MINING IN A SAT FRAMEWORK BITCOIN MINING IN A SAT FRAMEWORK Jonathan Heusser @jonathanheusser DISCLAIMER JUST TO BE CLEAR.. This is research! Not saying ASICs suck I am not a cryptographer, nor SAT solver guy WTF REALISED PHD RESEARCH

More information

UNDERSTANDING PROGRAMMING BUGS IN ANSI-C SOFTWARE USING BOUNDED MODEL CHECKING COUNTER-EXAMPLES

UNDERSTANDING PROGRAMMING BUGS IN ANSI-C SOFTWARE USING BOUNDED MODEL CHECKING COUNTER-EXAMPLES FEDERAL UNIVERSITY OF AMAZONAS INSTITUTE OF COMPUTING GRADUATE PROGRAM IN COMPUTER SCIENCE UNDERSTANDING PROGRAMMING BUGS IN ANSI-C SOFTWARE USING BOUNDED MODEL CHECKING COUNTER-EXAMPLES Herbert Oliveira

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

SMT-Based Bounded Model Checking for Embedded ANSI-C Software. Lucas Cordeiro, Bernd Fischer, Joao Marques-Silva

SMT-Based Bounded Model Checking for Embedded ANSI-C Software. Lucas Cordeiro, Bernd Fischer, Joao Marques-Silva SMT-Based Bounded Model Checking for Embedded ANSI-C Software Lucas Cordeiro, Bernd Fischer, Joao Marques-Silva b.fischer@ecs.soton.ac.uk Bounded Model Checking (BMC) Basic Idea: check negation of given

More information

Lecture 2: Symbolic Model Checking With SAT

Lecture 2: Symbolic Model Checking With SAT Lecture 2: Symbolic Model Checking With SAT Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 (Joint work over several years with: A. Biere, A. Cimatti, Y.

More information

More on Verification and Model Checking

More on Verification and Model Checking More on Verification and Model Checking Wednesday Oct 07, 2015 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/60 Course fair! 2/60 Exam st October 21, 8:00 13:00 If you want to participate,

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

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Roman Barták Charles University in Prague, Faculty of Mathematics and Physics Institute for Theoretical Computer

More information

View-based Propagator Derivation

View-based Propagator Derivation View-based Propagator Derivation Christian Schulte SCALE, KTH & SICS, Sweden joint work with: Guido Tack NICTA & Monash University, Australia Based on:. Christian Schulte, Guido Tack. Constraints 18(1),

More information

Symbolic Evaluation/Execution

Symbolic Evaluation/Execution Symbolic Evaluation/Execution Reading Assignment *R.W. Floyd, "Assigning Meaning to Programs, Symposium on Applied Mathematics, 1967, pp. 19-32 (Appeared as volume 19 of Mathematical Aspects of Computer

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

Constraint (Logic) Programming

Constraint (Logic) Programming Constraint (Logic) Programming Roman Barták Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic bartak@ktiml.mff.cuni.cz Sudoku Combinatorial puzzle, whose goal is to enter

More information

Reading Assignment. Symbolic Evaluation/Execution. Move from Dynamic Analysis to Static Analysis. Move from Dynamic Analysis to Static Analysis

Reading Assignment. Symbolic Evaluation/Execution. Move from Dynamic Analysis to Static Analysis. Move from Dynamic Analysis to Static Analysis Reading Assignment Symbolic Evaluation/Execution *R.W. Floyd, "Assigning Meaning to Programs, Symposium on Applied Mathematics, 1967, pp. 19-32 (Appeared as volume 19 of Mathematical Aspects of Computer

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

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Constraint Satisfaction Problems Prof. Scott Niekum The University of Texas at Austin [These slides are based on those of Dan Klein and Pieter Abbeel for CS188 Intro to

More information

Verifying Java Programs Verifying Java Programs with KeY

Verifying Java Programs Verifying Java Programs with KeY Verifying Java Programs Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Constraint Propagation: The Heart of Constraint Programming

Constraint Propagation: The Heart of Constraint Programming Constraint Propagation: The Heart of Constraint Programming Zeynep KIZILTAN Department of Computer Science University of Bologna Email: zeynep@cs.unibo.it URL: http://zeynep.web.cs.unibo.it/ What is it

More information

Symbolic and Concolic Execution of Programs

Symbolic and Concolic Execution of Programs Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015 Information Security, CS 526 1 Reading for this lecture Symbolic execution and program testing - James

More information

Formal Methods in Software Development

Formal Methods in Software Development Formal Methods in Software Development Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

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

Model Checking and Its Applications

Model Checking and Its Applications Model Checking and Its Applications Orna Grumberg Technion, Israel Verification and Deduction Mentoring Workshop July 13, 2018 1 Personal data Ph.d. in (non-automated) verification Postdoc in Model Checking

More information

Combining forces to solve Combinatorial Problems, a preliminary approach

Combining forces to solve Combinatorial Problems, a preliminary approach Combining forces to solve Combinatorial Problems, a preliminary approach Mohamed Siala, Emmanuel Hebrard, and Christian Artigues Tarbes, France Mohamed SIALA April 2013 EDSYS Congress 1 / 19 Outline Context

More information

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

Minion: Fast, Scalable Constraint Solving. Ian Gent, Chris Jefferson, Ian Miguel

Minion: Fast, Scalable Constraint Solving. Ian Gent, Chris Jefferson, Ian Miguel Minion: Fast, Scalable Constraint Solving Ian Gent, Chris Jefferson, Ian Miguel 1 60 Second Introduction to CSPs Standard Definition A CSP is a tuple V: list of variables D: a domain for each

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

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

Static program checking and verification

Static program checking and verification Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Slides: Based on KSE06 With kind permission of Peter Müller Static program checking and verification Correctness

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

Hybrid CSP & Global Optimization. Michel RUEHER

Hybrid CSP & Global Optimization. Michel RUEHER Hybrid Michel RUEHER University of Nice Sophia-Antipolis / I3S CNRS, France Courtesy to Alexandre Goldsztejn, Yahia Lebbah, Claude Michel June, 2011 ACP Summer School Hybrid Methods for Constraint Programming

More information

: A Bounded Model Checking Tool to Verify Qt Applications

: A Bounded Model Checking Tool to Verify Qt Applications 23 rd International SPIN symposium on Model Checking of Software : A Bounded Model Checking Tool to Verify Qt Applications Mário A. P. Garcia, Felipe R. Monteiro, Lucas C. Cordeiro, and Eddie B. de Lima

More information

Counterexample Guided Abstraction Refinement in Blast

Counterexample Guided Abstraction Refinement in Blast Counterexample Guided Abstraction Refinement in Blast Reading: Checking Memory Safety with Blast 17-654/17-754 Analysis of Software Artifacts Jonathan Aldrich 1 How would you analyze this? * means something

More information

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems Constraint Satisfaction Problems N variables domain D constraints x 1 x 2 Instructor: Marco Alvarez University of Rhode Island (These slides

More information

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set:

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set: Announcements Homework 1: Search Has been released! Due Monday, 2/1, at 11:59pm. On edx online, instant grading, submit as often as you like. Project 1: Search Has been released! Due Friday 2/5 at 5pm.

More information

A SYMBOLIC APPROACH TOWARDS CONSTRAINT BASED SOFTWARE VERIFICATION SHUBHRA DATTA. Department of Computer Science

A SYMBOLIC APPROACH TOWARDS CONSTRAINT BASED SOFTWARE VERIFICATION SHUBHRA DATTA. Department of Computer Science A SYMBOLIC APPROACH TOWARDS CONSTRAINT BASED SOFTWARE VERIFICATION SHUBHRA DATTA Department of Computer Science APPROVED: Martine Ceberio, Ph.D. Vladik Kreinovich, Ph.D. Virgilio Gonzalez, Ph.D. Benjamin

More information

Testing, Debugging, Program Verification

Testing, Debugging, Program Verification Testing, Debugging, Program Verification Automated Test Case Generation, Part II Wolfgang Ahrendt & Vladimir Klebanov & Moa Johansson 12 December 2012 TDV: ATCG II /GU 2011-12-12 1 / 17 Recap Specification-/Model-Based

More information

C Code Verification based on the Extended Labeled Transition System Model

C Code Verification based on the Extended Labeled Transition System Model C Code Verification based on the Extended Labeled Transition System Model Dexi Wang, Chao Zhang, Guang Chen, Ming Gu, and Jiaguang Sun School of Software, TNLIST, Tsinghua University, China {dx-wang12,zhang-chao13,chenguan14}@mails.tsinghua.edu.cn

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

Runtime Checking for Program Verification Systems

Runtime Checking for Program Verification Systems Runtime Checking for Program Verification Systems Karen Zee, Viktor Kuncak, and Martin Rinard MIT CSAIL Tuesday, March 13, 2007 Workshop on Runtime Verification 1 Background Jahob program verification

More information

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm Announcements Homework 4 Due tonight at 11:59pm Project 3 Due 3/8 at 4:00pm CS 188: Artificial Intelligence Constraint Satisfaction Problems Instructor: Stuart Russell & Sergey Levine, University of California,

More information

PART II: Local Consistency & Constraint Propagation

PART II: Local Consistency & Constraint Propagation PART II: Local Consistency & Constraint Propagation Solving CSPs Search algorithm. Usually backtracking search performing a depth-first traversal of a search tree. Local consistency and constraint propagation.

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

Verifying Java Programs Verifying Java Programs with KeY

Verifying Java Programs Verifying Java Programs with KeY Verifying Java Programs Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Verifying C & C++ with ESBMC

Verifying C & C++ with ESBMC Verifying C & C++ with ESBMC Denis A Nicole dan@ecs.soton.ac.uk CyberSecuritySoton.org [w] @CybSecSoton [fb & tw] ESBMC ESBMC, the Efficient SMT-Based Context-Bounded Model Checker was originally developed

More information

Yices 1.0: An Efficient SMT Solver

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

More information

PKIND: A parallel k-induction based model checker

PKIND: A parallel k-induction based model checker PKIND: A parallel k-induction based model checker Temesghen Kahsai The University of Iowa temesghen-kahsaiazene@uiowa.edu Cesare Tinelli The University of Iowa cesare-tinelli@uiowa.edu PKIND is a novel

More information

An Eclipse Plug-in for Model Checking

An Eclipse Plug-in for Model Checking An Eclipse Plug-in for Model Checking Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala Electrical Engineering and Computer Sciences University of California, Berkeley, USA Rupak Majumdar Computer Science

More information

Cover Page. The handle holds various files of this Leiden University dissertation

Cover Page. The handle   holds various files of this Leiden University dissertation Cover Page The handle http://hdl.handle.net/1887/22891 holds various files of this Leiden University dissertation Author: Gouw, Stijn de Title: Combining monitoring with run-time assertion checking Issue

More information

An Alldifferent Constraint Solver in SMT

An Alldifferent Constraint Solver in SMT An Alldifferent Constraint Solver in SMT Milan Banković and Filip Marić Faculty of Mathematics, University of Belgrade (milan filip)@matf.bg.ac.rs May 16, 2010 Abstract The finite domain alldifferent constraint,

More information

Java Modelling Language (JML) References

Java Modelling Language (JML) References Java Modelling Language (JML) References G. T. Leavens and Y. Cheon. Design by Contract with JML, August 2005. L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. T. Leavens, K. R. M. Leino, and E. Poll.

More information

Solving Constraint Problems in Constraint Programming

Solving Constraint Problems in Constraint Programming Solving Constraint Problems in Constraint Programming Zeynep KIZILTAN Department of Computer Science University of Bologna Email: zeynep@cs.unibo.it What is it about? 10 hour lectures about the core of

More information

A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software

A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software Rovedy A. B. e Silva 1,2, Jose M. Parente de Oliveira 2, and Jorge Sousa Pinto 3 1 Aeronautics and Space

More information

Hybrid Constraint Solvers

Hybrid Constraint Solvers Hybrid Constraint Solvers - An overview Why Hybrid Solvers CP and SAT: Lazy Clause Generation CP and LP: Reification of Linear Constraints Conclusions 9 November 2011 Pedro Barahona - EPCL - Hybrid Solvers

More information

Mathematical Programming Formulations, Constraint Programming

Mathematical Programming Formulations, Constraint Programming Outline DM87 SCHEDULING, TIMETABLING AND ROUTING Lecture 3 Mathematical Programming Formulations, Constraint Programming 1. Special Purpose Algorithms 2. Constraint Programming Marco Chiarandini DM87 Scheduling,

More information

Why. an intermediate language for deductive program verification

Why. an intermediate language for deductive program verification Why an intermediate language for deductive program verification Jean-Christophe Filliâtre CNRS Orsay, France AFM workshop Grenoble, June 27, 2009 Jean-Christophe Filliâtre Why tutorial AFM 09 1 / 56 Motivations

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

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

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

Chapter 10 Part 1: Reduction

Chapter 10 Part 1: Reduction //06 Polynomial-Time Reduction Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Chapter 0 Part : Reduction Reduction. Problem X

More information

Capabilities and limits of CP in Global Optimization

Capabilities and limits of CP in Global Optimization Capabilities and limits of CP in RUEHER Université de Nice Sophia-Antipolis / CNRS - I3S, France CPAIOR Workshop on Hybrid Methods for NLP 15/06/10 A 1 Outline A A 2 The Problem We consider the continuous

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

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

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar ESC/Java 2 Extended Static Checker for Java 2 B y K ats man Andrey S oftware E ngineering S em inar 2 0 0 8 Background ESC/Java - Original development by Compaq Systems Research Center (1997) as a successor

More information

A Bounded Model Checker for SPARK Programs

A Bounded Model Checker for SPARK Programs A Bounded Model Checker for SPARK Programs Cláudio Belo Lourenço, Maria João Frade, and Jorge Sousa Pinto HASLab/INESC TEC & Universidade do Minho, Portugal Abstract. This paper discusses the design and

More information

CSC2108: Automated Verification Assignment 3. Due: November 14, classtime.

CSC2108: Automated Verification Assignment 3. Due: November 14, classtime. CSC2108: Automated Verification Assignment 3. Due: November 14, classtime. 1. Recall the notion of alternation depth in µ-calculus formulas. An alternation depth of a formula is one if results of a least

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine No model may be available Programmer Software Abstractions Tests Coverage Code Abhik Roychoudhury CS 5219 National University of Singapore Testing Debug Today s lecture Abstract model (Boolean pgm.) Desirable

More information

Revisiting the Upper Bounding Process in a Safe Branch and Bound Algorithm

Revisiting the Upper Bounding Process in a Safe Branch and Bound Algorithm Revisiting the Upper Bounding Process in a Safe Branch and Bound Algorithm Alexandre Goldsztejn 1, Yahia Lebbah 2,3, Claude Michel 3, and Michel Rueher 3 1 CNRS / Université de Nantes 2, rue de la Houssinière,

More information

Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen

Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen Erik Poll - JML p.1/39 Overview Assertions Design-by-Contract for Java using JML Contracts and Inheritance Tools for JML Demo

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

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

Integrating Mixed-Integer Optimisation & Satisfiability Modulo Theories

Integrating Mixed-Integer Optimisation & Satisfiability Modulo Theories Integrating Mixed-Integer Optimisation & Satisfiability Modulo Theories Application to Scheduling Miten Mistry and Ruth Misener Wednesday 11 th January, 2017 Mistry & Misener MIP & SMT Wednesday 11 th

More information

Verifying Java Programs with KeY

Verifying Java Programs with KeY Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang

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

Announcements. CS 188: Artificial Intelligence Fall 2010

Announcements. CS 188: Artificial Intelligence Fall 2010 Announcements Project 1: Search is due Monday Looking for partners? After class or newsgroup Written 1: Search and CSPs out soon Newsgroup: check it out CS 188: Artificial Intelligence Fall 2010 Lecture

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

Program Verification (6EC version only)

Program Verification (6EC version only) Program Verification (6EC version only) Erik Poll Digital Security Radboud University Nijmegen Overview Program Verification using Verification Condition Generators JML a formal specification language

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 Announcements Project 1: Search is due next week Written 1: Search and CSPs out soon Piazza: check it out if you haven t CS 188: Artificial Intelligence Fall 2011 Lecture 4: Constraint Satisfaction 9/6/2011

More information

ESC/Java2 vs. JMLForge. Juan Pablo Galeotti, Alessandra Gorla, Andreas Rau Saarland University, Germany

ESC/Java2 vs. JMLForge. Juan Pablo Galeotti, Alessandra Gorla, Andreas Rau Saarland University, Germany ESC/Java2 vs. JMLForge Juan Pablo Galeotti, Alessandra Gorla, Andreas Rau Saarland University, Germany ESC/Java2: the formula is built using Dijsktra s Weakes precondition. Automatic theorem prover: Simplify

More information

Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification

Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification Aws Albarghouthi 1, Yi Li 1, Arie Gurfinkel 2, and Marsha Chechik 1 1 Department of Computer Science, University of Toronto,

More information

Numerical Computations and Formal Methods

Numerical Computations and Formal Methods Program verification Formal arithmetic Decision procedures Proval, Laboratoire de Recherche en Informatique INRIA Saclay IdF, Université Paris Sud, CNRS October 28, 2009 Program verification Formal arithmetic

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Having a BLAST with SLAM Meeting, CSCI 555, Fall 20 Announcements Homework 0 due Sat Questions? Move Tue office hours to -5pm 2 Software Model Checking via Counterexample Guided Abstraction Refinement

More information

MODELLING AND SOLVING SCHEDULING PROBLEMS USING CONSTRAINT PROGRAMMING

MODELLING AND SOLVING SCHEDULING PROBLEMS USING CONSTRAINT PROGRAMMING Roman Barták (Charles University in Prague, Czech Republic) MODELLING AND SOLVING SCHEDULING PROBLEMS USING CONSTRAINT PROGRAMMING Two worlds planning vs. scheduling planning is about finding activities

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

arxiv: v2 [cs.pl] 3 Apr 2018

arxiv: v2 [cs.pl] 3 Apr 2018 1 Scheduling Constraint Based Abstraction Refinement for Multi-Threaded Program Verification arxiv:1708.08323v2 [cs.pl] 3 Apr 2018 LIANGZE YIN, School of Computer, National University of Defense Technology,

More information

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Constraint Satisfaction Problems slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Standard search problems: State is a black box : arbitrary data structure Goal test

More information

Softwaretechnik. Program verification. Albert-Ludwigs-Universität Freiburg. June 28, Softwaretechnik June 28, / 24

Softwaretechnik. Program verification. Albert-Ludwigs-Universität Freiburg. June 28, Softwaretechnik June 28, / 24 Softwaretechnik Program verification Albert-Ludwigs-Universität Freiburg June 28, 2012 Softwaretechnik June 28, 2012 1 / 24 Road Map Program verification Automatic program verification Programs with loops

More information