Relating Counterexamples to Test Cases in CTL Model Checking Specifications

Size: px
Start display at page:

Download "Relating Counterexamples to Test Cases in CTL Model Checking Specifications"

Transcription

1 Relating Counterexamples to Test Cases in CTL Model Checking Specifications ABSTRACT Duminda Wijesekera Department of Information and Software Engineering, MS 4A4 George Mason University Fairfax, VA , U.S.A Paul Ammann Department of Information and Software Engineering, MS 4A4 George Mason University Fairfax, VA , U.S.A Counterexamples produced by model checkers are frequently exploited for the purpose of testing. Counterexamples and test cases are generally treated as essentially the same thing, while in fact they can differ significantly. For example, it might take more than one test case to cover a given counterexample, because not all property violations can be illustrated with linear counterexamples. This paper presents a formal relationship between counterexamples and test cases in the context of the Computation Tree Logic (CTL), the logic of the popular model checker SMV. Given a test requirement as a CTL formula, we define what it means for a set of test cases to cover a counterexample associated with that requirement. This result can not only be used in the generation of a test set that satisfies a given test coverage criterion, but also in the determination of whether an extant test set satisfies the criterion. Our results can guide the production of counterexamples in model checkers explicitly intended to support testing. This work has been supported in part by the National Institute of Standards and Technology, by a George Mason University Graduate Research Assistant grant, by the National Science Foundation under grants CCR and CCS , by the Austrian Federal Ministry of Economics and Labour, and the competence network Softnet Austria ( Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. A-MOST 07 July 9, 2007, London, UK Copyright 2007 ACM /00/ $5.00. Lingya Sun Department of Information and Software Engineering, MS 4A4 George Mason University Fairfax, VA , U.S.A Gordon Fraser fraser@ist.tugraz.at Institute for Software Technology Graz University of Technology Inffeldgasse 16b/2 A-8010 Graz, Austria Categories and Subject Descriptors D.2.5 [Testing and Debugging]: Testing tools; D.2.4 [Program Verification]: Model checking General Terms Theory, Measurement Keywords Formal methods, model checking, counterexamples, state machines, software testing, test coverage criteria 1. INTRODUCTION Popular model checkers, e.g., SMV and SPIN, produce explicit counterexamples for properties that do not hold in a given model. This feedback directs the analyst s attention to precisely that part of a model where the property fails to hold. Model checkers typically present counterexamples as path information that explains how to reach an offending state from some initial state. Counterexamples can be interpreted as test cases. There are several efforts in the testing community that use a model checker to generate test sets that satisfy a variety of specification based test coverage criteria [1 5, 13, 14, 19, 21, 22]. There are related approaches to decide whether an extant test set satisfies some given test coverage criterion [1,3,21]. All of these efforts assume that a counterexample and a test case are essentially the same thing. This, however, is not necessarily the case. There are many types of properties where violation cannot be demonstrated with a linear counterexample, but only with more complex structures. When creating test cases with a model checker, test requirements are expressed as properties. Consequently, such properties can also require nonlinear counterexamples. For example, even though the test requirements of the modified condition/decision coverage criterion [6] (MC/DC) can be expressed as CTL [8] properties, linear counterexamples are not sufficient to create according test cases, because

2 MC/DC requires pairs of related test cases. In the example of MC/DC there are several approaches of how to work around this problem. For example, weaker versions of the criterion are defined [21], or the model is altered so that linear counterexamples can be used [20]. Rather than taking such an approach that depends on the used criterion, we revisit the idea of how to relate test cases to counterexamples. In general, we would like to get as many test cases from a counterexample as are demanded by the underlying test criterion. The contribution of this paper is to explain the relationship between test cases and counterexamples in the context of the Computation Tree Logic [8] (CTL), the temporal logic used in the model checker SMV [15]. The results of this paper serve as a more solid foundation for efforts to generate test cases with model checkers. Furthermore, the paper suggests how the model checking community can better serve the needs of the testing community. In detail, the contributions of the paper are as follows: The notion of evidence graphs is introduced, which are finite parts of computational trees that show why a temporal formula holds. The concept of evidence graphs is analyzed with regard to soundness, (non)linearity and finiteness. We define what it means for a set of test cases to cover an evidence graph, and how to derive test cases for a given evidence graph. To illustrate the concepts, several well-known coverage criteria are defined using CTL, and the resulting evidence graphs are shown. Finally, recognition whether an extant test set satisfies a test criterion is discussed. This paper is organized as follows: First, Section 2 recalls the necessary preliminaries, then Section 3 introduces evidence graphs. Section 4 shows how evidence graphs are used for test case generation. The evaluation of extant test suites with regard to coverage criteria and evidence graphs is discussed in Section 5. Finally, the paper is concluded with a discussion in Section PRELIMINARIES This section describes the necessary preliminaries of computation tree logic (CTL) and Kripke structures, which are used to define the semantics of CTL, and are the common modeling formalism used in the context of model checking. Definition 1 (Kripke Structure). Given a set AP of atomic propositions, a Kripke structure M over AP is a quadruple M = (S, S 0, R, L), where: S is a finite set of states. S 0 S is the set of initial states. R S S is a total transition relation. That is, for every s S there is a s S such that (s, s ) R. L : S 2 AP is the labeling function that maps each state to a set of atomic propositions that hold in this state. Definition 2 (Path). A path π in a Kripke structure (S, S 0, R, L) is a sequence π 0, π 1,..., π n of states such that 0 i < n : (π i, π i+1) R. We use the notation π i for the i th state of π. The temporal logic CTL was introduced by Clarke and Emerson in [8]. It can be viewed as a subset of CTL*, introduced by Emerson and Halpern [12]. CTL* formulas consist of atomic propositions, logical operators, temporal operators (F, G, U, R, X ) and path quantifiers (A, E). CTL is the subset of CTL* obtained by requiring that each temporal operator is immediately preceded by a path quantifier. Consequently, the syntax of CTL can be defined as follows: Definition 3 (CTL Syntax). The BNF definition of CTL formulas is given below, where p AP: := p AX AF AG A 1 U 2 A 1 R 2 EX EF EG E 1 U 2 E 1 R 2 As all temporal operators are preceded by a path quantifier, the semantics of CTL can be expressed by satisfaction relations for state formulas. M, s = denotes a state formula that is satisfied in state s of Kripke structure M. The set of paths that start in state s is denoted as Paths(s). Definition 4 (CTL Semantics). Satisfaction of CTL formulas by a state s S of a Kripke Structure M = (S, S 0, R, L) is inductively defined as follows, where p AP: M, s = p iff p L(s) s S M, s = iff (M, s = ) M, s = 1 2 iff (M, s = 1 ) (M, s = 2) M, s = 1 2 iff (M, s = 1 ) (M, s = 2) M, s = AX iff π Paths(s) : M, π 1 = M, s = AF iff π Paths(s) : i : M, π i = M, s = AG iff π Paths(s) : i : M, π i = M, s = A 1 U 2 iff π Paths(s) : i : j < i : M, π j = 1 j i : M, π j = 2 M, s = A 1 R 2 iff π Paths(s) : i : j < i : M, π j = 1 M, π i = 2 M, s = EX iff π Paths(s) : M, π 1 = M, s = EF iff π Paths(s) : i : M, π i = M, s = EG iff π Paths(s) : i : M, π i = M, s = E 1 U 2 iff π Paths(s) : i : j < i : M, π j = 1 j i : M, π j = 2 M, s = E 1 R 2 iff π Paths(s) : i : j < i : M, π j = 1 M, π i = 2 We restate the definition of a negation normal form, and why every CTL formula can be expressed in negation normal form. The negation normal form will be needed for subsequent definitions. Definition 5 (Negation Normal Form). A CTL formula in which the temporal operators do not appear within the scope of a negation is said to be in negation normal form (NNF).

3 The following lemma is a well known result. Lemma 1 (NNF Exists). Every CTL formula is provably equivalent to a CTL formula in negation normal form. Proof: In the appendix, since the authors are unaware of a published proof. 3. COUNTEREXAMPLES, WITNESSES AND EVIDENCE GRAPHS The model checking problem [10, p. 35] is to find the set of states that satisfy a given formula in a given Kripke structure. That is, given a formula and a Kripke structure M = (S, S 0, R, L), the objective is to determine the set S = {s S : M, s = }. If the initial state set S 0 is included in this set, then the Kripke structure satisfies the formula. If a state that violates is found, then a model-checker usually returns a counterexample. Current model-checkers return linear traces as counterexamples. In the case of LTL [18] model-checking, such a trace is a path that violates the formula, and in the case of CTL the trace leads from the initial state to the state that violates. Strictly speaking, a state formula is violated in a state. Consequently, we define counterexamples and witnesses as follows: Definition 6 (Counterexamples and Witnesses). Let M = (S, S 0, R, L) be a Kripke structure and a CTL formula. A state s S is said to be: A counterexample for in M if M, s =. A witness for in M if M, s =. According to Definition 6, s S is a counterexample for a formula if and only if state s is a witness for. Thus, a solution to the model checking problem for the formula in M finds all witnesses for in M and a solution to the model checking problem for in M finds all counterexamples for in M. By definition, any solution to the model checking problem for / only finds the set of states in which is true or false, but without demonstrating any evidence for the claim. Current model-checkers calculate single linear counterexamples as evidence. In explicit model checking, the search path that leads to a violating state is returned as a counterexample. In symbolic model checking, special algorithms are applied to construct linear traces from the initial state to the violating state [9]. In general, only certain restricted subsets of temporal logics such as ACTL det or LIN always result in linear counterexamples [7]. When using full CTL, linear counterexamples are not always sufficient as evidence for property violation or satisfaction. We define the evidence as the collection of all paths that support the validity of a given formula. For example, consider the formula = EF p, where p AP is an atomic proposition. Suppose that holds in some states of the Kripke structure M. Then, the witness set to EF p in M is S = {s S : M, s = EF p}, according to Definition 6. The evidence of is the collection of paths π = π 0,... π n such that π 0 S and M, π n = p. These paths provide all information necessary to support the validity of the given formula (in this case EF p). Our notion of an evidence graph is defined to formally capture the states and accessibility relations among these states necessary to substantiate the evidence for a state in a Kripke structure to be a witness to a CTL formula. A Kripke structure can be interpreted as a rooted directed graph G M = (S, R). The vertices of this graph are labeled by L. Informally, an evidence graph is a subgraph of G M that contains all information necessary as evidence for a given property. For example, if the formula is of the form ψ = AG AX, then the evidence graph is the subgraph G of G M consisting of all paths of length two starting from every state in S ψ = {s S : M, s = AG AX }. Note that M, π 1 = for any path π where π 0 S ψ. For two graphs G 1 = (S 1, R 1) and G 2 = (S 2, R 2) we use G 1 G 2 as a shorthand for S 1 S 2 R 1 R 2. The set of paths that start in state s denoted as Paths(s) always refers to the paths of the Kripke structure M. Definition 7 (Evidence Graph). The evidence graph of a CTL formula given in negation normal form and Kripke structure M = (S, S 0, R, L) is a rooted directed graph G = (S, R ), where S S, R R, and vertices are labeled by L. The root node of the evidence graph is referred to as the head (notation Head(G)). The set of all evidence graphs for in M is denoted as EVD(, M). G is inductively defined on the structure of : 1. For any CTL formula without temporal operators, EVD(, M) is the collection of single state subgraphs obtained from the set of states {s S : M, s = } of M. For any such single state subgraph G EVD(, M) we define the head of G, Head(G) to be the only state in G. 2. An evidence graph G of the formula 1 2, where 1 or 2 contains logical operators, satisfies the following properties: M, Head(G) = 1 2. Head(G) = Head(t) = Head(t ) for evidence graphs t EVD( 1, M) and t EVD( 2, M). t, t G. 3. An evidence graph G of the formula 1 2, where 1 or 2 contains logical operators, satisfies the following properties: M, Head(G) = 1 2. Head(G) = Head(t) for evidence graph t EVD( 1, M) or t EVD( 2, M). t G. 4. An evidence graph G of the formula AX satisfies the M, Head(G) = AX. For all paths π = π 0, π 1 Paths(Head(G)) of length 2: π 1 = Head(t) for some evidence graph t G, and t EVD(, M). 5. An evidence graph G of the formula AF satisfies the

4 M, Head(G) = AF. All paths π = π 0,..., π n Paths(Head(G)) satisfy the π G. There is a state π i on π such that π i = Head(t i) for some evidence graph t i EVD(, M), where t G. 6. An evidence graph G of the formula AG satisfies the M, Head(G) = AG. All paths π Paths(Head(G)) satisfy the following properties: π G. Every state state π i of π is Head(t i) for some t i EVD(, M) and t i G. 7. An evidence graph G of the formula A 1 U 2 satisfies the M, Head(G) = A 1 U 2. π Paths(Head(G)) : π G. There is a state π j on π satisfying the following properties: For all i < j, π i is Head(t i) for some t i EVD( 1, M) with t i G. For all i j, π i is Head(t i) for some t i EVD( 2, M) with t i G. 8. An evidence graph G of the formula A 1 R 2 satisfies the M, Head(G) = A 1 R 2. π Paths(Head(G)) : π G. In addition, one of the following conditions must hold: There is a state π j on π such that for all i < j π i is Head(t i) for some t i EVD( 1, M) and t i G, and for all i j, π i is Head(t i) for some t i EVD( 2, M) and t G, or For all states π i, π i = Head(t i) for some evidence graph t i EVD( 2, M) with t i G. 9. An evidence graph G of the formula EX satisfies the M, Head(G) = EX. There is a path π = π 0, π 1 Paths(Head(G)), such that π 1 = Head(t) for some evidence graph t G, and t EVD(, M). In addition π G. 10. An evidence graph G of the formula EF satisfies the M, Head(G) = EF. There is a path π Paths(Head(G)) and state π i on π, such that π i is Head(t) for some evidence graph t EVD(, M), and t G. In addition π G. 11. An evidence graph G of the formula EG satisfies the M, Head(G) = EG. There is a path π Paths(Head(G)) such that π G. Every state state π i of π is Head(t i) for some t i EVD(, M) with t i G. 12. An evidence graph G of the formula E 1 U 2 satisfies the M, Head(G) = E 1 U 2. There is a path π Paths(Head(G)), π G, and a state π j on π satisfying the For all i < j, π i is Head(t i) for some t i EVD( 1, M) with t i G. For all i j, π i is Head(t i) for some t i EVD( 2, M) with t i G. 13. An evidence graph G of the formula E 1 R 2 satisfies the M, Head(G) = E 1 R 2. There is a path π Paths(Head(G)), π G, where one of the following conditions holds: There is a state π j on π such that (1) For all i < j, π i is Head(t i) for some t i EVD( 1, M) and t i G, and (2) For all i j π i is Head(t) for some t EVD( 2, M) with t G, or For all states π i, π i = Head(t i) for some evidence graph t i EVD( 2, M) with t i G. Figure 1 shows example evidence graphs for all basic CTL operators. In the graphs, filled vertices denote states of interest, for example, where 1 or 2 hold, and white vertices are arbitrary states, where the propositions of interest do not hold. The following theorem shows that every witness to a CTL formula is at the head of an evidence graph, and vice-versa. Therefore, in order to find a counterexample to a CTL formula, we need to convert to its negation normal form and find an evidence graph for the negation normal form of. Theorem 1. A CTL formula is satisfiable in a state s S of the Kripke structure M = (S, S 0, R, L) if and only if there is an evidence graph t EVD(, M) such that s = Head(t).

5 2, , 1 2, 1 AX AF AG A 1 U 2 A 1 R 2 2 2, EX EF EG E 1 U 2 E 1 R 2 Figure 1: Evidence graphs for CTL connectives. Proof: See the Appendix. According to Theorem 1, if there is a counterexample to a CTL formula, then the evidence graph of (i.e., any graph G EVD(, M)) provides the evidence supporting the failure of. Test cases are usually finite and linear, while there is no guarantee that evidence graphs are either linear or finite. In order to relate evidence graphs and counterexamples we now address these two issues. 3.1 Non-linearity of Evidence Graphs Although evidence graphs can be linear, it is not always possible to obtain linear evidence graphs. For example, consider the formula (EX ) (EX ). Any state s in a Kripke structure M that satisfies (EX ) (EX ) must have two states s 1 and s 2 such that the following conditions hold: (s, s 1) R and (s, s 2) R. M, s 1 = and M, s 2 =, so that M, s = (EX ) (EX ). s 1 and s 2 cannot be the same state as M, s 1 = and M, s 2 =. Figure 2 shows the evidence graph of (EX ) (EX ). Similarly, AF may result in branching as shown in Figure 3. Because any evidence graph of a simple formula such as (EX ) (EX ) is non-linear, there is no hope of describing counterexamples solely as linear paths. Instead we seek to relate counterexamples with paths that provide coverage. Figure 2: Evidence graph for (EX ) (EX ). The following theorem states sufficient, but not necessary conditions for an evidence graph to be linear. Theorem 2 (Linear Evidence Graphs). If a negation normal form of a CTL formula has no,a or G then it has a linear evidence graph. Figure 3: A non-linear evidence graph for AF. Proof: See the Appendix. 3.2 Finiteness of Paths in Evidence Graphs The second issue that we address is of the finiteness of paths that we submit as evidence of witnesses. We use the following Lemma 2 (which is an adaptation of a Lemma from Clarke et al. [10]) to address this issue. Lemma 2. Suppose π is a path in a Kripke structure M and a CTL formula satisfying the condition that M, π i = for any state π i on π. Then, there are finite paths α and β such that π is α : β ω. Proof: See the Appendix. Note that β can be an empty sequence. When presenting an evidence graph for a formula, we can eliminate potentially infinite paths by curtailing them after the first cycle. Therefore, using the above Lemma, we can obtain the following theorem. Theorem 3 (Every infinite path ends in a loop). Every evidence graph G EVD(, M) of a CTL formula contains an evidence graph G for the same formula such that: (1) Head(G) = Head(G ), and (2) every path in Head(G ) is the concatenation of two parts, a finite branch, and a finite cycle - in that order. Proof: See the Appendix. Therefore, every evidence graph can be curtailed to one that has only finitely long paths or infinite paths that are the

6 concatenation of a finite part and a finite cycle. This kind of infinite paths is for example considered by Tan et al [16], who also discuss the curtailing. Hence, given a CTL formula any counterexample to that formula in any given Kripke structure can and must be given by an evidence graph that has paths that end up in cycles. With these basic facts in place, we move to relating test cases to counterexamples. 4. RELATING TEST COVERAGE TO COV- ERING EVIDENCE GRAPHS This section considers the issue of test coverage. A test coverage criterion is a rule that, when applied to a suitable artifact, generates a set of test requirements. A test requirement states a property demanded of one or more test cases. In this work, we assume that test requirements are expressed in CTL. This is a common method to create test cases with a model checker (e.g., [14,21]). It is common to formulate CTL properties in a negated way, such that checking a model against a test requirement results in a counterexample that can be used to cover the requirement. For example, test requirements might require that all states or transitions of a model are covered. This would result in a CTL property for each state or transition, respectively, stating that the state or transition is not reached. This idea of test case generation basically also applies to evidence graphs. Every counterexample to a CTL formula can be witnessed by the evidence graph of the negation normal form of its negation. Any set of paths covering an evidence graph of satisfies the test requirement. Definition 8 (Coverage of Evidence Graphs:). A set of paths Π is said to cover the evidence graph G of the CTL formula, if the following conditions are satisfied: 1. π 0 = Head(G ) for all paths π Π. 2. G Π. Here, Π denotes the graph obtained by combining the paths in Π. Consequently, the following steps are taken in order to generate a test suite (i.e., set of test cases) satisfying a given coverage criterion: 1. A set of test requirements is generated in CTL. 2. For each test requirement, the negation normal form of the negation is model checked, resulting in an evidence graph. 3. For each test requirement, a set of test cases that covers an according evidence graph is created. 4. The test-cases possibly need a prefix that leads from the initial state to the head of the evidence graph. Such a prefix can be calculated using traditional counterexample generation techniques. 4.1 MC/DC Coverage We now illustrate this approach using the well known test coverage criterion modified condition/decision coverage [6] (MC/DC), which is popular in safety relevant environments. A test suite satisfies MC/DC if it guarantees that: Every entry and exit point of a program has been invoked at least once. Every condition in a decision in the program has taken on all possible outcomes at least once. Each condition has been shown to independently affect the decision. The final requirement is problematic for model checker based testing. In order to show that each condition independently affects the decision, the values of all other conditions are fixed, and the considered condition is varied. Consequently, each condition requires a pair of test cases, but traditionally there is no way to create pairs of counterexamples with a model checker. Rayadurgam and Heimdahl [21] define a weaker variant of MC/DC (clause-wise guard coverage). A different approach is taken in [20], where the model is altered so that one linear counterexample can be split into two test cases. It is possible to create pairs of test cases for MC/DC using evidence graphs. Suppose that a decision C depends on propositions {a 1,..., a n}. MC/DC seeks only those variations of parameters {a 1,..., a n} that alter the truth value of C. Let A i = {b 1,..., b n} be a valuation of the propositions in C such that C is true if a i = b i for all a i in C. Assume a further valuation Āi, such that C is false, where for all j i the j-th value in A i equals the j-th value in Āi, and bi in A i is replaced with b i in Āi. To show that a proposition a i independently affects a decision C it is necessary to create a pair of test-cases, such that in one test-case C evaluates to true using A i and in the other to false using Āi; that is, all values in Ai except bi are identical in both test-cases. Assuming a valid A i, such that there is an according Ā i, the first case is achieved with 1 = EF (C( V j i aj = b j) a i = b i), and the second case is achieved with 2 = EF ( C ( V j i aj = bj) (ai = bi)). Here, the values b i are those contained in A i. Consequently, a pair of testcases that shows that a proposition independently affect the decision C is represented by the evidence graph of 1 2: EF (C (^ a j = b j) a i = b i) j i EF ( C (^ a j = b j) a i b i) j i Not all possible variations of A i can lead to MC/DC pairs. A naive solution to finding a suitable A i is to simply create all 2 n possible variations of the n elements in A i, and then create a disjunction of ( 1 2) for each version A i. A more sophisticated approach is to use Boolean constraint satisfaction to determine those A i where a i really determines the value of C, and then combining only these A i in a disjunction. In order to illustrate this, consider an example where the decision C is given as C := x (y z). When considering the proposition x in this example, there are three different valid variations of A i such that MC/DC pairs of test cases for x in C are generated. MC/DC for x can be stated as

7 x y z x y z x y z x y z x y z x y z Figure 4: Three different possible evidence graphs for MC/DC with regard to x in C = x (y z). follows: EF (C x y z) EF ( C x y z) EF (C x y z) EF ( C x y z) EF (C x y z) EF ( C x y z) Figure 4 illustrates evidence graphs resulting from this example. Any of these evidence graphs provides a pair of test cases that cover x in C according to MC/DC. In order to create a complete test suite, similar test requirements have to be formulated for all propositions in all decisions. 4.2 Using Evidence Graphs to Test Dangerous Traces As a further example of test requirements that benefit from evidence graphs, we discuss a coverage criterion introduced by Ammann et al. [3], which encompasses the idea of scenarios where a dangerous action is either inevitable or possible as of the next state or at some point in the future. Test requirements are defined in order to create dangerous traces with regard to safety properties. A trace is dangerous to a safety property, if it can lead to a property violation on a mutant model. The approach taken by Ammann et al. is to combine a model M and a mutant M, such that transitions from both versions of the model can be taken. A special variable original (which we will abbreviate as orig) indicates whether the taken transition originates from M or M. Different types of dangerous traces are distinguished: A trace is AX dangerous, if the additional transitions allowed by the mutant M violate a property P in all next states. A trace is EX dangerous, if there exists an additional transition allowed by the mutant M which violates a property P in the next state. A trace is AF dangerous, if it can be extended with the next state from M and other transitions from the combined model so that in all futures there is a violation of P. A trace is EF dangerous, if it can be extended with the next state from M and other transitions from the combined model so that in some futures there is a violation of P. For each dangerous trace there are two versions: a failing and a passing test. In a failing test, the dangerous trace is extended with transitions from M, so that P is violated. In a passing test, the dangerous trace is extended with a single transition from M. For example, test requirements for AX dangerous traces for property P are defined in [3] as follows. A test requirement for a failing test is: EF (orig EX ( orig) AX ( orig P)) The following test requirement results in a passing test: EF (orig EX (orig) EX ( orig) AX ( orig P)) The test requirement for the passing test relies on the implementation of the model checker to pick the correct trace such that transitions from M are chosen. However, also transitions from M would result in valid counterexamples to the property, while not representing a valid passing test case. Dangerous traces can benefit from the use of evidence graphs. The following property is sufficient to create an evidence graph that consists of both, a passing test and a failing test: (orig AX ( orig P)) AX (orig P)) A resulting evidence graph is depicted in Figure 5. orig orig P orig P Figure 5: An AX dangerous evidence graph for property P. Similar properties can be defined for the other types of dangerous traces: AF dangerous traces: (orig EX (orig) AX ( orig AF ( P))) EX dangerous traces: (orig EX (orig) EX ( orig P)) EF dangerous traces (see Figure 6): (orig EX (orig) EX ( orig EF ( P))) orig orig orig P Figure 6: An EF dangerous evidence graph for property P.

8 5. EVALUATION OF EXTANT TEST SETS In prior work [2], model checkers were suggested for the analysis of extant test suites in addition to generation of test cases. Existing test cases were analyzed by turning each test case into a separate, constrained state machine that followed the transitions in the test case one for one and allowed no other behavior. Model checking each of these machines against the entire set of test requirements and taking the union of the satisfied requirements cumulatively yields the test coverage for the original test set. This is an important task from a practical perspective, since test sets can arise from many different activities and typically represent a significant investment of resources. For example, a developer may want to analyze use cases built during the requirements phase for test coverage with respect to some criterion. Representing each test case as a model and checking it against test requirements does not work if multiple test cases are needed for a single test requirement; only one test case can be analyzed at a time. The solution is to build a single machine that includes all of the test cases. That is, we prune the original state machine so that only those states visited and those transitions followed by some test case in the extant test set are allowed. Model checking this pruned state machine identifies those test requirements that are not satisfiable on the pruned machine, but are satisfiable on the original machine. It is exactly these test requirements that, although feasible, are not covered by the extant test set. In this way, model checking can answer the coverage question. This can be formally characterized as the following adequacy requirement. Definition 9 (Structure Induced by Test Cases). Given a Kripke structure M = (S, S 0, R, L) and a set of test cases Π, we say that M Π = (S Π, S 0,Π, R Π, L Π) is the Kripke structure induced by the set of test cases Π, such that: S Π S, such that s S Π : π Π : π =..., s,... R Π R and R Π S Π S Π L Π L and L Π : S Π 2 AP For example, assume a set of test requirements F, given as CTL formulas. We say that a test set Π consisting of paths of a Kripke model M provides adequate coverage for the test requirements F, if for each CTL formula F, there is a state s S Π such that M Π, s =. Consequently, the following result holds: Theorem 4 (Adequacy). A test set Π consisting of paths of a Kripke model M provides adequate coverage for test requirements F for each CTL formula F if and only for each F there is an evidence graph G EVD(, M) such that ( S G F ) (SΠ, RΠ). Notice that according to Theorem 1 a formula is valid if and only if it has an evidence graph. Hence model checking in the reduced structure M Π is equivalent to searching for an evidence graph. 6. CONCLUSIONS In this paper, we have discussed why a one to one relationship between test cases and counterexamples is not satisfactory with respect to some test criteria. The issue is that the temporal formulas needed to directly express the test requirements associated with some criteria result in counterexamples that require multiple traces for adequate coverage. We provided the notion of an evidence graph for a temporal formula, as well as mappings from traces, i.e., test cases, to evidence graphs. It turns out that the operators, A and G are responsible for cases where multiple traces are needed. We show that finitely many finite traces can cover any evidence graph. We also describe how to embed test cases in a finite state model so that extant test sets can be evaluated for satisfaction of a given test criterion. These results not only serve the testing community with a more solid foundation for generating test sets with model checkers, but they also suggest to the model checking community how counterexample generators could be made more useful. In the context of counterexample creation, the issue that not all property violations can be illustrated with linear traces has recently received increased attention. For example, Clarke et al. [11] describe an algorithm to derive tree-like counterexamples for ACTL formulas (CTL formulas that only contain the A path quantifier). For this subset, a tree-like counterexample can be interpreted as an evidence graph together with a path leading from an initial state to the head of the graph. Meolic et al. [17] take a different approach and derive counterexample or witness automata for a fragment of action computation tree logic. 7. REFERENCES [1] A. Abdurazik, P. Ammann, W. Ding, and J. Offutt. Evaluation of three specification-based coverage testing criteria. In Proceedings ICECCS 2000: 6th IEEE International Conference on Engineering of Complex Computer Systems, pages , Tokyo, Japan, September [2] P. Ammann and P. E. Black. A Specification-Based Coverage Metric to Evaluate Test Sets. In Proceedings of the 4th IEEE International Symposium on High-Assurance Systems Engineering (HASE 99), pages , Washington, DC, USA, IEEE Computer Society. [3] P. Ammann, W. Ding, and D. Xu. Using a Model Checker to Test Safety Properties. In Proceedings of the 7th International Conference on Engineering of Complex Computer Systems (ICECCS 2001), pages , Skovde, Sweden, IEEE. [4] P. E. Ammann, P. E. Black, and W. Majurski. Using Model Checking to Generate Tests from Specifications. In Proceedings of the Second IEEE International Conference on Formal Engineering Methods (ICFEM 98), pages IEEE Computer Society, [5] J. Callahan, F. Schneider, and S. Easterbrook. Automated Software Testing Using Model-Checking. In Proceedings 1996 SPIN Workshop, August Also WVU Technical Report NASA-IVV [6] J. J. Chilenski and S. P. Miller. Applicability of modified condition/decision coverage to software testing. Software Engineering Journal, pages , September [7] E. Clarke and H. Veith. Counterexamples revisited: Principles, algorithms, applications. In Verification: Theory and Practice, volume 2772 of Lecture Notes in Computer Science, pages , 2004.

9 [8] E. M. Clarke and E. A. Emerson. Design and synthesis of synchronization skeletons using branching-time temporal logic. In Logic of Programs, Workshop, pages 52 71, London, UK, Springer-Verlag. [9] E. M. Clarke, O. Grumberg, K. L. McMillan, and X. Zhao. Efficient generation of counterexamples and witnesses in symbolic model checking. In Proceedings of the 32st Conference on Design Automation (DAC), pages ACM Press, [10] E. M. Clarke, O. Grumberg, and D. A. Peled. Model Checking. MIT Press, Cambridge, MA., 1 edition, rd printing. [11] E. M. Clarke, S. Jha, Y. Lu, and H. Veith. Tree-like counterexamples in model checking. In LICS 02: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science, pages 19 29, Washington, DC, USA, IEEE Computer Society. [12] E. A. Emerson and J. Y. Halpern. Decision procedures and expressiveness in the temporal logic of branching time. In STOC 82: Proceedings of the fourteenth annual ACM symposium on Theory of computing, pages , New York, USA, ACM Press. [13] A. Engels, L. Feijs, and S. Mauw. Test generation for intelligent networks using model checking. In E. Brinksma, editor, Proceedings of the Third International Workshop on Tools and Algorithms for the Construction and Analysis of Systems. (TACAS 97), volume 1217 of Lecture Notes in Computer Science, Enschede, the Netherlands, April Springer-Verlag. [14] A. Gargantini and C. Heitmeyer. Using Model Checking to Generate Tests From Requirements Specifications. In ESEC/FSE 99: 7th European Software Engineering Conference, Held Jointly with the 7th ACM SIGSOFT Symposium on the Foundations of Software Engineering, volume 1687, pages Springer, September [15] K.L. McMillan. The SMV system. Technical Report CMU-CS , Carnegie-Mellon University, [16] I. L. Li Tan, Oleg Sokolsky. Specification-based testing with linear temporal logic. In Proceedings of IEEE International Conference on Information Reuse and Integration (IRI 04), pages , [17] R. Meolic, A. Fantechi, and S. Gnesi. Witness and counterexample automata for actl. In Formal Techniques for Networked and Distributed Systems - FORTE 2004, volume 3235 of Lecture Notes in Computer Science, pages , [18] A. Pnueli. The temporal logic of programs. In 18th Annual Symposium on Foundations of Computer Science, 31 October-2 November, Providence, Rhode Island, USA, pages IEEE, [19] C. Ramakrishnan and R. Sekar. Model-based vulnerability analysis of computer systems. In Proceedings of the 2nd International Workshop on Verification, Model Checking and Abstract Interpretation, September [20] S. Rayadurgam and M. P. Heimdahl. Generating MC/DC Adequate Test Sequences Through Model Checking. In Proceedings of the 28th Annual NASA Goddard Software Engineering Workshop, pages 91 96, [21] S. Rayadurgam and M. P. E. Heimdahl. Coverage Based Test-Case Generation Using Model Checkers. In Proceedings of the 8th Annual IEEE International Conference and Workshop on the Engineering of Computer Based Systems (ECBS 2001), pages 83 91, Washington, DC, April IEEE Computer Society. [22] R. W. Ritchey and P. Ammann. Using model checking to analyze network vulnerabilities. In Proceedings of the 2000 IEEE Symposium on Security and Privacy (Oakland 2000), pages , May APPENDIX A. APPENDIX: PROOFS OF THEOREMS Proof of Lemma 1 The following identities can be used to push the negation ( ) inside the scope of temporal operators of any given CTL formula: EX AX EF AG EG F AF EU 2 A( R 2) ER 2 A( U 2) AX EX AF EG AG F EF AU 2 E( 2U ( 2)) EG 2 AR 2 E( U 2) The truth of the above equivalences is shown in Clarke et al. [10]. These taken together with the distributivity of negation ( ) over conjunction ( ) and disjunction ( ) can be used to recursively show that every CTL formula is equivalent to one in negation normal form. Proof of Theorem 1 This proof is an inductive argument based on the syntax of the negation normal form of the formula. Due to the repetitive nature of the proof, we only provide one case. Suppose the given formula is EF, and there is a state s S of the Kripke Structure M = (S, S 0, R, L) where M, s, = EF. Then there is a path π S satisfying the following properties. 1. s is π There is some state π i on π such that M, π i =. Therefore by the inductive assumption, there is an evidence graph G EVD(, M) where π i is Head(G ). Hence, the following graph G now is an evidence graph for EF. 1. The states of G are the states of G and the states on π. 2. The accessibility relation of is the restriction of R to the states of G. 3. The head of G (i.e. Head(G)) is s.

10 Conversely, suppose that there is an evidence graph G EF EVD(EF, M) such that s is Head(G EF ). Then, by definition, M, s, = EF. Proof Sketch of Theorem 2 This proof is a consequence of Definition 7. Notice that in the recursive procedure for constructing an evidence graph, a branching is possible only when there is room for Head(G) to be connected to more than one other state. These are for the connectives, AF, AG and EG. Proof Sketch of Lemma 2 The proof of this lemma is contained in the proof of Lemma 1, page 36 of Clarke et al. [10]. It is based on the fact that there are finitely many strongly connected components (in the sense of graphs) of states, and the last such component the path goes into, does not come out of it and hence constitute β. The finite path α is the path from state π i to the beginning state on β. Proof Sketch of Theorem 3 The essence of this proof uses Lemma 2, where any search for an infinite path π on which a formula must be true can be curtailed to α; β where both α and β are finite, β = β 0,... β n satisfies β 0 = β n (i.e. β is a cycle). This curtailing of repetitive cycles can be done in case of the recursive steps for EG, EU, ER, AG, AU and AR in the construction of evidence graph.

Testing with model checkers: A survey

Testing with model checkers: A survey COMPETENCE NETWORK SOFTNET AUSTRIA Testing with model checkers: A survey SNA-TR-2007-P2-04 Gordon Fraser, Franz Wotawa, Paul E. Ammann SNA TECHNICAL REPORT NOVEMBER 2007 Competence Network Softnet Austria,

More information

Model Checking. Temporal Logic. Fifth International Symposium in Programming, volume. of concurrent systems in CESAR. In Proceedings of the

Model Checking. Temporal Logic. Fifth International Symposium in Programming, volume. of concurrent systems in CESAR. In Proceedings of the Sérgio Campos, Edmund Why? Advantages: No proofs Fast Counter-examples No problem with partial specifications can easily express many concurrency properties Main Disadvantage: State Explosion Problem Too

More information

Model checking the basic modalities of CTL with Description Logic

Model checking the basic modalities of CTL with Description Logic Model checking the basic modalities of CTL with Description Logic Shoham Ben-David Richard Trefler Grant Weddell David R. Cheriton School of Computer Science University of Waterloo Abstract. Model checking

More information

Model for reactive systems/software

Model for reactive systems/software Temporal Logics CS 5219 Abhik Roychoudhury National University of Singapore The big picture Software/ Sys. to be built (Dream) Properties to Satisfy (caution) Today s lecture System Model (Rough Idea)

More information

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct. EE 244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016 Temporal logic Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 244, Fall 2016

More information

Creating Test-Cases Incrementally with Model-Checkers

Creating Test-Cases Incrementally with Model-Checkers Creating Test-Cases Incrementally with Model-Checkers Gordon Fraser and Franz Wotawa Institute for Software Technology Graz University of Technology Inffeldgasse16b/2 A-8010 Graz,Austria { fraser,wotawa}

More information

Linear Temporal Logic and Büchi Automata

Linear Temporal Logic and Büchi Automata Linear Temporal Logic and Büchi Automata Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 Yih-Kuen Tsay (SVVRL @ IM.NTU) Linear Temporal Logic and Büchi Automata

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

More information

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Computation Tree Logic (CTL) & Basic Model Checking Algorithms Computation Tree Logic (CTL) & Basic Model Checking Algorithms Martin Fränzle Carl von Ossietzky Universität Dpt. of Computing Science Res. Grp. Hybride Systeme Oldenburg, Germany 02917: CTL & Model Checking

More information

MODEL CHECKING. Arie Gurfinkel

MODEL CHECKING. Arie Gurfinkel 1 MODEL CHECKING Arie Gurfinkel 2 Overview Kripke structures as models of computation CTL, LTL and property patterns CTL model-checking and counterexample generation State of the Art Model-Checkers 3 SW/HW

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Overview. overview / 357

Overview. overview / 357 Overview overview6.1 Introduction Modelling parallel systems Linear Time Properties Regular Properties Linear Temporal Logic (LTL) Computation Tree Logic syntax and semantics of CTL expressiveness of CTL

More information

Computation Tree Logic

Computation Tree Logic Chapter 6 Computation Tree Logic Pnueli [88] has introduced linear temporal logic to the computer science community for the specification and verification of reactive systems. In Chapter 3 we have treated

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Coverage Metrics for Requirements-Based Testing

Coverage Metrics for Requirements-Based Testing Coverage Metrics for Requirements-Based Testing ABSTRACT Michael W. Whalen Advanced Technology Center Rockwell Collins Inc. mwwhalen@rockwellcollins.com Mats P.E. Heimdahl Dept. of Comp. Sci. and Eng.

More information

CS357: CTL Model Checking (two lectures worth) David Dill

CS357: CTL Model Checking (two lectures worth) David Dill CS357: CTL Model Checking (two lectures worth) David Dill 1 CTL CTL = Computation Tree Logic It is a propositional temporal logic temporal logic extended to properties of events over time. CTL is a branching

More information

Model Checking with CTL. Presented by Jason Simas

Model Checking with CTL. Presented by Jason Simas Model Checking with CTL Presented by Jason Simas Model Checking with CTL Based Upon: Logic in Computer Science. Huth and Ryan. 2000. (148-215) Model Checking. Clarke, Grumberg and Peled. 1999. (1-26) Content

More information

First-order resolution for CTL

First-order resolution for CTL First-order resolution for Lan Zhang, Ullrich Hustadt and Clare Dixon Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK {Lan.Zhang, U.Hustadt, CLDixon}@liverpool.ac.uk Abstract

More information

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either Introduction to Temporal Logic The purpose of temporal logics is to specify properties of dynamic systems. These can be either Desired properites. Often liveness properties like In every infinite run action

More information

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège Temporal logics and explicit-state model checking Pierre Wolper Université de Liège 1 Topics to be covered Introducing explicit-state model checking Finite automata on infinite words Temporal Logics and

More information

Computation Tree Logic

Computation Tree Logic Computation Tree Logic Hao Zheng Department of Computer Science and Engineering University of South Florida Tampa, FL 33620 Email: zheng@cse.usf.edu Phone: (813)974-4757 Fax: (813)974-5456 Hao Zheng (CSE,

More information

3-Valued Abstraction-Refinement

3-Valued Abstraction-Refinement 3-Valued Abstraction-Refinement Sharon Shoham Academic College of Tel-Aviv Yaffo 1 Model Checking An efficient procedure that receives: A finite-state model describing a system A temporal logic formula

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

Double Header. Model Checking. Model Checking. Overarching Plan. Take-Home Message. Spoiler Space. Topic: (Generic) Model Checking

Double Header. Model Checking. Model Checking. Overarching Plan. Take-Home Message. Spoiler Space. Topic: (Generic) Model Checking Double Header Model Checking #1 Two Lectures Model Checking SoftwareModel Checking SLAM and BLAST Flying Boxes It is traditional to describe this stuff (especially SLAM and BLAST) with high-gloss animation

More information

Software Verification using Predicate Abstraction and Iterative Refinement: Part 1

Software Verification using Predicate Abstraction and Iterative Refinement: Part 1 using Predicate Abstraction and Iterative Refinement: Part 1 15-414 Bug Catching: Automated Program Verification and Testing Sagar Chaki November 28, 2011 Outline Overview of Model Checking Creating Models

More information

Model Checking. Boris Feigin March 9, University College London

Model Checking. Boris Feigin March 9, University College London b.feigin@cs.ucl.ac.uk University College London March 9, 2005 Outline 1 2 Techniques Symbolic 3 Software 4 Vs. Deductive Verification Summary Further Reading In a nutshell... Model checking is a collection

More information

Temporal Logic Model Checking

Temporal Logic Model Checking 18 Feb, 2009 Thomas Wahl, Oxford University Temporal Logic Model Checking 1 Temporal Logic Model Checking Thomas Wahl Computing Laboratory, Oxford University 18 Feb, 2009 Thomas Wahl, Oxford University

More information

Verification Using Temporal Logic

Verification Using Temporal Logic CMSC 630 February 25, 2015 1 Verification Using Temporal Logic Sources: E.M. Clarke, O. Grumberg and D. Peled. Model Checking. MIT Press, Cambridge, 2000. E.A. Emerson. Temporal and Modal Logic. Chapter

More information

CDS 270 (Fall 09) - Lecture Notes for Assignment 8.

CDS 270 (Fall 09) - Lecture Notes for Assignment 8. CDS 270 (Fall 09) - Lecture Notes for Assignment 8. ecause this part of the course has no slides or textbook, we will provide lecture supplements that include, hopefully, enough discussion to complete

More information

Lecture Notes on Model Checking

Lecture Notes on Model Checking Lecture Notes on Model Checking 15-816: Modal Logic André Platzer Lecture 18 March 30, 2010 1 Introduction to This Lecture In this course, we have seen several modal logics and proof calculi to justify

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations

New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations (Extended Abstract) Gaoyan Xie, Cheng Li and Zhe Dang School of Electrical Engineering and

More information

Computation Tree Logic (CTL)

Computation Tree Logic (CTL) Computation Tree Logic (CTL) Fazle Rabbi University of Oslo, Oslo, Norway Bergen University College, Bergen, Norway fazlr@student.matnat.uio.no, Fazle.Rabbi@hib.no May 30, 2015 Fazle Rabbi et al. (UiO,

More information

Chapter 6: Computation Tree Logic

Chapter 6: Computation Tree Logic Chapter 6: Computation Tree Logic Prof. Ali Movaghar Verification of Reactive Systems Outline We introduce Computation Tree Logic (CTL), a branching temporal logic for specifying system properties. A comparison

More information

Formal Verification of Mobile Network Protocols

Formal Verification of Mobile Network Protocols Dipartimento di Informatica, Università di Pisa, Italy milazzo@di.unipi.it Pisa April 26, 2005 Introduction Modelling Systems Specifications Examples Algorithms Introduction Design validation ensuring

More information

ESE601: Hybrid Systems. Introduction to verification

ESE601: Hybrid Systems. Introduction to verification ESE601: Hybrid Systems Introduction to verification Spring 2006 Suggested reading material Papers (R14) - (R16) on the website. The book Model checking by Clarke, Grumberg and Peled. What is verification?

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Scenario Graphs and Attack Graphs

Scenario Graphs and Attack Graphs Scenario Graphs and Attack Graphs Oleg Mikhail Sheyner CMU-CS-04-122 April 14, 2004 School of Computer Science Computer Science Department Carnegie Mellon University Pittsburgh, PA Thesis Committee: Jeannette

More information

Lecture 16: Computation Tree Logic (CTL)

Lecture 16: Computation Tree Logic (CTL) Lecture 16: Computation Tree Logic (CTL) 1 Programme for the upcoming lectures Introducing CTL Basic Algorithms for CTL CTL and Fairness; computing strongly connected components Basic Decision Diagrams

More information

Revising Specifications with CTL Properties using Bounded Model Checking

Revising Specifications with CTL Properties using Bounded Model Checking Revising Specifications with CTL Properties using Bounded Model Checking No Author Given No Institute Given Abstract. During the process of software development, it is very common that inconsistencies

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

Lecture Notes on Emptiness Checking, LTL Büchi Automata

Lecture Notes on Emptiness Checking, LTL Büchi Automata 15-414: Bug Catching: Automated Program Verification Lecture Notes on Emptiness Checking, LTL Büchi Automata Matt Fredrikson André Platzer Carnegie Mellon University Lecture 18 1 Introduction We ve seen

More information

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probabilistic Model Checking Michaelmas Term 2011 Dr. Dave Parker Department of Computer Science University of Oxford Overview Temporal logic Non-probabilistic temporal logic CTL Probabilistic temporal

More information

Course Runtime Verification

Course Runtime Verification Course Martin Leucker (ISP) Volker Stolz (Høgskolen i Bergen, NO) INF5140 / V17 Chapters of the Course Chapter 1 Recall in More Depth Chapter 2 Specification Languages on Words Chapter 3 LTL on Finite

More information

An Introduction to Temporal Logics

An Introduction to Temporal Logics An Introduction to Temporal Logics c 2001,2004 M. Lawford Outline Motivation: Dining Philosophers Safety, Liveness, Fairness & Justice Kripke structures, LTS, SELTS, and Paths Linear Temporal Logic Branching

More information

Guarded resolution for Answer Set Programming

Guarded resolution for Answer Set Programming Under consideration for publication in Theory and Practice of Logic Programming 1 Guarded resolution for Answer Set Programming V.W. Marek Department of Computer Science, University of Kentucky, Lexington,

More information

Computer-Aided Program Design

Computer-Aided Program Design Computer-Aided Program Design Spring 2015, Rice University Unit 3 Swarat Chaudhuri February 5, 2015 Temporal logic Propositional logic is a good language for describing properties of program states. However,

More information

PSPACE-completeness of LTL/CTL model checking

PSPACE-completeness of LTL/CTL model checking PSPACE-completeness of LTL/CTL model checking Peter Lohmann April 10, 2007 Abstract This paper will give a proof for the PSPACE-completeness of LTLsatisfiability and for the PSPACE-completeness of the

More information

CS156: The Calculus of Computation Zohar Manna Autumn 2008

CS156: The Calculus of Computation Zohar Manna Autumn 2008 Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)

More information

Alternating-Time Temporal Logic

Alternating-Time Temporal Logic Alternating-Time Temporal Logic R.Alur, T.Henzinger, O.Kupferman Rafael H. Bordini School of Informatics PUCRS R.Bordini@pucrs.br Logic Club 5th of September, 2013 ATL All the material in this presentation

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Bounded Model Checking with SAT/SMT Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Recap: Symbolic Model Checking with BDDs Method used by most industrial strength model checkers:

More information

Lecture Notes on Software Model Checking

Lecture Notes on Software Model Checking 15-414: Bug Catching: Automated Program Verification Lecture Notes on Software Model Checking Matt Fredrikson André Platzer Carnegie Mellon University Lecture 19 1 Introduction So far we ve focused on

More information

LTL is Closed Under Topological Closure

LTL is Closed Under Topological Closure LTL is Closed Under Topological Closure Grgur Petric Maretić, Mohammad Torabi Dashti, David Basin Department of Computer Science, ETH Universitätstrasse 6 Zürich, Switzerland Abstract We constructively

More information

What You Must Remember When Processing Data Words

What You Must Remember When Processing Data Words What You Must Remember When Processing Data Words Michael Benedikt, Clemens Ley, and Gabriele Puppis Oxford University Computing Laboratory, Park Rd, Oxford OX13QD UK Abstract. We provide a Myhill-Nerode-like

More information

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for? Computer Engineering and Networks Overview Discrete Event Systems Verification of Finite Automata Lothar Thiele Introduction Binary Decision Diagrams Representation of Boolean Functions Comparing two circuits

More information

Model Checking I. What are LTL and CTL? dack. and. dreq. and. q0bar

Model Checking I. What are LTL and CTL? dack. and. dreq. and. q0bar Model Checking I What are LTL and CTL? and dack q0 or D dreq D q0bar and 1 View circuit as a transition system (dreq, q0, dack) (dreq, q0, dack ) q0 = dreq dack = dreq and (q0 or (not q0 and dack)) q0

More information

Expressing Security Properties Using Selective Interleaving Functions

Expressing Security Properties Using Selective Interleaving Functions Expressing Security Properties Using Selective Interleaving Functions Joseph Halpern and Sabina Petride August 8, 2008 Abstract McLean s notion of Selective Interleaving Functions (SIFs) is perhaps the

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

An Inquisitive Formalization of Interrogative Inquiry

An Inquisitive Formalization of Interrogative Inquiry An Inquisitive Formalization of Interrogative Inquiry Yacin Hamami 1 Introduction and motivation The notion of interrogative inquiry refers to the process of knowledge-seeking by questioning [5, 6]. As

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

arxiv: v1 [cs.cc] 5 Dec 2018

arxiv: v1 [cs.cc] 5 Dec 2018 Consistency for 0 1 Programming Danial Davarnia 1 and J. N. Hooker 2 1 Iowa state University davarnia@iastate.edu 2 Carnegie Mellon University jh38@andrew.cmu.edu arxiv:1812.02215v1 [cs.cc] 5 Dec 2018

More information

Chapter 5: Linear Temporal Logic

Chapter 5: Linear Temporal Logic Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Spring 94 Outline We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties.

More information

Timo Latvala. February 4, 2004

Timo Latvala. February 4, 2004 Reactive Systems: Temporal Logic LT L Timo Latvala February 4, 2004 Reactive Systems: Temporal Logic LT L 8-1 Temporal Logics Temporal logics are currently the most widely used specification formalism

More information

Decision Procedures for Satisfiability and Validity in Propositional Logic

Decision Procedures for Satisfiability and Validity in Propositional Logic Decision Procedures for Satisfiability and Validity in Propositional Logic Meghdad Ghari Institute for Research in Fundamental Sciences (IPM) School of Mathematics-Isfahan Branch Logic Group http://math.ipm.ac.ir/isfahan/logic-group.htm

More information

Total Ordering on Subgroups and Cosets

Total Ordering on Subgroups and Cosets Total Ordering on Subgroups and Cosets Alexander Hulpke Department of Mathematics Colorado State University 1874 Campus Delivery Fort Collins, CO 80523-1874 hulpke@math.colostate.edu Steve Linton Centre

More information

Geometric Steiner Trees

Geometric Steiner Trees Geometric Steiner Trees From the book: Optimal Interconnection Trees in the Plane By Marcus Brazil and Martin Zachariasen Part 3: Computational Complexity and the Steiner Tree Problem Marcus Brazil 2015

More information

The State Explosion Problem

The State Explosion Problem The State Explosion Problem Martin Kot August 16, 2003 1 Introduction One from main approaches to checking correctness of a concurrent system are state space methods. They are suitable for automatic analysis

More information

Computation Tree Logic

Computation Tree Logic Computation Tree Logic Computation tree logic (CTL) is a branching-time logic that includes the propositional connectives as well as temporal connectives AX, EX, AU, EU, AG, EG, AF, and EF. The syntax

More information

Partial model checking via abstract interpretation

Partial model checking via abstract interpretation Partial model checking via abstract interpretation N. De Francesco, G. Lettieri, L. Martini, G. Vaglini Università di Pisa, Dipartimento di Ingegneria dell Informazione, sez. Informatica, Via Diotisalvi

More information

PLEASE DO NOT REMOVE THIS PAGE

PLEASE DO NOT REMOVE THIS PAGE Thank you for downloading this document from the RMIT ResearchR Repository Citation: Liu, H, Wang, D, Huimin, L and Chen, T 2009, 'On the integration of metamorphic testing and model checking', in Hans

More information

An Independence Relation for Sets of Secrets

An Independence Relation for Sets of Secrets Sara Miner More Pavel Naumov An Independence Relation for Sets of Secrets Abstract. A relation between two secrets, known in the literature as nondeducibility, was originally introduced by Sutherland.

More information

Integrating Induction and Deduction for Verification and Synthesis

Integrating Induction and Deduction for Verification and Synthesis Integrating Induction and Deduction for Verification and Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley DATE 2013 Tutorial March 18, 2013 Bob s Vision: Exploit Synergies between

More information

Parameter Synthesis for Timed Kripke Structures

Parameter Synthesis for Timed Kripke Structures Parameter Synthesis for Timed Kripke Structures Extended Abstract Micha l Knapik 1 and Wojciech Penczek 1,2 1 Institute of Computer Science, PAS, Warsaw, Poland 2 University of Natural Sciences and Humanities,

More information

Model Checking Algorithms

Model Checking Algorithms Model Checking Algorithms Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan November 14, 2018 Bow-Yaw Wang (Academia Sinica) Model Checking Algorithms November 14, 2018 1 / 56 Outline

More information

State-Space Exploration. Stavros Tripakis University of California, Berkeley

State-Space Exploration. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 State-Space Exploration Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE

More information

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Journal of Artificial Intelligence Research 1 (1993) 1-15 Submitted 6/91; published 9/91 Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Enrico Giunchiglia Massimo

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Model Checking I. What are LTL and CTL? dack. and. dreq. and. q0bar

Model Checking I. What are LTL and CTL? dack. and. dreq. and. q0bar Model Checking I What are LTL and CTL? q0 or and dack dreq q0bar and 1 View circuit as a transition system (dreq, q0, dack) (dreq, q0, dack ) q0 = dreq and dack = dreq & (q0 + ( q0 & dack)) q0 or and D

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

Modelling and Analysing Variability in Product Families

Modelling and Analysing Variability in Product Families Modelling and Analysing Variability in Product Families Maurice H. ter Beek ISTI CNR, Pisa, Italy joint work with P. Asirelli A. Fantechi S. Gnesi ISTI CNR University of Florence ISTI CNR University of

More information

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Teknillisen korkeakoulun tietojenkäsittelyteorian laboratorion tutkimusraportti 66 Espoo 2000 HUT-TCS-A66

More information

A Brief Introduction to Model Checking

A Brief Introduction to Model Checking A Brief Introduction to Model Checking Jan. 18, LIX Page 1 Model Checking A technique for verifying finite state concurrent systems; a benefit on this restriction: largely automatic; a problem to fight:

More information

Revising UNITY Programs: Possibilities and Limitations 1

Revising UNITY Programs: Possibilities and Limitations 1 Revising UNITY Programs: Possibilities and Limitations 1 Ali Ebnenasir, Sandeep S. Kulkarni, and Borzoo Bonakdarpour Software Engineering and Network Systems Laboratory Department of Computer Science and

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Model Checking: the Interval Way

Model Checking: the Interval Way Dept. of Mathematics, Computer Science, and Physics University of Udine, Italy TCS Seminar Series Spring 2018 Department of Theoretical Computer Science KTH ROYAL INSTITUTE OF TECHNOLOGY June 4, 2018 Model

More information

Modal Dependence Logic

Modal Dependence Logic Modal Dependence Logic Jouko Väänänen Institute for Logic, Language and Computation Universiteit van Amsterdam Plantage Muidergracht 24 1018 TV Amsterdam, The Netherlands J.A.Vaananen@uva.nl Abstract We

More information

Nested Epistemic Logic Programs

Nested Epistemic Logic Programs Nested Epistemic Logic Programs Kewen Wang 1 and Yan Zhang 2 1 Griffith University, Australia k.wang@griffith.edu.au 2 University of Western Sydney yan@cit.uws.edu.au Abstract. Nested logic programs and

More information

Sanjit A. Seshia EECS, UC Berkeley

Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Explicit-State Model Checking: Additional Material Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: G. Holzmann Checking if M satisfies : Steps 1. Compute Buchi

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms

Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms Property Checking of Safety- Critical Systems Mathematical Foundations and Concrete Algorithms Wen-ling Huang and Jan Peleska University of Bremen {huang,jp}@cs.uni-bremen.de MBT-Paradigm Model Is a partial

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Finite-State Model Checking

Finite-State Model Checking EECS 219C: Computer-Aided Verification Intro. to Model Checking: Models and Properties Sanjit A. Seshia EECS, UC Berkeley Finite-State Model Checking G(p X q) Temporal logic q p FSM Model Checker Yes,

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

More information

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna IIT Patna 1 Verification Arijit Mondal Dept. of Computer Science & Engineering Indian Institute of Technology Patna arijit@iitp.ac.in Introduction The goal of verification To ensure 100% correct in functionality

More information

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking CTL Model checking Assumptions:. finite number of processes, each having a finite number of finite-valued variables.. finite length of CTL formula Problem:Determine whether formula f 0 is true in a finite

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Logic: Propositional Logic Truth Tables

Logic: Propositional Logic Truth Tables Logic: Propositional Logic Truth Tables Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06

More information