7. SAT-Based Model-Checking Fachgebiet Rechnersysteme1

Size: px
Start display at page:

Download "7. SAT-Based Model-Checking Fachgebiet Rechnersysteme1"

Transcription

1 7. SAT-Based Model-Checking Fachgebiet Rechnersysteme 7. SAT-Based Model-Checking 7. SAT-Based Model-Checking 3 Content Temporal property 7. Bounded Model-Checking (BMC) (IPC) Sequential circuit Model- Checker SAT-Checker Y N Counter-example 7. SAT-Based Model-Checking 2 As a rule of thumb, OBDD-based symbolic modelcheckers are able to cope with systems of flipflops (~ states) Direct application of OBDD-based symbolic model-checking to large circuits is not possible Current solutions: () SAT-based model-checking (Bounded and Interval Model-Checking) (2) Employ induction (3) Build abstract models with fewer storage elements 7. SAT-Based Model-Checking 4 7. Bounded Model-Checking (BMC) Bounded Model-Checking (BMC Biere et al FMCAD'98/ Bounded Model Checking (BMC, Biere et al. FMCAD 98/ DAC'99) The size of the SAT formula of a circuit is proportional to the size of the circuit Unfolding a circuit n-times allows to check if a property is violated for n time steps

2 7. SAT-Based Model-Checking 5 7. Bounded Model-Checking Example: We want to check that the two flipflops and are never at the same point of time, i.e., G((*)) in the circuit it below We consider only a bounded number of n time steps We "unfold" the circuit n times and check if the property is violated at one of the n time instances 7. SAT-Based Model-Checking 7 7. Bounded Model-Checking Unfolding 3 times: i f Initial state f i f i f i 2 f (*) i f Error at t= Error at t= Error at t=2 Error at t=3 If this output is unsatisfiable then the property holds 7. SAT-Based Model-Checking 6 7. Bounded Model-Checking What does "unfolding" mean? i f Initial state f i f i f i 2 f 7. SAT-Based Model-Checking 8 7. Bounded Model-Checking Unfolding 3 times: i f Initial state i i i 2 (*) t If this output is unsatisfiable then the property holds Replication of circuit

3 7. SAT-Based Model-Checking 9 7. Bounded Model-Checking Initial i f state contradiction contradiction i i i 2 contradiction (*) contradiction If this output is unsatisfiable then the property holds 7. SAT-Based Model-Checking 7. Bounded Model-Checking Formally, we use again the notation T(S, I, S') for the transition-relation We introduce n+ copies S i, S' i and I i of the old/new state t variables and of the input variables, respectively, with i n We observe that we have always S' i = S i+ for the unfolded transition relation with i < n Hence, The transition-relation for time-step i is T(S i, I i, S i+ ) Unrolling the circuit it n-times means to build the formula: Init(S )*T(S, I, S )*T(S, I, S 2 )*... *T(S n-, I n-, S n ) where Init characterizes the initial state 7. SAT-Based Model-Checking 7. Bounded Model-Checking Note that We used "fresh" input variables i, i, i 2 at each step of unrolling We consider "open" systems where the inputs may assume any value at each point of time The property would be violated immediately if we started with arbitrary intial states 7. SAT-Based Model-Checking 2 7. Bounded Model-Checking In order to check if a state-property p, i.e., a property involving only state-variables, is violated at one or several time-steps i, i n, we have to consider the term: (p(s ) + p(s ) p(s n )) As a result, the property is violated at some time-step i, i n, if the following formula is satisfiable: Init(S )*T(S, I, S )*T(S, I, S 2 )*... *T(S n-, I n-, S n )* (p(s ) + p(s ) p(s n )) If the formula is unsatisfiable then we know that the property p holds for the first n+ time steps

4 7. SAT-Based Model-Checking 3 7. Bounded Model-Checking The bound n is given by the user How big should n be selected? The Diameter d of a transition system: Determine the length of all the shortest paths from the initial states to any other state The diameter is the maximum of these values It is the minimum number of steps required for reaching all reachable states Example: d = 2 / r s / / / / / / / 7. SAT-Based Model-Checking 5 7. Bounded Model-Checking What about the verification of liveness-properties F(p)? A counter-example of a liveness-property F(p) is obviously an infinite path where p does not hold There must be a loop of states in the unfolded circuit! How to introduce the detection of loops into the technique? After some steps, the same state is visited, i.e., all flipflops assume the same value again p p p p p p 7. SAT-Based Model-Checking 4 7. Bounded Model-Checking For the verification of safety-properties G(p), n = d is sufficient But: d 2 n In many practical applications, d ~ There exist computationally hard methods to calculate d for a transition system BMC useful for debugging 7. SAT-Based Model-Checking 6 7. Bounded Model-Checking Unfolding once: i f Initial can not loop in state contradiction initial state f i f F() If this output were satisfiable then we had a counterexample

5 7. SAT-Based Model-Checking 7 7. Bounded Model-Checking Unfolding 3 times: Initial i state f i f i f i 2 f f F() 7. SAT-Based Model-Checking 9 7. Bounded Model-Checking Another loop: Initial i state f i f i f i 2 f f F() 7. SAT-Based Model-Checking 8 7. Bounded Model-Checking With a constant input value i =, = is obviously not reachable The result corresponds to the following state diagram: p p p In general, we have to consider all possible loops, e.g., also the following loop: 7. SAT-Based Model-Checking 2 7. Bounded Model-Checking In the general case, we have to consider loops of arbitrary length: Init(S )*T(S )T(S, I, S )*T(S )T(S, I, S 2 )*... *T(S n-, I n-, S n )* p(s )*p(s )*... *p(s n )* ((S n S ) + (S n S ) (S n S n- )) p p p etc.

6 7. SAT-Based Model-Checking 2 7. Bounded Model-Checking How big should n be in the case of liveness-properties? The Recurrence Diameter r of a transition system: The length of the longest loop-free path starting from the initial state Example: r = 2 / We have d r r s / / / / / / / 7. SAT-Based Model-Checking Bounded Model-Checking Summary: The violation of a property is implemented by means of a network of gates A SAT formula is generated from the unfolded circuit If the generated formula is unsatisfiable, it only means that there are no failure traces of length n! No guarantee that there are no errors for cases > n! Effective for showing the presence of bugs 7. SAT-Based Model-Checking Bounded Model-Checking r can be calculated by the following procedure: r is the smallest integer so that T(S, I, S )*T(S, I, S 2 )*... *T(S r, I r, S r+ ) ((S r+ S ) + (S r+ S ) (S r+ S r )) ("for each path s, s,..., s r+ longer than r, state s r+ has been visited before") However, for general properties, i.e., not pure safety or liveness properties the upper bound for unrolling ist still an open problem 7. SAT-Based Model-Checking 24 In principle, BMC is a complete method for proving properties (i.e., if the property holds it can be proven by means of BMC) if the bound n used for unrolling is "sufficiently large" However, for general properties, i.e., not pure safety or liveness properties, determining the upper bound for unrolling is still an open problem The upper bound may also become very large In contrast, Interval Model-Checking (IMC) or Interval Property Checking (IPC) is a powerful method which gives a sufficient condition for a property to hold IPC was developed for the proof of properties involving a time-window (interval) of fixed, finite length

7 7. SAT-Based Model-Checking 25 IPC unrolls the circuit in the same manner as BMC The circuit is unrolled as many times as it is given by the time-interval of the property The circuit is not unrolled from the initial state! IPC ignores the issue of reachabilty In many applications, implications or general properties within a time-interval of fixed length are very common 7. SAT-Based Model-Checking 27 The time-bounded property p we want to prove involves the state and input variables at different time-points,..., n of the time interval p is typically not a state-property t t Formally, we use again n+ copies of S i and I i of the state variables and of the input variables, respectively Generally, such a property p holds for all initializable paths if t Assumption Commitment t+n t: Init(S )*T(S )T(S, I, S )*...*T(S t-, I t-, S t )* T(S t, I t, S t+ )*...*T(S t+n-, I t+n-, S t+n ) p(s t,..., S t+n, I t,..., I t+n ) (i) Time-interval (or t: Init*T t *T n p for short) is a tautology 7. SAT-Based Model-Checking 26 Such properties are typical for many engineering specifications, e.g., timing-diagrams: 7. SAT-Based Model-Checking 28 Interval property-checking unrolls the circuit according to the size of the time-window involved in the property T(S t t, I t, S t+) )*T(S t+,, I t+, S t+2) )*... *T(S t+n-, I t+n-, S t+n) ) p(s t,..., S t+n, I t,..., I t+n ) (or T n p for short) We do not restrict S t to the initial state! The paths characterized by the formula above are legal virtual, i.e., possibly non- initializable iti paths Source: AMBA AHB Cycle Level Interface

8 7. SAT-Based Model-Checking 29 Example: prove that if f = at point t of time then = at point t+2 assume: at t: f = ''; prove: at t+2: = ''; f t t+2 7. SAT-Based Model-Checking 3 assume: at t: t t+ t+2 prove: f = ; at t+2: f i 2 i 3 = ; i f Represents the implication assume prove f t = t+2 = If this output is unsatisfiable then the property holds 7. SAT-Based Model-Checking 3 assume: at t: t t+ t+2 prove: f = ; at t+2: f i 2 f i 3 f = ; 7. SAT-Based Model-Checking 32 assume: at t: t t+ t+2 prove: f = ; at t+2: f i 2 i 3 = ; CVE f t = t+2 = f t = t+2 =

9 7. SAT-Based Model-Checking 33 v w Anfangszustand c i c i c i c v y w i v y w i v y w i 2 v y w i 3 i c v y w c y T 3 P x 7. SAT-Based Model-Checking 35 Proof: (a) Consider a path of length n+ starting in the initial state Init(S ), i.e., t=. The unsatisfiability of Init(S )*T(S, I, S )*...*T(S n-, I n-, S n )*p(s,..., S n, I,..., I n ) follows directly from the unsatisfiability of (iii). x x x x x P t 2 T 3 T 4 T 7. SAT-Based Model-Checking 34 Theorem: If the formula T(S t, I t, S t+ )*...*T(S t+n-, I t+n-, S t+n ) p(s t,..., S t+n, I t,..., I t+n ) (ii) (or T n p for short) is a tautology or if, equivalently, T(S t, I t, S t+ )*...*T(S t+n-, I t+n-, S t+n ) * p(s t,..., S t+n, I t,..., I t+n ) (iii) is unsatisfiable then p holds for all initializable paths of the system 7. SAT-Based Model-Checking 36 (b) An initializable path of arbitrary length t+: Init(S )*T(S, I, S )*...*T(S t-, I t-, S t ) adds an additional restriction "in front of" (ii): Init(S )*T(S, I, S )*...*T(S t-, I t-, S t )* T(S t, I t, S t+ )*...*T(S t+n-, I t+n-, S t+n )* p(s t,..., S t+n, I t,..., I t+n ) (iv) A i th ti fi bilit f ll f th Again, the unsatisfiability follows from the unsatisfiability of (iii).

10 7. SAT-Based Model-Checking 37 In many situations, IPC leads to an efficient proof of properties of complex designs However, the proof-procedure (iii) of IPC suffers from a false-negative problem: If (iii) is unsatisfiable then so is (iv) as we have shown If (iii) is satisfiable (indicating that the property does not hold) and produces a counter-example then (iv) might actually be unsatisfiable (indicating that the property holds) due to the additional restrictions to initializable paths Such a false-negative counter-example is called a spurious counter-example 7. SAT-Based Model-Checking 39 Solutions of the problem of spurious counter-examples will be given in Section 7.4 As a prerequisite, the concept of invariants will be introduced and discussed in the next Section 7. SAT-Based Model-Checking 38 Example: The following state-diagram is an autonomous 3-step counter which "counts" -... The state is the initial state. The state is unreachable. To prove the correct operation of the 3-step counter, we may want to prove that the values of the flipflops are repeated after 3 time steps, thus f t = f t+3 and t = t+3. However, for the property t = t+3 we get the counter-example if we ignore the unreachability of state. 7. SAT-Based Model-Checking 4 Remark: CVE The idea of Interval Property-Checking was originally developed by the CVE (Circuit Verification Environment) team at Siemens. The tool was further developed under the name "Gateprop" at Infineon Technologies, and is now commercialized by OneSpin Solutions, Munich f

11 7. SAT-Based Model-Checking 4 One way to overcome the problem of spurious counterexamples in IPC is - as we will discuss in Section to employ invariants of a system An invariant v of a system is a state-property, i.e., a property which refers to the state-variables at only one time-point a state-property which holds on all initializable paths, i.e., holds for all reachable states of a system: 7. SAT-Based Model-Checking 43 Example : s t s6 as well as (s t s4)*(s t s5)*(s t s6) are invariants ("to be not in state s6 invariantly holds for all the reachable states s, s, s2 and s3") Viewed as a characteristic ti function of the set of states, the invariants correspond to supersets of the set of reachable states (s t s4)*(s t s5)*(s t s6) t: Init(S )*T(S, I, S )*...*T(S t-, I t-, S t ) v(s t ) s s s2 s3 (or t: Init*T t v for short) state-variable s s4 s5 s6 s7 s t s6 7. SAT-Based Model-Checking 42 Since an invariant v holds for all reachable states it can be viewed as a characteristic function of a superset of the reachable states 7. SAT-Based Model-Checking 44 Example 2: In the following design *) a main state-machine controls a second state-machine (a counter). If the left statemachine is in state s t =, then the counter is always in state c t =. So we have the invariant: s t = c t =. - start= c= start= c s= s s= s s= s= s state-variable s * ) This example was inspired by the dissertation of M.D. Nguyen "System-on-Chip Protocol Compliance Verification Using Interval Property Checking", TU Kaiserslautern 28 s state-variable c

12 7. SAT-Based Model-Checking 45 To view the invariant as a characteristic function of a set of states, we observe that the complete state-space consists of 3*4 = 2 states, where 6 states are reachable: 7. SAT-Based Model-Checking 47 A particular important class of invariants can be proven by a simple induction-step in the time-dimension: the inductive invariants A property p is called an Inductive Invariant iff the following holds: reachable states p p t p t+ Induction basis Induction step t: p t state-variables s/c Rationale: assume that we have proven the induction basis and step, but t: p t does not hold. Then there is a smallest t+ > with p t+ = and p t =. Hence, p t p t+ = = which is a contradiction to the induction step. 7. SAT-Based Model-Checking 46 Viewed as a characteristic function of a set of states, the invariant [s t = c t =] = [s t + c t =] characterizes a superset of the reachable states: c t = 7. SAT-Based Model-Checking 48 There are several techniques to check the induction step p t p t+ In the forward direction, we check that all successor states t reachable from p, S(p) are included d in p, i.e., S(p) p t t+ reachable states Reasoning at t+ S(p) s t p p state-variables s/c

13 7. SAT-Based Model-Checking SAT-Based Model-Checking 5 p The forward direction is the somewhat more intuitive way of looking at induction: the set of all successor states of the p-states has to be a subset of the p-states t t+ S(p) p Example: p-states = {s,s,s2,s3} successor states of p-states S(p) = {s,s,s2,s3} p Hence, being not in s4 is an inductive invariant s s s2 s3 s4 Induction can also be used to try to prove G-type properties of CTL or LTL For instance, if p is an inductive invariant then AG(p) holds Note that we need only one AX-step to prove the AG property! There are, however, many properties q so that AG(q) holds, i.e., q is a general invariant, but q is not an inductive invariant (the bad news) This means that the induction step p AX(p) may fail and the model-checker produces a spurious counter-example if AG(p) actually holds p being an inductive invariant is sufficient, but not necessary for AG(p) There are techniques to improve the situation: 7. SAT-Based Model-Checking 5 Following the backward direction, we check that all p-states belong to those states from which p is unavoidable in the next state, formally: p AX(p) AX(p) Reasoning at t p t t+ p 7. SAT-Based Model-Checking 52 "Strong" and "weak" assumptions Assume we are able to prove that v k is a tautology Then p v k holds for arbitrary yp! Proof: [(v k) (p v k)] = [(v k) p v k] = More informal: if "if it rains then there are clouds" holds then "if it is Thursday and it rains then there are clouds" holds, too p v is a "stronger" assumption (= makes more restrictions) than v

14 7. SAT-Based Model-Checking 53 strong The strongest assumption is (we can deduce everything), the weakest assumption is (nothing can be deduced from ) We have thus the ordering:... p v... v... weak 7. SAT-Based Model-Checking 55. Example: Try to prove AG(s6), i.e., s6 is not reachable Trying s6 t s6 t+ (the induction step) yields the counter-example s5 t, s6 t+ P must be made "stronger", in the example: s4 t * s5 t *s6 t s4 t+ *s5 t+ *s6 t+ holds Hence, AG(s6) but also AG(s5) and AG(s4) s4*s5*s6 s s s2 s3 s4 s5 s6 s7 s6 7. SAT-Based Model-Checking 54 Assume that we can prove that a product p q is an inductive invariant Then p holds globally, i.e., AG(p) (and AG(q) as well) since t: [p(t) q(t)] (t)] implies t: p(t) Thus, if we can not successfully show that p is an inductive invariant, we can make p stronger and try the product p q But how to find a appropriate q which makes p q an inductive invariant? v can often be determined d by means of a counter-example 7. SAT-Based Model-Checking This example employs IPC. Obviously, the induction step p t p t+ can easily be proven by unrolling the circuit just twice. Example: Try to prove G((*)) )) for the following system by showing that (*) is an inductive invariant: i f

15 7. SAT-Based Model-Checking 57 There exists a counterexample! t t+ f f i 2 If this output t is unsatisfiable - then the property holds (*)t+ (*) t i f (*) is not an inductive invariant! 7. SAT-Based Model-Checking 59 contradiction - - t t+ f f Try: (*) t *(*) t i 2 If this output is unsatisfiable then the property holds (*) t+ *(*) t+ 7. SAT-Based Model-Checking Example (cont'd): so we get the counter-example * which is spurious since and can never be at the same point of time. So we strengthen the original property (*) ) by means of the negated counterexample (we try to prove that (*) is an inductive invariant, too). 7. SAT-Based Model-Checking 6 t t+ f - contradiction i 2 f - i f Try: (*)*(*) t If this output is unsatisfiable then the property holds (*)*(*) t+

16 7. SAT-Based Model-Checking 6 The addition of one counter-example may lead to another counter-example and so on... In complex situations, the efficient strengthening th of an invariant i is still an open problem 7. SAT-Based Model-Checking 63 Can this be better than the -step induction schema p t p t+? S(s6) s6 gives the spurious counter-example s5, s6 S(S(S(s6))) s6 holds! S(s6) s s s2 s3 s4 s5 s6 s7 s6 7. SAT-Based Model-Checking 62 Since spurious counter-examples for inductive invariants are caused by unreachable states, induction can also be used in the form of k-step induction for a bounded model- checker as follows (Sheeran et al. FMCAD'2) 7. SAT-Based Model-Checking 64 Can this be better than the -step induction schema p t p t+? S(s6) s6 gives the spurious counter-example s5, s6 S(S(S(s6))) s6 holds! p... p k p t... p t+k p t+k+ t: p t S(S(s6)) S(s6) s s s2 s3 s4 s5 s6 s7 s6

17 7. SAT-Based Model-Checking 65 Can this be better than the -step induction schema p t p t+? S(s6) s6 gives the spurious counter-example s5, s6 S(S(S(s6))) s6 holds! S(S(S(s6))) S(S(s6)) S(s6) 7. SAT-Based Model-Checking 67 The following example shows the successful application of 2-step induction to the proof of G(*) in a previous example using IPC we prove (*) t *(*) t+ (*) t+2 this avoids the spurious counter-example of -step induction: s s s2 s3 i f s4 s5 s6 s7 s6 7. SAT-Based Model-Checking 66 Formally, we have to check the induction basis by proving that Init(S )*T(S, I, S )*T(S, I, S 2 )*... *T(S k-, I k-, S k )* [p(s )+p(s )+... +p(s k )] is unsatisfiable, and the induction step by proving that T(S, I, S )*T(S, I, S 2 )*... *T(S k-, I k-, S k )*T(S k, I k, S k+ )* is unsatisfiable p(s )*p(s )*... *p(s k )*p(s k+ ) 7. SAT-Based Model-Checking t f i t+ t+2 f f i 2 If this output t is unsatisfiable - - then the property holds (*) t+2 (*) t (*) t+ i f

18 7. SAT-Based Model-Checking 69 In the examples above, the "end of the unreachable states", where no unreachable predecessors were left, was reached within a finite number of steps This is not the case anymore if loops are involved... The loop-problem: s s s2 s3 S(s6) 7. SAT-Based Model-Checking 7 One way to overcome the problem of spurious counterexamples in IPC is to employ invariants of a system Since spurious counter-examples are caused by unreachable states and since invariants restrict the set of unreachable states it is intuitively clear that an invariant as an additional constraint may prevent spurious counterexamples We will discuss this procedure by means of a running example which hwas introduced d in the previous Section. S(s6) s4 s5 s6 s7 s6 7. SAT-Based Model-Checking 7 Since loops in the unrolled circuits are problematic, an additional term enforcing different states at each step is added to increase the efficiency of the approach: [(S S )*(S S 2 )*... *(S S k+ )* (S S 2 )*(S S 3 )*...*(S S k+ )*... (S k S k+ )]* T(S, I, S )*T(S, I, S 2 )*... *T(S k-, I k-, S k )*T(S k, I k, S k+ )* p(s )*p(s )*... *p(s k )*p(s k+ ) Increases the size of the formula quadratically in k 7. SAT-Based Model-Checking 72 The problem of spurious counter-examples in IPC is prevalent in the verification of systems consisting of interacting finite-state machines (fsm's), e.g., implementations of bus-protocols In the following example, a main fsm (left) controls a second fsm (a counter) s start= - c= start= c state-variable s s= s= s s= s= s state-variable c s

19 7. SAT-Based Model-Checking 73 We want to prove that with s= and start= at point t of time, we have again s= after exactly 6 time points: 7. SAT-Based Model-Checking 75 The path corresponding to the property to be proven: s t = * start t t = s t+6 = (I) s t = * start t = s t+6 = start= s - c= start= c s= s= s s= s= s start= state-variable s s state-variable c state-variables s/c 7. SAT-Based Model-Checking 74 The following slides show the state-space, the path corresponding to the property to be proven, and the path corresponding to a spurious counter-example The complete state-space space consists of 3*4 = 2 states, 6 states are reachable: 7. SAT-Based Model-Checking 76 Unfortunately, we get a counter-example: if the system started in state s t = and c t = then we have 6 time points later s t+6 =! However, we observe (by inspection of the design) that s t = and c t = is an unreachable state since c t = is possible only with s t =. Typically, we modify the property (I) and add an additional constraint c t = to the assumption of the property: c t = * s t = * start t = s t+6 = (II) Property (II) will now be verified successfully by IPC state-variables s/c

20 7. SAT-Based Model-Checking 77 The path of the spurious counter-example: s t = * start t = s t+6 = start= start= 7. SAT-Based Model-Checking 79 Our solution will be to employ an invariant v and try to prove T n (v p) (III) rather than the original IPC-proof T n p (see (ii) and (iii) in Section 7.2). If (III) holds then p holds globallay, too (a proof will be given below) Intuitively, this is reasonable since we require that p holds only for those states characterized by v and v, as an invariant, includes all reachable states t and excludes some unreachable ones state-variables s/c 7. SAT-Based Model-Checking 78 The procedure above rises a couple of questions: Our original interest was to prove (I) and not (II). Are we allowed to infer the truth of (I) from the proof of (II)? What additional constraints should we add to the original assumption of the property? c t = was only one possible example if we added as an assumption then we could prove everything! The answer will be that (I) in fact holds. However, the additional constraint c t = must satisfy certain properties which have to be validated Basically, an invariant will be employed The invariant has to be checked This will be formally discussed in the following slides 7. SAT-Based Model-Checking 8 Example (see Section 7.2): The following state-diagram is an autonomous 3-step counter which "counts" -... The state is the initial state. The state is unreachable. To prove the correct operation of the 3-step counter, we may want to prove that the values of the flipflops are repeated after 3 time steps, thus f t = f t+3 and t = t+3. However, for the property t = t+3 we get the counter-example if we ignore the unreachability of state. f

21 7. SAT-Based Model-Checking 8 In the example, an invariant v is (f t * t ) ("state is not reachable") According to (III), we prove (f t * t ) ( t = t+3 ) and do not get a counter-example anymore However, in order to be sure that we do not exclude actual counter-examples we are obliged to prove that (f t * t ) holds for all initializable paths, i.e., that state is unreachable. This can be done, for instance, by induction 7. SAT-Based Model-Checking 83 In many cases, the property p is of the form p = a c. Since v p = v (a c) = v + a + c = v*a c we can replace (III) in such situations by the proof of: T n (v*a c) We "strengthen" the assumption a by the invariant v (IV) f 7. SAT-Based Model-Checking 82 A formal proof of T n (v p) (III) means the following: Show that t: Init*T t *T n p (p holds globally, see (i) in Section 7.2) follows from t: Init*T t v (v is an invariant) i and T n (v p) (III). The problem is of the form: Prove the tautology of (M v)*(n (v p)) (M*N p) where M ~ Init*T t and N ~ T n for some fixed t and n. Applying the definition of the implication-operator and demorgan's-law we obtain equivalently: [(M + v)*(n + v + p)] + M + N + p = Mv + Nvp + M + N + p which is tautologically true. 7. SAT-Based Model-Checking 84 In addition, the invariant v itself is often of the form part of the assumption (pa) additional constraint (ac) e.g., s t = c t = where part of the assumption is implied by the original assumption a, a pa =, e.g., s t =*start t = s t = is a tautology In this case, we can simply build the conjunction of the original assumption and the additional constraint: according to (IV), we have to prove v*a c assuming a pa =, we have a*pa = v is of the form pa ac, hence v*a c becomes: (pa ac)*a c = pa*a + ac*a c = ac*a c We simply build the and of the original assumption and the additional constraint, e.g., c t =*s t =*start t = s t+6 =.

22 7. SAT-Based Model-Checking 85 In the example of the interacting fsm's above, we wanted to show the original property (I): s t = * start t = s t+6 = Building the product of the invariant s t = c t = or s t + c t = and the assumption of (I), we obtain (s t + c t =) * s t = * start t = s t+6 = which can be simplified to (II): c t = * s t = * start t = s t+6 = 7. SAT-Based Model-Checking 87 Proving the invariance property of s t + c t = we may use induction, i.e., we try to prove the induction step s t + c t = s t+ + c t+ = Unfortunately, we get a counter-example example caused by the transitions shown below: c= reachable states We conclude that (II) in fact proves (I) for the system However, we are obliged to prove that s t + c t = is actually an invariant! s state-variables s/c 7. SAT-Based Model-Checking SAT-Based Model-Checking 88 The transitions in the state-diagram; s t + c t = c= reachable states s - start= c= start= c s= s s= s s= s= s state-variables s/c state-variable s s state-variable c

23 7. SAT-Based Model-Checking 89 We employ an additional invariant s t = c t = or s t + c t = and are finally able to prove by induction: [s t + c t =]*[s t + c t =]* [s t+ + c t+ =]*[s t+ + c t+ =] Note that [s t + c t =]*[s t + c t =] characterizes exactly the reachable states c= reachable states s 7. SAT-Based Model-Checking 9 3 concepts of abstraction to obtain a simpler system-model: Exact abstraction Ad-hoc abstraction Conservative abstraction Temporal property Abstract model Model- Checker N Y? s state-variables s/c Sequential circuit (concrete model) counter example spurious or not? 7. SAT-Based Model-Checking 9 A summary of what we have proven so far: t: s t = c t = and t: s t = c t = are invariants and hold for the (reachable states of the) system although we were not able to prove, e.g., t: s t = c t = simply by induction! The original property s t =*start t = s t+6 = holds for the (reachable states of the) system although we had to strengthen the assumption to c t =*s t =*start t = s t+6 = for technical reasons, i.e., to cope with the reachability issues of IPC 7. SAT-Based Model-Checking 92 Exact abstraction If the property holds in the abstract model, it holds in the concrete model as well If the property does not hold in the abstract model, it does not hold in the concrete model Currently, there are no fully automated techniques for exact abstractions

24 7. SAT-Based Model-Checking 93 Ad-hoc simplifications Build (manually) a simpler model, e.g., of a C program Check properties p on the simplified model If the property holds, it can not be made clear that the property holds in the concrete (original) model! If the property does not hold it has to be checked if the property does not hold in the original model Main application: error detection Model-checking discovers other types of bugs than simulation of single cases 7. SAT-Based Model-Checking 95 ACTL-based conservative abstraction ACTL is a restriction of CTL to the A-operators AX, AF, and AG The negation is restricted to literals Otherwise we could back-introduce the E- operators, e.g., by means of EG( p) AF( p) This also excludes operators like exor and implication! For instance, p AX ( AF ( p )) is a ACTL formula 7. SAT-Based Model-Checking 94 Conservative abstraction () If the property holds in the abstract model, it holds in the concrete model as well (2) If the property does not hold in the abstract model, a counter-example is generated; it has to be checked in the concrete model if the counter-example is spurious or not If the counter-example is a counter-example in the concrete model as well then, of course, the property is violated and we are finished If not, the abstract model has to be refined on the basis of the counter-example and the procedure has to be repeated This technique is called CEGAR (Counter Example Guided Abstraction Refinement) 7. SAT-Based Model-Checking 96 ACTL formulas enjoy many interesting properties Example: ACTL supports compositional model-checking: Assume that a temporal property p of a subsystem is proven The subsystem is embedded into a bigger system, i.e., composed with other subsystems Is the proven property still valid? System Subsystem 2 Subsystem 3 Subsystem 4 Subsystem

25 7. SAT-Based Model-Checking 97 Problem: The inputs of the subsystem are "free" and unrestricted All input sequences are possible If the subsystem is connected with other subsystems, some sequences may be excluded Certain execution paths may not be possible anymore Certain properties may not be valid anymore! All possible paths 7. SAT-Based Model-Checking 99 The rest of this Section discusses similar abstraction techniques which are particularly useful if IPC (Section 7.2) based on SAT-checking is applied EF(p) The environment restricts the execution paths to this subset p 7. SAT-Based Model-Checking SAT-Based Model-Checking Properties specified as ACTL formulas remain valid if a subsystem is embedded into some environment ACTL formulas check properties for all paths; a restriction ti does not invalidate the property Assume that a Boolean expression f(x, y,..., y n ) is unsatisfiable, i.e., f=. Then certainly the two cofactors w.r.t. x are both unsatisfiable, i.e., f(, y,..., y n )= and f(, y,..., y n )= (*) Assume that we replace the variable x with a function g(z,..., z n ) (the support of g does not have to be distinct from the support of f). In terms of circuits this means that we connect the input x of f with some additional circuit implementing g: x y y n... f... z z n g y... y n f

26 7. SAT-Based Model-Checking The substitution of g for x is expressed by g*f(, y,..., y n ) + g*f(, y,..., y n ) This expression is also unsatisfiable since both cofactors are due to (*) As a result, if we check a property of a circuit by demonstrating unsatisfiability of an output f where a partial circuit is replaced by a free input, then the property holds also for the original circuit However, if the property does not hold we do not know if the property is also violated in the original circuit z... z n g x y... y n f 7. SAT-Based Model-Checking 3 Introduction of free inputs can also be directly applied to the IPC procedure This will be illustrated by means of the following 4-bit shift-register i t example for e= the input d and the 4 registers are shifted down d e for e= the shift-register is unchanged (the flipflops are reloaded) f 7. SAT-Based Model-Checking 2 A generalization of this technique is called black-boxing: Some part p of a system, for instance, a combinational multiplier, is replaced by a "black-box", i.e., the outputs t of p are replaced by free inputs A conservative abstraction... p... System 7. SAT-Based Model-Checking 4 We want to prove the obvious property that the content of flipflop at point t+4 of time is equal to the value of the input d at point t of time, if the input e is at points t,..., t+3 of time: e t *e t+ *e t+2 *e t+3 ( t+4 d t ) Negating the property yields: e t *e t+ *e t+2 *e t+3 *( t+4 d t ) d e We have to prove that this f expression is unsatisfiable

27 7. SAT-Based Model-Checking 5 Unfolding 4 times and adding the property yields: 7. SAT-Based Model-Checking 7 Cone-of-influence reduction is a standard technique: d e d e d 2 e 2 d 3 e 3 e t *e t+ *e t+2 *e t+3 d e e e 2 e 3 f f f f f Results in a smaller SAT-instance = f = f 7. SAT-Based Model-Checking 6 Cone-of-influence reduction is a standard technique: d e d e d 2 e 2 d 3 e 3 7. SAT-Based Model-Checking 8 However, we can cut away even more circuits: d e e e 2 e 3 = f = f

28 7. SAT-Based Model-Checking 9 Problems: Where to introduce cut-points ("switches")? How to determine which switches should be closed if the proof fails? 7. SAT-Based Model-Checking The switches are closed according to the counter-examples d e e e 2 e 3 Free input gives a counter example - = f 7. SAT-Based Model-Checking "Switches" are introduced at the ouputs of the flipflops 7. SAT-Based Model-Checking 2 The switches are closed according to the counter-examples d e e e 2 e 3 d e e e 2 e 3 Free input gives a 2nd counter example - = f - = f

29 7. SAT-Based Model-Checking 3 Finally, a contradiction is found: d e e e 2 e = f 7. SAT-Based Model-Checking 4 Remark: The CEGAR idea is due to Clarke et al. CAV'2. The combination of CEGAR and incomplete BMC was developed by I. Schäfer in his dissertation at TUD. The shift-register example is taken from his dissertation.

Model Checking: An Introduction

Model Checking: An Introduction Announcements Model Checking: An Introduction Meeting 2 Office hours M 1:30pm-2:30pm W 5:30pm-6:30pm (after class) and by appointment ECOT 621 Moodle problems? Fundamentals of Programming Languages CSCI

More information

Static Program Transformations for Efficient Software Model Checking

Static Program Transformations for Efficient Software Model Checking Static Program Transformations for Efficient Software Model Checking Shobha Vasudevan Jacob Abraham The University of Texas at Austin Dependable Systems Large and complex systems Software faults are major

More information

Coverability for Parallel Programs

Coverability for Parallel Programs 2015 http://excel.fit.vutbr.cz Coverability for Parallel Programs Lenka Turoňová* Abstract We improve existing method for the automatic verification of systems with parallel running processes. The technique

More information

Mathematical Induction

Mathematical Induction Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How

More information

Introduction to Software Verification

Introduction to Software Verification Introduction to Software Verification Orna Grumberg Lectures Material winter 2013-14 Lecture 4 5.11.13 Model Checking Automated formal verification: A different approach to formal verification Model Checking

More information

Formal Verification by Model Checking

Formal Verification by Model Checking Formal Verification by Model Checking Natasha Sharygina Carnegie Mellon University Guest Lectures at the Analysis of Software Artifacts Class, Spring 2005 1 Outline Lecture 1: Overview of Model Checking

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

Temporal Logics. Computation Tree Logic

Temporal Logics. Computation Tree Logic Temporal Logics CTL: definition, relationship between operators, adequate sets, specifying properties, safety/liveness/fairness Modeling: sequential, concurrent systems; maximum parallelism/interleaving

More information

Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

More information

logic language, static/dynamic models SAT solvers Verified Software Systems 1 How can we model check of a program or system?

logic language, static/dynamic models SAT solvers Verified Software Systems 1 How can we model check of a program or system? 5. LTL, CTL Last part: Alloy logic language, static/dynamic models SAT solvers Today: Temporal Logic (LTL, CTL) Verified Software Systems 1 Overview How can we model check of a program or system? Modeling

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

T-79.186 Reactive Systems: Introduction and Finite State Automata

T-79.186 Reactive Systems: Introduction and Finite State Automata T-79.186 Reactive Systems: Introduction and Finite State Automata Timo Latvala 14.1.2004 Reactive Systems: Introduction and Finite State Automata 1-1 Reactive Systems Reactive systems are a class of software

More information

Software Verification and Testing. Lecture Notes: Temporal Logics

Software Verification and Testing. Lecture Notes: Temporal Logics Software Verification and Testing Lecture Notes: Temporal Logics Motivation traditional programs (whether terminating or non-terminating) can be modelled as relations are analysed wrt their input/output

More information

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

WRITING PROOFS. Christopher Heil Georgia Institute of Technology WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this

More information

Model Checking II Temporal Logic Model Checking

Model Checking II Temporal Logic Model Checking 1/32 Model Checking II Temporal Logic Model Checking Edmund M Clarke, Jr School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 2/32 Temporal Logic Model Checking Specification Language:

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

Regression Verification: Status Report

Regression Verification: Status Report Regression Verification: Status Report Presentation by Dennis Felsing within the Projektgruppe Formale Methoden der Softwareentwicklung 2013-12-11 1/22 Introduction How to prevent regressions in software

More information

Model Checking of Software

Model Checking of Software Model Checking of Software Patrice Godefroid Bell Laboratories, Lucent Technologies SpecNCheck Page 1 August 2001 A Brief History of Model Checking Prehistory: transformational programs and theorem proving

More information

2 Temporal Logic Model Checking

2 Temporal Logic Model Checking Bounded Model Checking Using Satisfiability Solving Edmund Clarke 1, Armin Biere 2, Richard Raimi 3, and Yunshan Zhu 4 1 Computer Science Department, CMU, 5000 Forbes Avenue Pittsburgh, PA 15213, USA,

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation PLDI 03 A Static Analyzer for Large Safety-Critical Software B. Blanchet, P. Cousot, R. Cousot, J. Feret L. Mauborgne, A. Miné, D. Monniaux,. Rival CNRS École normale supérieure École polytechnique Paris

More information

Enforcing Security Policies. Rahul Gera

Enforcing Security Policies. Rahul Gera Enforcing Security Policies Rahul Gera Brief overview Security policies and Execution Monitoring. Policies that can be enforced using EM. An automata based formalism for specifying those security policies.

More information

Introducing Formal Methods. Software Engineering and Formal Methods

Introducing Formal Methods. Software Engineering and Formal Methods Introducing Formal Methods Formal Methods for Software Specification and Analysis: An Overview 1 Software Engineering and Formal Methods Every Software engineering methodology is based on a recommended

More information

Formal Verification of Software

Formal Verification of Software Formal Verification of Software Sabine Broda Department of Computer Science/FCUP 12 de Novembro de 2014 Sabine Broda (DCC-FCUP) Formal Verification of Software 12 de Novembro de 2014 1 / 26 Formal Verification

More information

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

InvGen: An Efficient Invariant Generator

InvGen: An Efficient Invariant Generator InvGen: An Efficient Invariant Generator Ashutosh Gupta and Andrey Rybalchenko Max Planck Institute for Software Systems (MPI-SWS) Abstract. In this paper we present InvGen, an automatic linear arithmetic

More information

So let us begin our quest to find the holy grail of real analysis.

So let us begin our quest to find the holy grail of real analysis. 1 Section 5.2 The Complete Ordered Field: Purpose of Section We present an axiomatic description of the real numbers as a complete ordered field. The axioms which describe the arithmetic of the real numbers

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL University of Texas at El Paso DigitalCommons@UTEP Departmental Technical Reports (CS) Department of Computer Science 8-1-2007 Using Patterns and Composite Propositions to Automate the Generation of Complex

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

A Few Basics of Probability

A Few Basics of Probability A Few Basics of Probability Philosophy 57 Spring, 2004 1 Introduction This handout distinguishes between inductive and deductive logic, and then introduces probability, a concept essential to the study

More information

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count

More information

The Model Checker SPIN

The Model Checker SPIN The Model Checker SPIN Author: Gerard J. Holzmann Presented By: Maulik Patel Outline Introduction Structure Foundation Algorithms Memory management Example/Demo SPIN-Introduction Introduction SPIN (Simple(

More information

Software Modeling and Verification

Software Modeling and Verification Software Modeling and Verification Alessandro Aldini DiSBeF - Sezione STI University of Urbino Carlo Bo Italy 3-4 February 2015 Algorithmic verification Correctness problem Is the software/hardware system

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

More information

Sample Induction Proofs

Sample Induction Proofs Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given

More information

Model Checking based Software Verification

Model Checking based Software Verification Model Checking based Software Verification 18.5-2006 Keijo Heljanko Keijo.Heljanko@tkk.fi Department of Computer Science and Engineering Helsinki University of Technology http://www.tcs.tkk.fi/~kepa/ 1/24

More information

Handout #1: Mathematical Reasoning

Handout #1: Mathematical Reasoning Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

More information

Formal Verification and Linear-time Model Checking

Formal Verification and Linear-time Model Checking Formal Verification and Linear-time Model Checking Paul Jackson University of Edinburgh Automated Reasoning 21st and 24th October 2013 Why Automated Reasoning? Intellectually stimulating and challenging

More information

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers. MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

More information

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements. 3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

A Propositional Dynamic Logic for CCS Programs

A Propositional Dynamic Logic for CCS Programs A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

How To Improve Software Quality

How To Improve Software Quality Software Qualities Quality Assurance Maintainer Go Documentation Readable Ce Go Design Functionality Ease of use Ease of learning User Reliability Correctness Efficiency Low Cost Portability Increased

More information

Test Case Generation for Ultimately Periodic Paths Joint work with Saddek Bensalem Hongyang Qu Stavros Tripakis Lenore Zuck Accepted to HVC 2007 How to find the condition to execute a path? (weakest precondition

More information

Introduction to Static Analysis for Assurance

Introduction to Static Analysis for Assurance Introduction to Static Analysis for Assurance John Rushby Computer Science Laboratory SRI International Menlo Park CA USA John Rushby Static Analysis for Assurance: 1 Overview What is static analysis?

More information

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

136 CHAPTER 4. INDUCTION, GRAPHS AND TREES 136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics

More information

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order 26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

More information

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S. Definition 51 Let S be a set bijection f : S S 5 Permutation groups A permutation of S is simply a Lemma 52 Let S be a set (1) Let f and g be two permutations of S Then the composition of f and g is a

More information

Formal Verification Coverage: Computing the Coverage Gap between Temporal Specifications

Formal Verification Coverage: Computing the Coverage Gap between Temporal Specifications Formal Verification Coverage: Computing the Coverage Gap between Temporal Specifications Sayantan Das Prasenjit Basu Ansuman Banerjee Pallab Dasgupta P.P. Chakrabarti Department of Computer Science & Engineering

More information

Verifying Large SDL-Specifications using Model Checking

Verifying Large SDL-Specifications using Model Checking Verifying Large SDL-Specifications using Model Checking Natalia Sidorova 1 and Martin Steffen 2 1 Dept. of Math. and Computer Science, Eindhoven University of Technology, The Netherlands n.sidorova@tue.nl

More information

Automated Theorem Proving - summary of lecture 1

Automated Theorem Proving - summary of lecture 1 Automated Theorem Proving - summary of lecture 1 1 Introduction Automated Theorem Proving (ATP) deals with the development of computer programs that show that some statement is a logical consequence of

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

The Taxman Game. Robert K. Moniot September 5, 2003

The Taxman Game. Robert K. Moniot September 5, 2003 The Taxman Game Robert K. Moniot September 5, 2003 1 Introduction Want to know how to beat the taxman? Legally, that is? Read on, and we will explore this cute little mathematical game. The taxman game

More information

The ProB Animator and Model Checker for B

The ProB Animator and Model Checker for B The ProB Animator and Model Checker for B A Tool Description Michael Leuschel and Michael Butler Department of Electronics and Computer Science University of Southampton Highfield, Southampton, SO17 1BJ,

More information

Formal verification of contracts for synchronous software components using NuSMV

Formal verification of contracts for synchronous software components using NuSMV Formal verification of contracts for synchronous software components using NuSMV Tobias Polzer Lehrstuhl für Informatik 8 Bachelorarbeit 13.05.2014 1 / 19 Problem description and goals Problem description

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

Math 4310 Handout - Quotient Vector Spaces

Math 4310 Handout - Quotient Vector Spaces Math 4310 Handout - Quotient Vector Spaces Dan Collins The textbook defines a subspace of a vector space in Chapter 4, but it avoids ever discussing the notion of a quotient space. This is understandable

More information

An Approach for Generating Concrete Test Cases Utilizing Formal Specifications of Web Applications

An Approach for Generating Concrete Test Cases Utilizing Formal Specifications of Web Applications An Approach for Generating Concrete Test Cases Utilizing Formal Specifications of Web Applications Khusbu Bubna RC Junit concrete test cases suitable for execution on the implementation. The remainder

More information

Software safety - DEF-STAN 00-55

Software safety - DEF-STAN 00-55 Software safety - DEF-STAN 00-55 Where safety is dependent on the safety related software (SRS) fully meeting its requirements, demonstrating safety is equivalent to demonstrating correctness with respect

More information

minimal polyonomial Example

minimal polyonomial Example Minimal Polynomials Definition Let α be an element in GF(p e ). We call the monic polynomial of smallest degree which has coefficients in GF(p) and α as a root, the minimal polyonomial of α. Example: We

More information

The Course. http://www.cse.unsw.edu.au/~cs3153/

The Course. http://www.cse.unsw.edu.au/~cs3153/ The Course http://www.cse.unsw.edu.au/~cs3153/ Lecturers Dr Peter Höfner NICTA L5 building Prof Rob van Glabbeek NICTA L5 building Dr Ralf Huuck NICTA ATP building 2 Plan/Schedule (1) Where and When Tuesday,

More information

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m) Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Math 3000 Section 003 Intro to Abstract Math Homework 2

Math 3000 Section 003 Intro to Abstract Math Homework 2 Math 3000 Section 003 Intro to Abstract Math Homework 2 Department of Mathematical and Statistical Sciences University of Colorado Denver, Spring 2012 Solutions (February 13, 2012) Please note that these

More information

INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

More information

11 Multivariate Polynomials

11 Multivariate Polynomials CS 487: Intro. to Symbolic Computation Winter 2009: M. Giesbrecht Script 11 Page 1 (These lecture notes were prepared and presented by Dan Roche.) 11 Multivariate Polynomials References: MC: Section 16.6

More information

Cosmological Arguments for the Existence of God S. Clarke

Cosmological Arguments for the Existence of God S. Clarke Cosmological Arguments for the Existence of God S. Clarke [Modified Fall 2009] 1. Large class of arguments. Sometimes they get very complex, as in Clarke s argument, but the basic idea is simple. Lets

More information

CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 3 Boolean Algebra and Digital Logic CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4

More information

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)! Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

On strong fairness in UNITY

On strong fairness in UNITY On strong fairness in UNITY H.P.Gumm, D.Zhukov Fachbereich Mathematik und Informatik Philipps Universität Marburg {gumm,shukov}@mathematik.uni-marburg.de Abstract. In [6] Tsay and Bagrodia present a correct

More information

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes) NYS COMMON CORE MATHEMATICS CURRICULUM Lesson 5 8 Student Outcomes Students know the definition of a number raised to a negative exponent. Students simplify and write equivalent expressions that contain

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

This chapter is all about cardinality of sets. At first this looks like a

This chapter is all about cardinality of sets. At first this looks like a CHAPTER Cardinality of Sets This chapter is all about cardinality of sets At first this looks like a very simple concept To find the cardinality of a set, just count its elements If A = { a, b, c, d },

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

Answer Key for California State Standards: Algebra I

Answer Key for California State Standards: Algebra I Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Introduction to Topology

Introduction to Topology Introduction to Topology Tomoo Matsumura November 30, 2010 Contents 1 Topological spaces 3 1.1 Basis of a Topology......................................... 3 1.2 Comparing Topologies.......................................

More information

LS.6 Solution Matrices

LS.6 Solution Matrices LS.6 Solution Matrices In the literature, solutions to linear systems often are expressed using square matrices rather than vectors. You need to get used to the terminology. As before, we state the definitions

More information

THE BANACH CONTRACTION PRINCIPLE. Contents

THE BANACH CONTRACTION PRINCIPLE. Contents THE BANACH CONTRACTION PRINCIPLE ALEX PONIECKI Abstract. This paper will study contractions of metric spaces. To do this, we will mainly use tools from topology. We will give some examples of contractions,

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special

More information

Automata-based Verification - I

Automata-based Verification - I CS3172: Advanced Algorithms Automata-based Verification - I Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2006 Supporting and Background Material Copies of key slides (already

More information

ECON 459 Game Theory. Lecture Notes Auctions. Luca Anderlini Spring 2015

ECON 459 Game Theory. Lecture Notes Auctions. Luca Anderlini Spring 2015 ECON 459 Game Theory Lecture Notes Auctions Luca Anderlini Spring 2015 These notes have been used before. If you can still spot any errors or have any suggestions for improvement, please let me know. 1

More information

Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Lecture Notes on Linear Search

Lecture Notes on Linear Search Lecture Notes on Linear Search 15-122: Principles of Imperative Computation Frank Pfenning Lecture 5 January 29, 2013 1 Introduction One of the fundamental and recurring problems in computer science is

More information

CS311 Lecture: Sequential Circuits

CS311 Lecture: Sequential Circuits CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

Test Case Design Techniques

Test Case Design Techniques Summary of Test Case Design Techniques Brian Nielsen, Arne Skou {bnielsen ask}@cs.auc.dk Development of Test Cases Complete testing is impossible Testing cannot guarantee the absence of faults How to select

More information

Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011. Lecture 1 Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

More information

Find-The-Number. 1 Find-The-Number With Comps

Find-The-Number. 1 Find-The-Number With Comps Find-The-Number 1 Find-The-Number With Comps Consider the following two-person game, which we call Find-The-Number with Comps. Player A (for answerer) has a number x between 1 and 1000. Player Q (for questioner)

More information

5.1 Radical Notation and Rational Exponents

5.1 Radical Notation and Rational Exponents Section 5.1 Radical Notation and Rational Exponents 1 5.1 Radical Notation and Rational Exponents We now review how exponents can be used to describe not only powers (such as 5 2 and 2 3 ), but also roots

More information

Mathematical Induction. Lecture 10-11

Mathematical Induction. Lecture 10-11 Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

A Study on the Necessary Conditions for Odd Perfect Numbers

A Study on the Necessary Conditions for Odd Perfect Numbers A Study on the Necessary Conditions for Odd Perfect Numbers Ben Stevens U63750064 Abstract A collection of all of the known necessary conditions for an odd perfect number to exist, along with brief descriptions

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

Practice with Proofs

Practice with Proofs Practice with Proofs October 6, 2014 Recall the following Definition 0.1. A function f is increasing if for every x, y in the domain of f, x < y = f(x) < f(y) 1. Prove that h(x) = x 3 is increasing, using

More information