Online Testing with Model Programs

Size: px
Start display at page:

Download "Online Testing with Model Programs"

Transcription

1 Online Testing with Model Programs Margus Veanes Colin Campbell Wolfram Schulte Nikolai Tillmann Microsoft Research, Redmond, WA, USA ABSTRACT Online testing is a technique in which test derivation from a model program and test execution are combined into a single algorithm. We describe a practical online testing algorithm that is implemented in the model-based testing tool developed at Microsoft Research called Spec Explorer. Spec Explorer is being used daily by several Microsoft product groups. Model programs in Spec Explorer are written in the high level specification languages AsmL or Spec#. We view model programs as implicit definitions of interface automata. The conformance relation between a model and an implementation under test is formalized in terms of refinement between interface automata. Testing then amounts to a game between the test tool and the implementation under test. Categories and Subject Descriptors D.2.5 [Testing and Debugging]: Testing tools General Terms Reliability,Verification Keywords Conformance testing, interface automata, runtime verification 1. INTRODUCTION In this paper we consider testing of reactive systems. Reactive systems take inputs as well as provide outputs in form of spontaneous reactions. Testing of reactive systems can very naturally be viewed as a two-player game between the tester and the implementation under test (IUT). Transitions are moves that may originate either from the tester or from the IUT. The tester may use a strategy to choose which of the inputs to apply in a given state. We describe here a new online technique for testing reactive systems. In this approach we join test derivation from a model program and test execution into a single algorithm. This combines the benefits of encoding transitions as method invocations of a model program with the benefits of a game-based framework for reactive systems. Test cases become test strategies that are created dynamically 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. ESEC-FSE 05, September 5 9, 2005, Lisbon, Portugal. Copyright 2005 ACM /05/ $5.00. as testing proceeds and take advantage of the knowledge gained by exploring part of the model state space. Formally, we consider model programs as implicit definitions of interface automata and formulate the conformance relation between a model program and a system under test in terms of alternating simulation. This is a new approach for formalizing the testing of reactive systems. The technique we describe was motivated by problems that we observed while testing large-scale commercial systems, and the resulting algorithm has been implemented in a model-based testing tool developed at Microsoft Research. This tool, called Spec Explorer [1, 7], is in daily use by several product groups inside of Microsoft. The online technique has been used in an industrial setting to test operating system components and Web service infrastructure. To summarize, we consider the following points as the main contributions of the paper: The formalization of model programs as interface automata and a new approach to using interface automata for conformance testing, including the handling of timeouts. A new online or on-the-fly algorithm for using model programs for conformance testing of open systems, where the conformance relation being tested is alternating simulation. The algorithm uses state dependent timeouts and state dependent action weights as part of its strategy calculation. Evaluation of the effectiveness of the theory and the tool for the test of critical industrial applications. The rest of the paper is organized into sections as follows. In Section 2 we formalize what it means to specify a reactive system using a model program. This includes a description of how the Spec Explorer tool uses a model program as its input. Then in Section 3, we describe the algorithm for online testing. In Section 4 we walk through a concrete example that runs in the Spec Explorer tool. We evaluate further sample problems and industrial applications of the tool in Section 5. Related work is discussed in Section 6. Finally, we mention some open problems and future work in Section SPECIFYING REACTIVE SYSTEMS USING MODEL PROGRAMS To describe the behavior of a reactive system, we use the notion of interface automata [11, 10] following the exposition in [10]. Instead of the terms input and output that are used in [10] we use the terms controllable and observable here. This choice of terminology is motivated by our problem domain of testing, where certain operations are under the control of a tester, and certain operations are only observable by a tester.

2 DEFINITION 1. An interface automaton M has the following components: A set S of states. A nonempty subset S init of S called the initial states. Mutually disjoint sets of controllable actions A c and observable actions A o. Enabling functions Γ c and Γ o from S to subsets of A c and A o, respectively. A transition function δ that maps a source state and an action enabled in the source state to a target state. Remark about notation: In order to identify a component of an interface automaton M, we index that component by M, unless M is clear from the context. We write A M for the set A c M A o M of all actions in M, and we let Γ M (s) denote the set Γ c M (s) Γ o M(s) of all enabled actions in a state s. An action a transitions from s to t if δ M(s, a) =t. 2.1 Model program as interface automaton A model program P declares a finite set of action methods and a set of (state) variables. A model state is a mapping of state variables to concrete values. 1 Model programs in Spec Explorer are written in a high level specification language AsmL [16] or Spec# [4]. An action method m is similar to a method written in a normal programming languages like C#, except that m is in addition associated with a state-based predicate Pre m[x] called the precondition of m, that may depend on the input parameters x of m. An example of a model program and some of the concepts introduced in this section are illustrated below in Section 4. The interface automaton M P defined by a model program P is a complete unwinding or expansion of P as explained next. We omit the suffix P from M P as it is clear from the context. The set of initial states SM init of M is the singleton set containing the initial assignment of variables to values as declared in P. For a sequence of method parameters v, we write v in for the input parameters, i.e. the arguments, and we write v out for the output parameters, in particular including the return value. The transition function δ M maps a source state s and an action a = m, v to a target state t, provided that the following conditions are satisfied: Pre m[ v in] holds in s, the method call m( v in) in state s produces the output parameters v out, and yields the resulting state t; In this case the action a is enabled in s. Each action method m, is associated in a state s with a set of enabled actions Enabled m(s). The set of all enabled actions Γ M (s) in a state s is the union of all Enabled m(s) for all action methods m. The set of states S M is the least set that contains SM init and is closed under δ M. The set A M is the union of all Γ M(s) forsins M Reactive behavior In order to distinguish behavior that a tester has full control over from behavior that can only be observed about the implementation under test (IUT), the action methods of a model program are disjointly partitioned into controllable and observable ones. This induces, for each state s, a corresponding partitioning of Γ M(s) into 1 In terms of mathematical logic, states are first-order structures. controllable actions Γ c M(s) enabled in s, and observable actions Γ o M(s) enabled in s. The action set A M is partitioned accordingly into A c M and A o M. A state s where Γ M(s) is empty is called terminal. A nonterminal state s where Γ o M (s) is empty is called active; s is called passive otherwise Accepting States In Spec Explorer the user associates the model program with an accepting state condition that is a Boolean expression based on the model state. The notion of accepting states is motivated by the practical need to identify model states where tests are allowed to terminate. This is particularly important when testing distributed or multi-threaded systems, where IUT does not always have a global reset that can bring it to its initial state. Thus ending of tests is only possible from certain states from which reset is possible. For example, as a result of a controllable action that starts a thread in the IUT, the thread may acquire shared resources that are later released. The successful test should not be finished before the resources have been released. From the game point of view, the player, i.e. the test tool, may choose to make a move from an accepting state s to a terminal goal state identifying the end of the play (or test), irrespective of whether there are any other moves (either for the player or the opponent) possible in s. Notice that an accepting state does not oblige the player to end the test. By restating that in terms of the interface automaton M, there is a controllable finish action in A M and a goal state g in S M, s.t., for all accepting states s, δ M (s, finish) =g. In IUT, the finish action must transition from a corresponding state t to a terminal state as well, reflecting the assumption that IUT can reset the system at this point. Thus, ending the test in an accepting state, corresponds to choosing the finish action. 2.2 IUT as interface automaton In the Spec Explorer tool the model program and the IUT are both given by a collection of APIs in form of.net libraries (or dlls). Typically the IUT is given as a collection of one or more wrapper APIs of the actual system under test. The actual system is often multi-threaded if not distributed, and the wrapper is connected to the actual system through a customized test harness that provides a particular high-level view of the behavior of the system matching the abstraction level of the model program. The wrapper provides a serialized view of the observable actions resulting from the execution of the actual system. It is very common that only a particular aspect of the IUT is being tested through the harness. In this sense the IUT is an open system. The program of the IUT can be seen as a restricted form of a model program. We view the behavior of the IUT in the same way as that of the specification. The interface automaton corresponding to IUT is denoted by M IUT. The finish action in the IUT typically kills the processes or terminates the threads (if any) in the actual system under test. 2.3 Conformance relation The conformance relation between a model and an implementation is formalized as refinement between two interface automata. In order for the paper to be self contained we define first the notions of alternating simulation and refinement following [10]. The view of the model and the implementation as interface automata is a mathematical abstraction. We discuss below how the conformance relation is realized in the actual implementation. In the following we use M to stand for the specification interface automaton and N for the implementation interface automaton.

3 DEFINITION 2. An alternating simulation ρ from M to N is a relation ρ S M S N such that, for all (s, t) ρ, 1. Γ c M(s) Γ c N (t) and Γ o M(s) Γ o N (t), and 2. a Γ o M (s) Γ c N(t), (δ M(s, a),δ N (t, a)) ρ. The intuition is as follows. Condition 1 ensures that, on one hand all controllable actions in the model are possible in the implementation, and on the other hand that all possible responses from the implementation are enabled in the model. Condition 2 guarantees that if condition 1 is true in a given pair of source states then it is also true in the resulting target states of any controllable action enabled in the model and any observable action enabled in the implementation. DEFINITION 3. An interface automaton M refines an interface automaton N if 1. A o M A o N and A c M A c N, and 2. there is an alternating simulation ρ from M to N, s S init and t SN init such that (s, t) ρ. The first condition of refinement is motivated in the following section. Intuition for the second condition can be explained in terms of a conformance game. Consider two players: a controller and an observer. The game starts from an initial state in SM init SN init. During one step of the game one of the players makes a move. When the controller makes a move, it chooses an enabled controllable action a in the current model state s and transitions to (δ M (s, a),δ N (t, a)), where the chosen action must be enabled in the current implementation state t or else there is a conformance failure. Symmetrically, when the observer makes a move, it chooses an enabled observable action in the current IUT state t and transitions to the target state (δ M (s, a),δ N (t, a)), where the chosen action must be enabled in the current model state s or else there is a conformance failure. The game continues until the controller decides to end the game by transitioning to the goal state. 2.4 Conformance checking in Spec Explorer We provide a high level view of the conformance checking engine in Spec Explorer. We motivate the view of IUT as an interface automaton and explain the mechanism used to check acceptance of actions. Spec Explorer provides a mechanism for the user to bind the actions methods in the model to methods with matching signatures in the IUT. Without loss of generality, we assume here that the signatures are in fact the same. Usually the IUT has more methods available in addition to those that are bound to the action methods in the model, which explains the first condition of the refinement relation. In other words, the model usually addresses one aspect of the IUT and not the complete functionality of IUT. The user partitions the action methods into observable and controllable ones. In order to track the spontaneous execution of an observable action in the IUT, possibly caused by some internal thread, Spec Explorer instruments the IUT at the binary (MSIL) level. During execution, the instrumented IUT calls back into the conformance engine, notifying it about occurrences of observable method calls. The conformance engine buffers these occurrences, such that they can occur even during the execution of a controllable method in the implementation. A typical scenario is that a controllable action starts a thread in the implementation, during the execution of which several observable actions (callbacks) may happen. Another scenario is that there is only one thread of control; M, however, observable methods are invoked in course of executing a controllable method. In the following we describe how a controllable action a = m, v is chosen in the model program P and how its enabledness in the IUT is checked. First, input parameters v in for m are generated such that the precondition of the method call m( v in) holds in P. Second, m( v in) is executed in the model and the implementation, producing output parameters v out and w, respectively. Thus a is at this point an enabled action in the model. Third, to determine enabledness of a in the IUT, the expected output parameters v out of the model and the output parameters w of the IUT are compared for equality, if v out w then a is enabled in the model but not in the IUT, resulting in a conformance failure. For example, if v out is the special return value unit of type void but IUT throws an exception when m( v in) is invoked, (i.e. w is an exception value), then a conformance failure occurs. An observable action a = m, v happens as a spontaneous reaction from the IUT, which occurrence is buffered in the conformance engine. When the conformance engine is in a state where it consumes the next observable action from that buffer, it proceeds as follows. Let a = m, v be the next action in the buffer. First, the precondition of the method call m( v in) is checked in P. If the precondition does not hold, a is not enabled in the model and a precondition conformance failure occurs. Otherwise, m( v in) is executed in the model yielding either a conformance failure in form of a model invariant or postcondition failure, or yielding w. If v out w, an unexpected return value (or output parameter) conformance failure will be generated. If none of this failure situations occur, a is admitted by the model, which then transitions from its current state s to δ MP (a, s). 3. ONLINE TESTING Online testing (also called on-the-fly testing in the literature) is a technique in which test derivation from a model program and test execution are combined into a single algorithm. By generating test cases at run time, rather than pre-computing a finite transition system and its traversals, this technique is able to: Resolve the nondeterminism that typically arises in testing reactive, concurrent and distributed systems. This avoids generating huge pre-computed test cases in order to deal with all possible responses from the system under test. Stochastically sample a large state space rather than attempting to exhaustively enumerate it. Provide user-guided control over test scenarios by selecting actions during the test run based on a dynamically changing probability distribution. In Spec Explorer, the online testing algorithm (OLT) uses a (dynamically changing) strategy to select controllable actions. OLT also stores information about the current state of the model, by keeping track of the state transitions due to controllable and observable actions. The behavior of OLT depends on various user configurable parameters. The most important ones are timeouts and action weights. Before explaining the algorithm we introduce the OLT parameters and explain their role in the algorithm. 3.1 Timeouts In Spec Explorer there is a timeout function, given by a modelbased expression, that in a given state s evaluates to a value (s) of type System.TimeSpan in the.net framework. The primary purpose of the timeout function is to configure the amount of time that

4 OLT should wait for to get a response from the IUT. The timeout value may vary from state to state and may be 0 (which is the default). The definition of the timeout function may reflect network latencies, performance of the actual machine under test, time complexity of the action implementations, test harnessing, etc, that may vary between different test setups. In some situations, the use of the timeout function is reminiscent of checking for quiescence in the sense of ioco theory [20], e.g., when a sufficiently large time span value is associated with an active state. Note however that a timeout is typically enabled in the same state as observable actions and does not correspond to quiescence. The exact time span values do not affect the conformance relation. To make this point precise, we introduce a timeout extension M t of an interface automaton M as follows. The timeout extension of an interface automaton is used in OLT. DEFINITION 4. A timeout extension M t of an interface automaton M is the following interface automaton. The state vocabulary of M t is the state vocabulary of M extended with a Boolean variable timeout. The components of M t are: S M t = {s T,s F : s S M, where timeout is true in s T and false in s F. S init M t = {sf : s SM init A o M t = Ao M and A c M t = Ac M {σ, where σ is called a timeout event. Observable actions are only enabled if timeout is false: Γ c M t(sf )=Γ c M(s) {σ, Γ c M (s T )=, for all s S M, and controllable actions are only enabled if timeout is true: Γ o M t(st )=Γ o M (s), Γ o M t(sf )=, for all s S M. The transition function δ M t is defined as follows. For all s, t S M and a Γ M(s) such that δ M(s, a) =t, If a is controllable then δ M t(a, s T )=t F. If a is observable then δ M t(a, s F )=t F. The timeout event sets timeout to true: δ M t(σ, s F )=s T for all s S M. We say that a state s of M t is an observation or passive state if timeout is false in s, we say that s is a control or active state otherwise. 3.2 Action weights Action weights are used to configure the strategy of OLT to choose controllable actions. There are two kinds of weight functions: per-state weight function and decrementing weight function. Each action method in P is associated with a weight function of one kind. Let #(m) denote the number of times a controllable action method has been chosen during the course of a single test run in OLT. A per-state weight function is a function ω s that maps a model state s and a controllable action method m to a nonnegative integer. A decrementing weight function is a function ω d of the OLT algorithm that maps a controllable action method m to the value max(ωm init #(m), 0), where ωm init is an initial weight assigned to m. We use ω(s, m) to denote the value of ω s (s, m) if m is associated with a per-state weight function, we use ω(s, m) to denote the value of ω d (m) otherwise. In a given model state s the action weights are used to make a weighted random selection of an action method as follows. Let m 1,...,m k be all the controllable action methods enabled in s, i.e. in Γ o M(s), the probability of an action method m i being chosen is { 0, if ω(s, mi) =0; prob(s, m i)= ω(s, m k i)/ j=1 ω(s, mj), otherwise. A per-state weight can be used to guide the direction of the exploration according to the state of the model. These weights can be used to selectively increase or decrease the probability of certain actions based on certain model variables. For example, assume P has a state variable stack whose value is a sequence of integers, and a controllable action method Push(x) that pushes a new value x on stack. One can associate a per-state weight expression MaxStackSize Size(stack) with Push that will make the probability of Push less as the size of stack increases and gets closer to the maximum allowed size. Decrementing weights are used when the user wants to call a particular action method a specific number of times. With each invocation of the method, the associated weight decreases by 1 until it reaches zero, at which point the action will not be called again during the run. A useful analogy here is with a bag of colored marbles, one color per action method marbles are pulled from the bag until the bag is empty. Using decrementing weights produces a random permutation of actions that takes enabledness of transitions into account. 3.3 Online testing algorithm We provide here a high level description of the OLT algorithm. We are given a model program P and an implementation under test IUT. The purpose of the OLT algorithm is to generate tests that provide evidence for the refinement from the interface automaton M to the interface automaton M t IUT, where M is the timeout extension M t P of M P. It is convenient to view OLT as a conservative extension of M where the information about #(m) is stored in the OLT state, since the controller strategy may depend on this information. This does not affect the conformance relation. In the initial state of OLT, #(m) is 0 for all controllable action methods m. A controller strategy (or output strategy) π maps a state s S OLT to a subset of Γ o M (s M). Acontroller step is a pair (s, t) of OLT states such that t M = δ M(s M, m, v ) for some action m, v in π(s), and #(m) t =#(m) s +1. In general, OLT may also keep more information, e.g. limited history of the test runs or, projected state machine coverage data, etc, that may affect the overall controller strategy in successive test runs of OLT. Such extensions are orthogonal to the description of the algorithm below, as they affect only π. An observer step is a pair (s, t) of OLT states such that t M = δ M (s M,a) for some a Γ c M(s M), and # s =# t. By a test run of OLT we mean a trace s = s 0s 1...s k S + OLT where s 0 is the initial state and, for each i, (s i,s i+1) is a controller step or an observer step. A successful test run is a test run that ends in the goal state. We are now ready to describe the top-level loop of the OLT algorithm. We write s OLT for the current state of OLT. We say that an action a is legal (in the current state) if a is enabled in s OLT M, a is illegal otherwise. Initially s OLT is the initial state of OLT. The following steps are repeated subject to additional termination conditions (discussed in the following section):

5 Step 1 (observe) Assume s OLT is a passive state (timeout is false). OLT waits for an observable action until (s OLT M) amount of time elapses. If an observable action a occurs within this time, there are two cases: 1. If a is illegal then the test run fails. 2. If a is legal, OLT makes an observable step (s OLT,s) and sets s OLT to s. OLT continues from Step 1. If no observable action happened, OLT sets timeout to true. Step 2 (control) Assume s OLT is an active state (timeout is true). Assume π(s OLT). OLT chooses an action a π(s OLT), such that the probability of the method of a being m is prob(s OLT M, m), and invokes a in the IUT. There are two cases: 1. If a is not enabled in IUT, the test run fails. 2. If a is enabled in IUT, OLT makes a controllable step (s OLT,s), where s is an observation state, and sets s OLT to s. OLT continues from Step 1. Step 3 (terminate) Assume π(s OLT) =. If s OLT M is the goal state then the test run succeeds else the test run fails. Notice that the timeout event in Step 1 happens immediately if (s OLT M) =0. In terms of M, a timeout event is just an observable action. The failure verdict in Step 3 is justified by the assumption that a successful run must end in the goal state. Step 3 implicitly adds a new controllable action fail to A OLT and, upon failure, a transition δ M (s OLT, fail) = s OLT, such that fail is never enabled in M IUT. For example, if a timeout happens in a nonaccepting state and the subsequent state is terminal then the test run fails. 3.4 Termination conditions and cleanup phase The algorithm uses several termination conditions. Most important of these is the desired length of test runs and the total length of all the test runs. When a limit is reached, but the current state of the algorithm is not an accepting state, then the main loop is executed as above but with the difference that the only controllable actions that are used must be marked as cleanup actions. The intuition behind cleanup actions is that they help drive the system to an accepting state. For example, actions like closing a file or aborting a transition are typical cleanup actions, whereas actions like opening a new file or starting a new task are not. 4. EXAMPLE: CHAT SERVER We illustrate here how to model and test a simple reactive system, a sample called a chat system, using the Spec# specification language [4] and the Spec Explorer tool [1]. 4.1 Overview The chat system lets members enter the chat session. Members that have entered the session may post messages. The purpose of the model is to specify that all messages sent by a given client are received in the same order by all the recipients. We refer to this condition as the local consistency criterion of the system. For example, if there are two members in the session, client 1 and client 2, and client 1 sends two messages, first hi and then bye, then client 2 must first receive hi and then receive bye. We do not describe how the chat session is created. Instead, we assume that there is a single chat session available at all times. The model is given in two parts. The first part describes the variables that encode the state at each point of the system s run. Each run begins in the initial state and proceeds in steps as actions occur. The second part describes the system s actions, such as entering the chat session or posting a message. Each action has preconditions that say in which state the action may occur and a method body that describes how the state changes as a result of the action. 4.2 System State The state of the system consists of instances of the class Client that have been created so far, denoted by enumof(client) in Spec#, and a map Members that for each client specifies the messages that have been sent but not yet delivered to that client as sender queues. Each sender queue is identified by the client that sent the messages in the queue. class Client { MemberState Members = Map{; type Message = string!; type MemberState = Map<Client,SendersQueue>; type SendersQueue = Map<Client,Seq<Message>>; The system state is identified by the values of enumof(client) and Members. In the initial state of the system enumof(client) is an empty set and Members is an empty map. 4.3 Actions There are four action methods for the chat system: the controllable action methods Create, Enter, Post, and the observable action method Deliver. The Create action method creates a new instance of the Client class, as a result of this action the set of clients created so far, enumof(client) is extended with the new client. Some of the preconditions are related to scenario control and are explained later. Client! Create() requires CanCreate; // scenario control { return new Client(); A client that is not already a member of the chat session may join the session. A client c becomes a member of the chat session when the action Enter(c) is called. When a client joins the session, the related message queues are initialized appropriately. The precondition Pre Enter[c] of Enter is c notin Members. void Enter(Client! c) requires CanEnter; // scenario control requires c notin Members; { foreach (Client d in Members) Members[d] += Map{<c,Seq{>; Members += Map{<c,Map{d in Members; <d,seq{>>; A member of the chat session may post a message to all the other members. When a sender posts a message, the message is appended at the end of the corresponding sender queue of each of the other members of the session. void Post(Client! sndr, Message msg) requires CanPost; // scenario control requires sndr in Members && Members.Size > 1; { foreach (rcvr in Members) if (rcvr!= sndr) Members[rcvr][sndr] += Seq{msg;

6 A message being delivered from a sender to a receiver is an observable action or a notification callback that occurs whenever the chat system forwards a particular message to a particular client. When a delivery is observed, the corresponding sender queue of the receiver has to be nonempty, and the message must match the first message in that queue or else local consistency is violated. If the preconditions of the delivery are satisfied then the delivered message is simply removed from the corresponding sender queue of the recipient. void Deliver(Message msg, Client! sndr, Client! rcvr) requires rcvr in Members && sndr in Members[rcvr]; requires Members[rcvr][sndr].Length > 0 && Members[rcvr][sndr].Head == msg; { Members[rcvr][sndr] = Members[rcvr][sndr].Tail; 4.4 Scenario control The Spec Explorer tool allows the user to limit the exploration of the model in various ways. We illustrate some of this functionality on this example Additional preconditions In order to impose a certain order of actions we introduce the following derived mode property and define the scenario control related enabling conditions for the controllable action methods using the mode property. The scenario we have in mind is that all clients are created first, then they enter the session, and finally they start posting messages. We also limit the number of clients here to be two. The additional preconditions that limit the applicability of actions are only applied to controllable actions. The preconditions constrain the different orders in which the controllable actions will be called. For observable actions, any violation of the preconditions is a conformance failure. enum Mode { Creating, Entering, Posting ; Mode CurrentMode { get { if (enumof(client).size < 2) return Mode.creating; if (Members.Size < 2) return Mode.entering; return Mode.posting; bool CanCreate {get{return CurrentMode==Mode.Creating; bool CanEnter {get{return CurrentMode==Mode.Entering; bool CanPost {get{return CurrentMode==Mode.Posting; Default parameter domains In order to execute the action methods we also need to provide actual parameters for the actions. In this example we do so by restricting the domain of possible messages to fixed strings by providing a default value for the Message type through exploration settings of Spec Explorer. In general, parameters to actions are specified by using state dependent parameter generators. A parameter generator of an action method m is evaluated in each state separately and produces in that state a collection of possible input parameter combinations for m State filters We may restrict the reachable states of the system with statebased predicates called filters. A transition to a new state is ignored if the state does not satisfy the given filters. We make use of two filters in this example: NumberOfPendingDeliveries < k for some fixed k, and NoDuplicates that are defined below. The first filter prevents the message queues from having more than k 1 pending deliveries in total in any given state. The second filter prevents a given message from being posted in states where that message is already in the queue of messages pending delivery. int NumberOfPendingDeliveries { get { return Sum{c in Members; Sum{d in Members[c]; Members[c][d].Length; bool NoDuplicates { get { return Forall{c in Members, d in Members[c]; NoDupsSeq(Members[c][d]); bool NoDupsSeq(Seq<string> s) { return Forall{x in s; Exists1{y in s; x == y; State groupings In Spec Explorer one can use state groupings to avoid multiple equivalent states [13, 8] from being explored. By using the following state grouping we can avoid different orders in which clients enter the session: object IgnoreEnteringOrder { get { if (CurrentMode == Mode.posting) return Members; else return <enumof(client),members.size>; Notice that in entering mode, the number of members increases, but the grouping implies that any two states with the same number of members are indistinguishable. Without using the grouping we would also get the two transitions and the intermediate state where client c1 has entered the session before client c0. With n clients there would be n factorial many orders that are avoided with the grouping. The use of groupings has sometimes an effect similar to partial order reduction. If we explore the chat model with the given constraints and only allow a single message hi, then we explore the state space that is shown Figure Execution Before we can run the model program against a chat server implementation, here realized using TCP/IP and implemented in.net, Spec Explorer requires that we complete the test configuration. We do so by providing a reference to the implementation and establish conformance bindings, which are isomorphic mappings between the signature of the model program and the IUT. Our methodology also requires that objects in the model that are passed as input arguments, must have a one-to-one correspondence with objects in the IUT. This dynamic binding is implicitly established by the Create call, which, when run, binds the object created in the model space automatically to the object returned by the implementation. Running this example in the Spec Explorer tool with the online algorithm showed a number of conformance discrepancies with respect to a TCP/IP-based implementation of this specification written in C#. In particular, the implementation does not respect the local consistency criterion and creates new threads for each message that is posted, without taking into account whether prior messages from the same sender have been delivered to the given receiver. Figure 2 shows a particular run of the model against the implementation using the online algorithm of Spec Explorer where a conformance violation is detected. In this case the Message domain was configured to contain two messages hi and bye. 5. EVALUATION We evaluate the use of online testing on a number of sample problems. The different case studies are summarized in Table 1. In each case the model size reflects approximately the number of

7 <Set{, 0> Create()/c0 <Set{c0, 0> Create()/c1 <Set{c1, c0, 0> Enter(c0) <Set{c1, c0, 1> Enter(c1) Map{c1:>Map{c0:>Seq{, c0:>map{c1:>seq{ Post(c0, hi)?deliver(hi, c0, c1) Map{c1:>Map{c0:>Seq{hi, c0:>map{c1:>seq{ Map{c1:>Map{c0:>Seq{hi, c0:>map{c1:>seq{?deliver(hi, c1, c0) Post(c1, hi)?deliver(hi, c1, c0) Post(c1, hi) Map{c1:>Map{c0:>Seq{hi, c0:>map{c1:>seq{hi?deliver(hi, c0, c1) Post(c0, hi) Map{c1:>Map{c0:>Seq{, c0:>map{c1:>seq{hi Map{c1:>Map{c0:>Seq{, c0:>map{c1:>seq{hi Figure 1: Exploration of the Chat model with two clients, one message hi, and the filter NumberOfPendingDeliveries < 2, generated by Spec Explorer. The label of each node displays the value of the IgnoreEnteringOrder property. Active states are shown as ovals and passive states are shown as diamonds. Unlabeled arcs from passive to active state are timeout transitions. Observable actions are prefixed by a question mark. lines of the model code excluding scenario control. Implementation size reflects approximately the number of implementation code lines that are directly related to the functionality being tested. For example, the full size of the chat server implementation including the test harness is 2000 lines of C# whereas the core functionality of the server that is targeted by the model is just 300 lines of C#. In each case the implementation is either multi-threaded or distributed (in the case of the chat system). The number of threads is the total number of concurrent threads that may be active in the IUT. The number of locks that are use by the implementation is in some cases dependent on the size of the shared resources being protected. For example, the shared bag is implemented by an array of a fixed size and each array position may be individually locked. The number of runs refers to the total number of online test runs starting from the initial state. The number of steps per run is the total number of actions occurring in each test run. Here is a short evaluation of each of the problems. The first three samples are also available in the sample directory of the Spec Explorer distribution [1]. The last (WP) project is an example of industrial usage of Spec Explorer within Microsoft product teams. Chat Described in Section 4. Code coverage is not 100% because the functionality that allows clients to exit the session is not modeled. The timeout used is 0, implying that observable actions are not waited for if there is a controllable action enabled in the same state. The Chat Server implementation starts a thread for each delivery that is made, which, in general, violates the local consistency criterion. The bug is discovered with at least two messages being posted by a client. However, the same code coverage is reached already with two clients and a single message. The FSM for this case is illustrated in Figure 1. Bag A multi-threaded implementation of a bag (multi-set). Several concurrent threads are allowed to add, delete and lookup elements from a shared bag. The example is a variation of a corresponding case study used in [19]. In this case the 85% coverage of the code was already obtained with a single thread and bag with capacity 1. The remaining part of the code is not modeled and consequently not reachable using the model. However, a locking error (missing lock) in the im-

8 Figure 2: Screenshot of running online testing against the chat server implementation with Spec Explorer. Delivery of message bye from client c0 to client c1 is observed from state s18 violating the fifo requirement on message delivery since hi from c0 to c1 was posted before bye but has not been delivered as shown by the tooltip on state s18 that shows the value of Members. plementation could only be discovered with at least 2 threads and bag with capacity 2. Although the use of 2 threads did not improve code coverage, it gave e.g. full projected state and transition coverage where the projected states were all the possible thread states. In the implementation random small delays were inserted to enforce different schedules of the threads. It was useful for the timeout to be state-based e.g. depending on whether all threads were active or not. Daisy A model of a distributed file system called Daisy. 2 Roughly 70% of the functionality was modeled, including creation of files and directories, and reading and writing to files. The code coverage measure refers to the whole library including the functionality that was not covered. The model is at a much higher level of abstraction, e.g. nodes and blocks are not modeled. In this case two thirds of the conformance violations that were discovered with multiple users between the model and the implementation were due to modeling or harnessing errors. Same code coverage was reached with a single user. The implementation code was a C# translation 2 Used as a common case study during the joint CAV/ISSTA 2004 special event on specification, verification, and testing of concurrent software. The event was organized by Shaz Qadeer (qadeer@microsoft.com). of the original case study written in Java. The implementation threads were instrumented with small random delays that helped to produce more interleavings of the different user threads accessing Daisy. WP A system-level object-model (WP1) and a system-level model (WP2) of an interaction protocol between different components of the Windows operating system, used by a Windows test team. WP2 is composed of 7 smaller closely interacting models. The model-based approach helped to discover 10 times more errors than traditional manual testing, while the effort in developing the model took roughly the same amount of time as developing the manual test cases. The biggest impact that the modeling effort had was during the design phase, the process helped to discover and resolve 2 times more design issues than bugs that were found afterwards. Despite the fact that unit testing had already reached 60% code(block) coverage in case of WP2, bugs that were found in the process were shallow. The additional 10% percent was gained by model-based testing. Typically 100% code coverage is not possible due to various reasons, such as features that are cut or intended for future releases and result in dead code from the point of view of the release version under test. More-

9 Sample problem Model #lines IUT #lines Table 1: Online testing sample problems. IUT #threads IUT #locks IUT block coverage OLT #runs OLT #steps per run OLT timeout Chat #messages 6 90% Bag #clients bag capacity 85% state based 0 500ms Daisy #clients #files + #nodes 60% state based + #blocks 0 100ms WP data dependent data dependent 100% ms WP data dependent data dependent 70% ms over, the model did not cover all of the exceptional behavior of the implementation. However, additional manual tests were only able to increase the code coverage marginally by 1-2%. Using online model-based testing helped to discover deep system-level bugs, for which manual test cases would have been hard to construct. When developing new versions of the code, models need to be adjusted accordingly, but such changes are typically local, whereas manual test cases have to be redesigned and sometimes completely rewritten. In all the cases above the number on code coverage of the implementation did not reflect any useful measurement on how well the implementation was tested. In most cases when bugs were found, at least two or more threads and a shared resource were involved, although the same code coverage could often be achieved with a single thread. A demanding task was to correctly instrument the implementation code with commit actions that correspond to observable actions that match the level of abstraction in the model. For example, often conformance violations were discovered due to observable actions being invoked out of order. In order to produce a valid serialization of the observable actions that happen in concurrent threads, the multiplexing technique [9] was used in the test harness of Bag and in the WP projects. In general, our experience matched that of our users: when our customers discover discrepancies using our tool, typically about half of them originate from the informal requirements specification, the model, or bugs in the test harness, and half are due to coding errors in the implementation under test. The modeling effort itself had in all cases a major impact during the design phase, a lot of design errors, typically twice as many as the number of bugs discovered afterwards, were discovered early on and avoided during coding. 6. RELATED WORK Games have been studied extensively during the past years to solve various control and verification problems for open systems. A comprehensive overview on this subject is given in [10], where the game approach is proposed as a general framework for dealing with system refinement and composition. The paper [10] was influential in our work for formulating the testing problem as a refinement between interface automata. The notion of alternating simulation was first introduced in [2]. The basic idea of online/on-the-fly testing is not new. It has been introduced in the context of labeled transition systems using ioco theory [6, 20, 22] and has been implemented in the TorX tool [21]. Ioco theory is a formal testing approach based on labeled transition systems (that are sometimes also called I/O automata). An extension of ioco theory to symbolic transition systems has recently been proposed in [12]. The main difference between alternating simulation and ioco is that the system under test is required to be input-enabled in ioco (inputs are controllable actions), whereas alternating simulation does not require this since enabledness of actions is determined dynamically and is symmetric in both ways. In our context it is often unnatural to assume input completeness of the system under test, e.g. when dealing with objects that have not yet been created an action on an object can only be enabled when the object actually exists in a given state. Refinement of interface automata also allows the view of testing as a game, and one can separate the concerns of the conformance relation from how you test through different test strategies. There are other important differences between ioco and our approach. In ioco theory tests can terminate in arbitrary states, and accepting states are not used to terminate tests. In ioco quiescence is used to represent the absence of observable actions in a given state, and quiescence is itself considered as a action. Timeouts actions in Spec Explorer are essentially used to model special observable actions that allow the tool to switch from passive to active mode, and in that sense influence the action selection strategies. Typically a timeout is enabled in a passive state where also other observable actions are enabled (see e.g. Figure 1, where each passive state has two enabled actions, one of which is a timeout), thus timeouts do not, in general, represent absence of other observable actions. State dependency of the timeout function is essential in many applications. In our approach states are full first-order structures from mathematical logic. The update semantics of an action method is given by an abstract state machine (ASM) [15]. The ASM framework provides a solid mathematical foundation to deal with arbitrarily complex states. In particular, we can use state-based expressions to specify action weights, action parameters, and other configurations for OLT. We can also reason about dynamically created object instances, which is essential in testing object-oriented systems. When dealing with objects, interface automata are extended to model automata in [7]. Model automata refinement is alternating simulation where actions are terms that must match modulo object bindings, if a model object is bound to an implementation object then the same model object cannot subsequently (during a later step) be bound to a different implementation object, thus preserving a bijection between objects in the model and objects in the implementation [7]. Support for dynamic object graphs is also present in the Agedis tools [17]. An early version of a model-based online testing algorithm presented here, was implemented in the AsmLT tool [3] (AsmLT is a predecessor of Spec Explorer); in AsmLT accepting states and timeouts are not used. A brief introduction to the Spec Explorer tool is given in [14]. Besides online testing, the main purpose of Spec Explorer is to provide support for model validation and offline test case generation. Test cases are represented in form of

10 finite game strategies [18, 5]. Spec Explorer is being used daily by several Microsoft product groups. 7. OPEN PROBLEMS & FUTURE WORK There are a number of open problems in testing large, reactive systems. Here is a list of problems that we have encountered, and that are also widely recognized in the testing community. Achieving and measuring coverage. In the case of external nondeterminism it is difficult to predict the possible behaviors and what part of the state space is being covered in future runs. Scenario control. What is a convenient language or notation for generating strategies that obtain particular behaviors? This is related to playing games with very large or even infinite state spaces, where at every point in time there is only a limited amount of knowledge available about the history. Failure analysis. Understanding the cause of a failure after a long test run is related to a similar problem in the context of modelchecking. Failure reproduction. Obtaining short repro cases for failures that have been detected after long runs is an important practical issue. This is complicated by the fact that the reproduction of failures may not always be possible due to external nondeterminism. Failure avoidance. A tester running online testing in a stresstesting mode against an IUT often wants to continue running the tool even after a failure is found. Of course the same failure should, if possible, be avoided in continued testing. Some of these problems can be recast as problems of test strategy generation in the game-based sense. For this a unifying formal testing theory based on games and first-order states seems promising. We are currently working on several of these items, in particular scenario control. We are also extending the work started in [5] to online testing using Markov decision theory for optimal strategy generation from finite approximations (called test graphs) of the model program. Acknowledgment. We thank Wolfgang Grieskamp for many valuable discussions and for his contributions to Spec Explorer. We also thank Pushmeet Kohli who during his iternship in our group contributed to the implementation of the online testing algorithm in Spec Explorer. 8. REFERENCES [1] Spec Explorer. URL: released January [2] R. Alur, T. A. Henzinger, O. Kupferman, and M. Vardi. Alternating refinement relations. In Proceedings of the Ninth International Conference on Concurrency Theory (CONCUR 98), volume 1466 of LNCS, pages , [3] M. Barnett, W. Grieskamp, L. Nachmanson, W. Schulte, N. Tillmann, and M. Veanes. Towards a tool environment for model-based testing with AsmL. In Petrenko and Ulrich, editors, Formal Approaches to Software Testing, FATES 2003, volume 2931 of LNCS, pages Springer, [4] M. Barnett, R. Leino, and W. Schulte. The Spec# programming system: An overview. In M. Huisman, editor, Construction and Analysis of Safe, Secure, and Interoperable Smart Devices: International Workshop, CASSIS 2004, volume 3362 of LNCS, pages Springer, [5] A. Blass, Y. Gurevich, L. Nachmanson, and M. Veanes. Play to test. Technical Report MSR-TR , Microsoft Research, January [6] E. Brinksma and J. Tretmans. Testing Transition Systems: An Annotated Bibliography. In Summer School MOVEP 2k Modelling and Verification of Parallel Processes, volume 2067 of LNCS, pages Springer, [7] C. Campbell, W. Grieskamp, L. Nachmanson, W. Schulte, N. Tillmann, and M. Veanes. Model-based testing of object-oriented reactive systems with Spec Explorer. Tech. Rep. MSR-TR , Microsoft Research, [8] C. Campbell and M. Veanes. State exploration with multiple state groupings. In D. Beauquier, E. Börger, and A. Slissenko, editors, 12th International Workshop on Abstract State Machines, ASM 05, March 8 11, 2005, Laboratory of Algorithms, Complexity and Logic, Créteil, France, pages , [9] C. Campbell, M. Veanes, J. Huo, and A. Petrenko. Multiplexing of partially ordered events. In F. Khendek and R. Dssouli, editors, 17th IFIP International Conference on Testing of Communicating Systems, TestCom 2005, volume 3502 of LNCS, pages Springer, [10] L. de Alfaro. Game models for open systems. In N. Dershowitz, editor, Verification: Theory and Practice: Essays Dedicated to Zohar Manna on the Occasion of His 64th Birthday, volume 2772 of LNCS, pages Springer, [11] L. de Alfaro and T. A. Henzinger. Interface automata. In Proceedings of the 8th European Software Engineering Conference and the 9th ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), pages ACM, [12] L. Franzen, J. Tretmans, and T. Willemse. Test generation based on symbolic specifications. In J. Grabowski and B. Nielsen, editors, Proceedings of the Workshop on Formal Approaches to Software Testing (FATES 2004), pages 3 17, Linz, Austria, September To appear in LNCS. [13] W. Grieskamp, Y. Gurevich, W. Schulte, and M. Veanes. Generating finite state machines from abstract state machines. In ISSTA 02, volume 27 of Software Engineering Notes, pages ACM, [14] W. Grieskamp, N. Tillmann, and M. Veanes. Instrumenting scenarios in a model-driven development environment. Information and Software Technology, In press, available online. [15] Y. Gurevich. Evolving Algebras 1993: Lipari Guide. In E. Börger, editor, Specification and Validation Methods, pages Oxford University Press, [16] Y. Gurevich, B. Rossman, and W. Schulte. Semantic essence of AsmL. Theoretical Computer Science, Preliminary version available as Microsoft Research Technical Report MSR-TR [17] A. Hartman and K. Nagin. Model driven testing - AGEDIS architecture interfaces and tools. In 1st European Conference on Model Driven Software Engineering, pages 1 11, Nuremberg, Germany, December [18] L. Nachmanson, M. Veanes, W. Schulte, N. Tillmann, and W. Grieskamp. Optimal strategies for testing nondeterministic systems. In ISSTA 04, volume 29 of Software Engineering Notes, pages ACM, July [19] S. Tasiran and S. Qadeer. Runtime refinement checking of concurrent data structures. Electronic Notes in Theoretical Computer Science, 113: , January Proceedings of the Fourth Workshop on Runtime Verification (RV 2004). [20] J. Tretmans and A. Belinfante. Automatic testing with formal methods. In EuroSTAR 99: 7th European Int. Conference on Software Testing, Analysis & Review, Barcelona, Spain, November 8 12, [21] J. Tretmans and E. Brinksma. TorX: Automated model based testing. In 1st European Conference on Model Driven Software Engineering, pages 31 43, Nuremberg, Germany, December [22] M. van der Bij, A. Rensink, and J. Tretmans. Compositional testing with ioco. In A. Petrenko and A. Ulrich, editors, Formal Approaches to Software Testing: Third International Workshop, FATES 2003, volume 2931 of LNCS, pages Springer, 2004.

On-The-Fly Testing of Reactive Systems

On-The-Fly Testing of Reactive Systems On-The-Fly Testing of Reactive Systems Margus Veanes 1, Colin Campbell 1, Wolfram Schulte 1, and Pushmeet Kohli 2 1 Microsoft Research, Redmond, WA, USA margus,colin,schulte@microsoft.com 2 Oxford Brookes

More information

Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer

Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer Colin Campbell Wolfgang Grieskamp Lev Nachmanson Wolfram Schulte Nikolai Tillmann Margus Veanes May 2005 Technical Report MSR-TR-2005-59

More information

Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer

Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer Margus Veanes Colin Campbell Wolfgang Grieskamp Wolfram Schulte Nikolai Tillmann Lev Nachmanson Microsoft Research, Redmond, WA,

More information

State Exploration with Multiple State Groupings

State Exploration with Multiple State Groupings State Exploration with Multiple State Groupings Colin Campbell and Margus Veanes Microsoft Research, Redmond, WA, USA colin,margus@microsoft.com Abstract. Exploration algorithms are relevant to the industrial

More information

Online Testing with Reinforcement Learning

Online Testing with Reinforcement Learning Online Testing with Reinforcement Learning Margus Veanes 1, Pritam Roy 2, and Colin Campbell 1 1 Microsoft Research, Redmond, WA, USA margus,colin@microsoft.com 2 University of California, Santa Cruz,

More information

Multiplexing of Partially Ordered Events

Multiplexing of Partially Ordered Events Multiplexing of Partially Ordered Events Colin Campbell 1, Margus Veanes 1, Jiale Huo 2, and Alexandre Petrenko 3 1 Microsoft Research, Redmond, WA, USA colin,margus@microsoft.com 2 McGill University,

More information

Play to Test.

Play to Test. Play to Test Andreas Blass 1, Yuri Gurevich 2, Lev Nachmanson 2, and Margus Veanes 2 1 University of Michigan, Ann Arbor, MI, USA ablass@umich.edu 2 Microsoft Research, Redmond, WA, USA gurevich,levnach,margus@microsoft.com

More information

AsmL Specification and Verification of Lamport s Bakery Algorithm

AsmL Specification and Verification of Lamport s Bakery Algorithm Journal of Computing and Information Technology - CIT 13, 2005, 4, 313-319 313 AsmL Specification and Verification of Lamport s Bakery Algorithm Matko Botinčan Department of Mathematics, University of

More information

Concurrent Objects and Linearizability

Concurrent Objects and Linearizability Chapter 3 Concurrent Objects and Linearizability 3.1 Specifying Objects An object in languages such as Java and C++ is a container for data. Each object provides a set of methods that are the only way

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Spring 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Monitoring Interfaces for Faults

Monitoring Interfaces for Faults Monitoring Interfaces for Faults Aleksandr Zaks RV 05 - Fifth Workshop on Runtime Verification Joint work with: Amir Pnueli, Lenore Zuck Motivation Motivation Consider two components interacting with each

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

Test suite development for conformance testing of protocols

Test suite development for conformance testing of  protocols Test suite development for conformance testing of email protocols Nikolay Pakulin ISP RAS npak@ispras.ru Anastasia Tugaenko ISP RAS tugaenko@ispras.ru Abstract The method for testing electronic mail protocols

More information

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology MIT 6.035 Specifying Languages with Regular essions and Context-Free Grammars Martin Rinard Massachusetts Institute of Technology Language Definition Problem How to precisely define language Layered structure

More information

Model-Based Testing with AsmL.NET

Model-Based Testing with AsmL.NET Model-Based Testing with AsmL.NET Mike Barnett, Wolfgang Grieskamp, Lev Nachmanson, Wolfram Schulte, Nikolai Tillmann, and Margus Veanes Microsoft Research, One Microsoft Way, Redmond, WA 98052, USA {mbarnett,wrwg,levnach,schulte,nikolait,margus}@microsoft.com

More information

MIT Specifying Languages with Regular Expressions and Context-Free Grammars

MIT Specifying Languages with Regular Expressions and Context-Free Grammars MIT 6.035 Specifying Languages with Regular essions and Context-Free Grammars Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Language Definition Problem How to precisely

More information

Software Testing IV. Prof. Dr. Holger Schlingloff. Humboldt-Universität zu Berlin

Software Testing IV. Prof. Dr. Holger Schlingloff. Humboldt-Universität zu Berlin Software Testing IV Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer Institute of Computer Architecture and Software Technology FIRST Outline of this Lecture Series 2006/11/24:

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

A Framework for Enforcing Constrained RBAC Policies

A Framework for Enforcing Constrained RBAC Policies A Framework for Enforcing Constrained RBAC Policies Jason Crampton Information Security Group Royal Holloway, University of London jason.crampton@rhul.ac.uk Hemanth Khambhammettu Information Security Group

More information

Action Machines: a Framework for Encoding and Composing Partial Behaviors

Action Machines: a Framework for Encoding and Composing Partial Behaviors Action Machines: a Framework for Encoding and Composing Partial Behaviors Wolfgang Grieskamp Nicolas Kicillof Nikolai Tillmann Revision July 2006 Technical Report MSR-TR-2006-11 Microsoft Research Microsoft

More information

Part I: Preliminaries 24

Part I: Preliminaries 24 Contents Preface......................................... 15 Acknowledgements................................... 22 Part I: Preliminaries 24 1. Basics of Software Testing 25 1.1. Humans, errors, and testing.............................

More information

A Case Study of Model-Based Testing

A Case Study of Model-Based Testing A Case Study of Model-Based Testing Using Microsoft Spec Explorer and Validation Framework Carleton University COMP 4905 Andrew Wylie Jean-Pierre Corriveau, Associate Professor, School of Computer Science

More information

Program Verification (6EC version only)

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

More information

Generating Finite State Machines from SystemC

Generating Finite State Machines from SystemC Generating Finite State Machines from SystemC Ali Habibi, Haja Moinudeen, and Sofiène Tahar Department of Electrical and Computer Engineering Concordia University 1455 de Maisonneuve West Montréal, Québec,

More information

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking Instructor: Tevfik Bultan Buchi Automata Language

More information

Handout 9: Imperative Programs and State

Handout 9: Imperative Programs and State 06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 9: Imperative Programs and State Imperative

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

Synchronization SPL/2010 SPL/20 1

Synchronization SPL/2010 SPL/20 1 Synchronization 1 Overview synchronization mechanisms in modern RTEs concurrency issues places where synchronization is needed structural ways (design patterns) for exclusive access 2 Overview synchronization

More information

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = (

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = ( Floating Point Numbers in Java by Michael L. Overton Virtually all modern computers follow the IEEE 2 floating point standard in their representation of floating point numbers. The Java programming language

More information

Computer Science Technical Report

Computer Science Technical Report Computer Science Technical Report Feasibility of Stepwise Addition of Multitolerance to High Atomicity Programs Ali Ebnenasir and Sandeep S. Kulkarni Michigan Technological University Computer Science

More information

Model checking pushdown systems

Model checking pushdown systems Model checking pushdown systems R. Ramanujam Institute of Mathematical Sciences, Chennai jam@imsc.res.in Update Meeting, IIT-Guwahati, 4 July 2006 p. 1 Sources of unboundedness Data manipulation: integers,

More information

Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines

Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines Uwe Glässer glaesser@upb.de Heinz Nixdorf Institute, Paderborn, Germany Margus Veanes margus@microsoft.com Microsoft

More information

Some notes about Event-B and Rodin

Some notes about Event-B and Rodin Some notes about Event-B and Rodin Résumé This document briefly presents the language event-b and the tool Rodin. For a comprehensive presentation, refer to the event-b page http://www.event-b.org/, the

More information

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Appears as Technical Memo MIT/LCS/TM-590, MIT Laboratory for Computer Science, June 1999 A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Miguel Castro and Barbara Liskov

More information

ARELAY network consists of a pair of source and destination

ARELAY network consists of a pair of source and destination 158 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL 55, NO 1, JANUARY 2009 Parity Forwarding for Multiple-Relay Networks Peyman Razaghi, Student Member, IEEE, Wei Yu, Senior Member, IEEE Abstract This paper

More information

Single-pass Static Semantic Check for Efficient Translation in YAPL

Single-pass Static Semantic Check for Efficient Translation in YAPL Single-pass Static Semantic Check for Efficient Translation in YAPL Zafiris Karaiskos, Panajotis Katsaros and Constantine Lazos Department of Informatics, Aristotle University Thessaloniki, 54124, Greece

More information

1 Introduction. 2 A Glimpse of AsmL. 3 Scenarios in AsmL

1 Introduction. 2 A Glimpse of AsmL. 3 Scenarios in AsmL Scenario-oriented Modeling in AsmL and its Instrumentation for Testing Mike Barnett, Wolfgang Grieskamp, Yuri Gurevich, Wolfram Schulte, Nikolai Tillmann and Margus Veanes Microsoft Research, Foundations

More information

Concurrent Libraries with Foresight

Concurrent Libraries with Foresight Concurrent Libraries with Foresight Guy Golan-Gueta Tel Aviv University ggolan@tau.ac.il G. Ramalingam Microsoft Research grama@microsoft.com Mooly Sagiv Tel Aviv University msagiv@tau.ac.il Eran Yahav

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

More information

Automatic Generation of Graph Models for Model Checking

Automatic Generation of Graph Models for Model Checking Automatic Generation of Graph Models for Model Checking E.J. Smulders University of Twente edwin.smulders@gmail.com ABSTRACT There exist many methods to prove the correctness of applications and verify

More information

On the Definition of Sequential Consistency

On the Definition of Sequential Consistency On the Definition of Sequential Consistency Ali Sezgin Ganesh Gopalakrishnan Abstract The definition of sequential consistency is compared with an intuitive notion of correctness. A relation between what

More information

Designing Views to Answer Queries under Set, Bag,and BagSet Semantics

Designing Views to Answer Queries under Set, Bag,and BagSet Semantics Designing Views to Answer Queries under Set, Bag,and BagSet Semantics Rada Chirkova Department of Computer Science, North Carolina State University Raleigh, NC 27695-7535 chirkova@csc.ncsu.edu Foto Afrati

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs Chapter 3 Asynchronous Models 3.1 Asynchronous Processes Like a synchronous reactive component, an asynchronous process interacts with other processes via inputs and outputs, and maintains an internal

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing Black Box Testing EEC 521: Software Engineering Software Testing Black-Box Testing Test-Driven Development Also known as specification-based testing Tester has access only to running code and the specification

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

Incompatibility Dimensions and Integration of Atomic Commit Protocols

Incompatibility Dimensions and Integration of Atomic Commit Protocols The International Arab Journal of Information Technology, Vol. 5, No. 4, October 2008 381 Incompatibility Dimensions and Integration of Atomic Commit Protocols Yousef Al-Houmaily Department of Computer

More information

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control Automatic synthesis of switching controllers for linear hybrid systems: Reachability control Massimo Benerecetti and Marco Faella Università di Napoli Federico II, Italy Abstract. We consider the problem

More information

Lecture 16: Hierarchical State Machines II

Lecture 16: Hierarchical State Machines II Software Design, Modelling and Analysis in UML Lecture 6: Hierarchical State Machines II 206-0-9 6 206-0-9 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

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

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

More information

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages Lesson 14 Type Checking Collaboration and Management Dana Fisman www.cs.bgu.ac.il/~ppl172 1 Type Checking We return to the issue of type safety we discussed informally,

More information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far Lecture Outline Operational Semantics of Cool Lecture 13 COOL operational semantics Motivation Notation The rules Prof. Aiken CS 143 Lecture 13 1 Prof. Aiken CS 143 Lecture 13 2 Motivation We must specify

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013! Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design i About the Tutorial A compiler translates the codes written in one language to some other language without changing the meaning of the program. It is also expected that a compiler should make the target

More information

CS 512, Spring 2017: Take-Home End-of-Term Examination

CS 512, Spring 2017: Take-Home End-of-Term Examination CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing

More information

Exploring Code with Microsoft Pex

Exploring Code with Microsoft Pex Exploring Code with Microsoft Pex Tutorial for Automated Whitebox Testing for.net Applications Abstract Microsoft Pex 2010 is a Microsoft Visual Studio add-in that provides a runtime code analysis tool

More information

On Code Coverage of Extended FSM Based Test Suites: An Initial Assessment

On Code Coverage of Extended FSM Based Test Suites: An Initial Assessment On Code Coverage of Extended FSM Based Test Suites: An Initial Assessment Khaled El-Fakih 1, Tariq Salameh 1, and Nina Yevtushenko 2 1 American University of Sharjah, Sharjah, UAE {Kelfakih,b00046306}@aus.edu

More information

6. Hoare Logic and Weakest Preconditions

6. Hoare Logic and Weakest Preconditions 6. Hoare Logic and Weakest Preconditions Program Verification ETH Zurich, Spring Semester 07 Alexander J. Summers 30 Program Correctness There are many notions of correctness properties for a given program

More information

Motivation State Machines

Motivation State Machines Motivation State Machines Generating test cases for complex behaviour Textbook Reading: Chapter 7 We are interested in testing the behaviour of object-oriented software systems Behaviour: Interactions

More information

Assignment 4 CSE 517: Natural Language Processing

Assignment 4 CSE 517: Natural Language Processing Assignment 4 CSE 517: Natural Language Processing University of Washington Winter 2016 Due: March 2, 2016, 1:30 pm 1 HMMs and PCFGs Here s the definition of a PCFG given in class on 2/17: A finite set

More information

Rewriting Models of Boolean Programs

Rewriting Models of Boolean Programs Rewriting Models of Boolean Programs Javier Esparza University of Stuttgart Joint work with Ahmed Bouajjani Automatic verification using model-checking Initiated in the early 80s in USA and France. 25

More information

Test Cases Generation from UML Activity Diagrams

Test Cases Generation from UML Activity Diagrams Eighth ACIS International Conference on Software Engineering, Artificial Intelligence, Networking, and Parallel/Distributed Computing Test Cases Generation from UML Activity Diagrams Hyungchoul Kim, Sungwon

More information

Why. an intermediate language for deductive program verification

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

More information

Automated Formal Methods for Embedded Systems

Automated Formal Methods for Embedded Systems Automated Formal Methods for Embedded Systems Bernd Finkbeiner Universität des Saarlandes Reactive Systems Group 2011/02/03 Bernd Finkbeiner (UdS) Embedded Systems 2011/02/03 1 / 48 Automated Formal Methods

More information

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State 24 Petri Nets Author: College. Robert A. McGuigan, Department of Mathematics, Westfield State Prerequisites: The prerequisites for this chapter are graphs and digraphs. See Sections 9.1, 9.2, and 10.1

More information

How useful is the UML profile SPT without Semantics? 1

How useful is the UML profile SPT without Semantics? 1 How useful is the UML profile SPT without Semantics? 1 Susanne Graf, Ileana Ober VERIMAG 2, avenue de Vignate - F-38610 Gières - France e-mail:{susanne.graf, Ileana.Ober}@imag.fr http://www-verimag.imag.fr/~{graf,iober}

More information

Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux

Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux Give your application the ability to register callbacks with the kernel. by Frédéric Rossi In a previous article [ An Event Mechanism

More information

Leveraging Data Invariants in Model Inference for Test Case Generation

Leveraging Data Invariants in Model Inference for Test Case Generation Leveraging Data Invariants in Model Inference for Test Case Generation Roykrong Sukkerd Abstract Testing is an effective mean to find bugs in systems, but manually writing test cases is often tedious.

More information

Optimizing Finite Automata

Optimizing Finite Automata Optimizing Finite Automata We can improve the DFA created by MakeDeterministic. Sometimes a DFA will have more states than necessary. For every DFA there is a unique smallest equivalent DFA (fewest states

More information

Top Down Design vs. Modularization

Top Down Design vs. Modularization 6.170 Quiz Review Topics: 1. Decoupling 2. 3. AF & RI 4. Iteration Abstraction & Iterators 5. OMs and Invariants 6. Equality, Copying, Views 7. 8. Design Patterns 9. Subtyping 10. Case Studies Decomposition

More information

A Framework for Testing AIS Implementations

A Framework for Testing AIS Implementations A Framework for Testing AIS Implementations Tamás Horváth and Tibor Sulyán Dept. of Control Engineering and Information Technology, Budapest University of Technology and Economics, Budapest, Hungary {tom,

More information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 8 Overview of software testing Wednesday Feb 8, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/53 Lecture outline Testing in general Unit testing

More information

Models of concurrency & synchronization algorithms

Models of concurrency & synchronization algorithms Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu

More information

Introduction to Software Testing Chapter 4 Input Space Partition Testing

Introduction to Software Testing Chapter 4 Input Space Partition Testing Introduction to Software Testing Chapter 4 Input Space Partition Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 4 : Input Space Coverage Four Structures for Modeling

More information

Lecture 6. Abstract Interpretation

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

More information

Invariant Based Programming

Invariant Based Programming Invariant Based Programming Ralph-Johan Back Abo Akademi and TUCS June 2006 Constructing correct programs: alternative approaches A posteriori correctness proof (Floyd, Naur, Hoare,...). Prove correctness

More information

A Semantics to Generate the Context-sensitive Synchronized Control-Flow Graph (extended)

A Semantics to Generate the Context-sensitive Synchronized Control-Flow Graph (extended) A Semantics to Generate the Context-sensitive Synchronized Control-Flow Graph (extended) Marisa Llorens, Javier Oliver, Josep Silva, and Salvador Tamarit Universidad Politécnica de Valencia, Camino de

More information

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao 6th International Conference on Information Engineering for Mechanics and Materials (ICIMM 2016) Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa,

More information

A Michael Jackson presentation. CSE503: Software Engineering. The following slides are from his keynote at ICSE 1995

A Michael Jackson presentation. CSE503: Software Engineering. The following slides are from his keynote at ICSE 1995 A Michael Jackson presentation CSE503: Software Engineering The following slides are from his keynote at ICSE 1995 David Notkin University of Washington Computer Science & Engineering Spring 2006 1 2 3

More information

A Catalog of While Loop Specification Patterns

A Catalog of While Loop Specification Patterns A Catalog of While Loop Specification Patterns Aditi Barua and Yoonsik Cheon TR #14-65 September 2014 Keywords: functional program verification, intended functions, program specification, specification

More information

CS4215 Programming Language Implementation. Martin Henz

CS4215 Programming Language Implementation. Martin Henz CS4215 Programming Language Implementation Martin Henz Thursday 26 January, 2012 2 Chapter 4 The Language simpl In this chapter, we are exting the language epl in order to provide a more powerful programming

More information

Composing Distributed Fault-tolerance Components

Composing Distributed Fault-tolerance Components Composing Distributed Fault-tolerance Components Sandeep S. Kulkarni Karun N. Biyani Umamaheswaran Arumugam Department of Computer Science and Engineering Michigan State University East Lansing, MI 48824

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

Solutions to Homework 10

Solutions to Homework 10 CS/Math 240: Intro to Discrete Math 5/3/20 Instructor: Dieter van Melkebeek Solutions to Homework 0 Problem There were five different languages in Problem 4 of Homework 9. The Language D 0 Recall that

More information

Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines

Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines Universal Plug and Play Machine Models Modeling with Distributed Abstract State Machines Uwe Glasser glaesser@upb.de Heinz Nixdorf Institute, Paderborn, Germany Margus Veanes margus@microsoft.com Microsoft

More information

Module 11. Directed Graphs. Contents

Module 11. Directed Graphs. Contents Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................

More information

SOFTWARE ENGINEERING DESIGN I

SOFTWARE ENGINEERING DESIGN I 2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far.

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far. Lecture Outline Operational Semantics of Cool COOL operational semantics Motivation Adapted from Lectures by Profs. Alex Aiken and George Necula (UCB) Notation The rules CS781(Prasad) L24CG 1 CS781(Prasad)

More information

Consistency and Set Intersection

Consistency and Set Intersection Consistency and Set Intersection Yuanlin Zhang and Roland H.C. Yap National University of Singapore 3 Science Drive 2, Singapore {zhangyl,ryap}@comp.nus.edu.sg Abstract We propose a new framework to study

More information

A Transactional Model and Platform for Designing and Implementing Reactive Systems

A Transactional Model and Platform for Designing and Implementing Reactive Systems A Transactional Model and Platform for Designing and Implementing Reactive Systems Justin R. Wilson A dissertation presented to the Graduate School of Arts and Sciences of Washington University in partial

More information

Chapter S:V. V. Formal Properties of A*

Chapter S:V. V. Formal Properties of A* Chapter S:V V. Formal Properties of A* Properties of Search Space Graphs Auxiliary Concepts Roadmap Completeness of A* Admissibility of A* Efficiency of A* Monotone Heuristic Functions S:V-1 Formal Properties

More information

CS4215 Programming Language Implementation. Martin Henz

CS4215 Programming Language Implementation. Martin Henz CS4215 Programming Language Implementation Martin Henz Thursday 15 March, 2012 2 Chapter 11 impl: A Simple Imperative Language 11.1 Introduction So far, we considered only languages, in which an identifier

More information

A model of navigation history

A model of navigation history A model of navigation history Connor G. Brewster Alan Jeffrey August, 6 arxiv:68.5v [cs.se] 8 Aug 6 Abstract: Navigation has been a core component of the web since its inception: users and scripts can

More information