3. Networks of automata

Size: px
Start display at page:

Download "3. Networks of automata"

Transcription

1 3. Networks of automata Suppose that we need to model a traffic light system consisting of n traffic lights and a controller that has the obligation to guarantee that the complete system behaves safely (as long as drivers and automobiles behave as prescribed by the traffic lights). The state of the system can be characterized as a combination of the states of the contained traffic lights. For a traffic light with k different states (usually k equals two or three) this results in k n locations! When applying a model-based systems engineering approach to the development of supervisory controllers for high-tech systems, a similar situation is encountered. Often the system that needs to be controlled consists of a large number of subsystems or components. As an example consider bagage handling systems as described in [Swa17] that consist of hundreds of conveyor belts and other components. It is much more convenient (and desirable) to provide separate models for each of these constituent parts of the system than to attempt to provide a single automaton model for the combination of all of these parts. To ease the modelling of such a system we introduce networks of automata. A network of automata consists of a finite collection of automata. These automata may share events and variables. The automata in a network execute simultaneously. They interact with each other by synchronizing on shared events and by the shared use of variables. These forms of interaction will be discussed in more detail in the first two sections. 3.1 Synchronization of events Events that are used in multiple automata, must synchronize. That is, if one of those automata performs a transition for that event, the other automata must also participate by performing a transition for that same event. If one of the automata that uses the event cannot perform a transition in its current state, the network as a whole cannot perform a transition for that event. To illustrate this, consider the following example. Example 3.1 The automaton in the left of Figure 3.1 represents a producer of products, to be consumed by a consumer. The producer automaton starts in its producing location, in which it produces a product. Once the product has been produced, indicated by the produce event, the automaton will be in its idle location, where it waits until it can provide the produced product to the consumer (the event provide is used for modelling this). Once it has provided the product to the consumer, it will once again be producing another product.

2 38 Chapter 3. Networks of automata produce provide Producing Idle Idle Consuming provide consume Figure 3.1: Automata that synchronize on events. The event provide is shared between the automata and therefore will only be executed when both automata allow this. Consider also the automaton for the consumer given in the right of Figure 3.1. This second automaton represents a consumer that consumes products. The consumer is initially idle, waiting for a product from the producer. Once the producer has provided a product, the consumer will be consuming. Once it has consumed the product, as indicated by the occurrence of the consume event, it will become idle again. The specification has three events: the produce and provide events are used in the producer automaton, and the provide and consume events are used in the consumer automaton. The automata share the provide event. Now, let us take a closer look at the behavior of the network consisting of the producer and consumer automata. Initially, the producer automaton is in its producing location, and the consumer automaton is in its idle location. Since the producer is the only automaton that uses the produce event, and there is an (outgoing) edge in its current location for that event, the producer can go to its idle location by means of that event. Both the producer and consumer use the provide event. Initially, the producer has no edge with that event in its producing location, while the consumer does have an edge for that event in its idle location. Since events must synchronize, and the producer cannot participate, the event cannot occur at this time. This is what we expect, as the producer has not yet produced a product, and can thus not yet provide it to the consumer. The consumer will have to remain idle until the producer has produced a product and is ready to provide it to the consumer. The producer blocks the provide event in this case, and is said to disable the event. The event is not blocked by the consumer, and is thus said to be enabled in the consumer automaton. In the entire network, the event is disabled as well, as it is disabled by at least one of the automata of the network, and all automata must enable the event for it to become enabled in the network. The only behavior that is possible, is for the producer to produce a product, and go to its idle location. The consumer does not participate and remains in its idle location. Both automata are then in their idle location, and both have an edge that enables the provide event. As such, the provide event is enabled in the network. As this is the only possible behavior, a transition for the provide event is performed. This results in the producer going back to its producing location, while at the same time the consumer goes to its consuming location. In its producing location, the producer can produce a product. Furthermore, in its consuming location, the consumer can consume a product. Two transitions are possible; either one can be performed. No assumptions should be made either way. In other words, both transitions represent valid behavior, as described by this specification. Since only one transition can be taken at a time, there are two possibilities. Either the producer starts to produce the product first, and the consumer starts to consume after that, or the other way around. Once both transitions have been taken, we are essentially in the same situation as we were after the producer produced a product the first time, as both automata will be in their idle locations again. The behavior of the network then continues to repeat forever. However, for each repetition different choices in the order of production and consumption can be made.

3 3.1 Synchronization of events 39 Exercise 3.1 Guided by your intuition, provide a single automaton that expresses the same behaviour as the network of automata from the previous example. R As we will see later, in Section 3.4, for any network of automata, we can give a single automaton that defines the same behaviour in the sense of (marked) language equivalence. By using multiple automata, the producer and consumer were modeled independently, allowing for separation of concerns. This is an important concept, especially when modeling larger systems. In general, the large system is decomposed into parts, usually corresponding to physical entities. Each of the parts of the system can then be modeled in isolation, with little regard for the other parts. Note that it is of course very important to make proper decisions on which events are to be shared between the automata! By using synchronizing events, the different automata that model different parts of a system, can interact. This allows for modeling of the connection between the different parts of the system, ensuring that together they represent the behavior of the entire system. Exercise 3.2 Provide a network of automata for the two traffic light system discussed before in Exercise 2.7, where each traffic light and the controller are modelled by means of a separate automaton. Exercise 3.3 Consider a system consisting of two users, U 1 and U 2, and two shared resources, R 1 and R 2. User U i needs both resources to perform a task (represented by a i,b i ). After the task completion, the resources are released (represented by r i ). Provide an automaton for each of the users and each of the resources. Exercise 3.4 Recall Exercise 2.9 about the dining philosophers. Develop a model of the system where each philosopher and each fork is modelled as a separate automaton. As we have seen in Exercise 2.46 there is a deadlock in this system. Add an automaton that prevents the deadlock from occurring while maintaining all other behaviour of the system. Later in Exercise 3.29 you will use CIF to simulate the model in order to establish if you have succeeded in removing the deadlock situation(s). Exercise 3.5 Pump-valve-controller system, adapted from [CL99, Example 2.25]. Consider a heating system consisting of a pump, a valve, and a controller. In Figure 3.2 the models of the pump and the valve are shown. The model for the valve contains states VC and VO representing the situations that the valve is closed and open, respectively. Additionally, the states SO and SC represent that the valve is stuck when open or closed. The events are easily understood by their names. The model for the pump should be straightforward. Develop a model of a controller that may use the events open_valve, close_valve, start_pump, and stop_pump and that prevents that the pump is operating while the valve is closed. Exercise 3.6 For the pump-valve-controller system of the previous exercise, model a valve flow sensor. It may be assumed that the sensor is discretized to two possible values, namely flow and no_flow. First, establish under what conditions the valve flow sensor should report a flow event and in which circumstances it must report a no_flow event. Exercise 3.7 The wolf, the goat, and the cabbage. A man once had to travel with a wolf, a goat and a cabbage. He had to take good care of them, since the wolf would like to taste a piece of goat if he would get the chance, while the goat appeared to long for a tasty cabbage. After some traveling, he

4 40 Chapter 3. Networks of automata close_valve stop_pump VC stuck_closed SC Poff open_valve stuck_open stuck_closed stop_pump start_pump close_valve SO stuck_open VO Pon open_valve start_pump Figure 3.2: Automata for the valve and the pump. suddenly stood before a river. This river could only be crossed using the small boat laying nearby at a shore. The boat was only good enough to take himself and one of his loads across the river. The other two subjects/objects he had to leave on their own. How must the man row across the river back and forth, to take himself as well as his luggage safe to the other side of the river, without having one eating another? Provide a model that allows all safe behaviour! Now etend the model to deal also with two additional pieces of luggage - a stick and fire! In addition to the restrictions mentioned before, if the stick and the wolf are left on their own, the stick will beat the wolf! If the fire and the stick are left on their own, the fire will burn the stick! Exercise 3.8 Consider a lift moving products in a warehouse to the next floor. An electric motor is used to control the lift. The motor can move the lift upwards with event move_up, move the lift downwards with event move_down, or stop the lift with stop. The position of the lift is measured with two sensors L and H. L is located at the lowest position of the lift and H is located at the highest position. The sensors will turn on with events L_on and H_on when the lift is at the location of the corresponding sensor, and turn off with events L_off and H_off when the lift is not at the sensor. Provide an automaton model for the actuator and each sensor. Furthermore, include the sensor events in the actuator model to restrict the behavior to only physically possible behavior of the sensors. Exercise 3.9 A workcell consists of two machines M 1 and M 2, and robot arm RA. Machine M 1 receives workpieces from an input bin (event in). After processing, the robot arm takes the workpiece from M 1 (event pick 1 ), moves to M 2 (event move 12 ), delivers the workpiece to M 2 (event drop 2 ) and moves back (event move 21 ). After processing, machine M 2 sends workpieces to an output bin (event out). For both machines holds that if a new workpiece is delivered while they are busy, this workpiece is rejected (events reject 1 and reject 2 ). Define corresponding automata models.

5 3.2 Shared variables 41 Exercise 3.10 Workcell with a test unit. Consider a workcell consisting of two machines M 1 and M 2, buffer B and test unit TU, schematically represented below. M 1 B M 2 TU Machine M 1 receives workpieces from an input bin (event start_m 1 ). After processing, machine M 1 sends a workpiece to buffer B (event end_m 1 ). Two-place buffer B receives a workpiece either from M 1 or from the test unit TU (event to_b). From the buffer, workpieces are transferred to M 2 (event start_m 2 ). After processing, machine M 2 sends workpieces to the test unit TU (event end_m 2 ). From the test unit, workpieces are transferred either to the buffer (event to_b) or to an output conveyor (event to_c). Model the four workcell components as automata. Exercise 3.11 Transmitters. System T to be controlled consists of two transmitters T 1 and T 2 modelled over alphabet Σ i = {a i,s i,t i,r i }, for i = 1,2. Events: a i denotes arrival of a message to be transmitted s i denotes the start of message transmission t i denotes timeout in case the transmitted message is not acknowledged r i denotes reset for transmission of a subsequent message An unacknowledged message is retransmitted after timeout. New messages that arrive while a previous message is being processed are ignored. First, provide a model for each transmitter. Are there any shared events in these automata? Now add a model of a shared medium. That is, it is assumed that both transmitters use the same medium for transmitting their messages. In case a transmitter is willing to start a ransmission while the medium is occupied it will wait until the medium is available. The medium has a capacity of one message only. Exercise 3.12 Three servers. Can you improve on your model for the three server system from Exercise 2.12 by modeling it as a network of automata (without variables)? 3.2 Shared variables As mentioned in the introduction of this chapter, variables can be shared between the automata involved in a network of automata. In the type of networks we consider, a variable is local to one automaton. This means that the variable may only be assigned (given a value, written) by that automaton. All variables may however be inspected (read) by all automata in the network. Consider the following example. Example 3.2 Supermarket. We model some aspects of a supermarket checkout, namely the arrival of customers and their queueing behaviour with respect to two queues. Customers arrive and enter either of the queues. Eventually customers leave the queue. For modelling this system three automata are considered, one for each queue and one for the customer arrival process. Both queues (automata queue1 and queue2) are identical, except for their names and the names of the events

6 42 Chapter 3. Networks of automata used in those automata 1. Each queue maintains a variable count, which represents the number of customers in the queue. Note that these are different variables! A queue is full if it contains two customers. Customers can thus only enter a queue if less than two customers are present. Similarly, it is only possible for a customer to leave a queue if there is a customer in the queue. Customers decide to which queue they go, based on the number of customers already present in those queues. A customer only enters the first queue if that queue has less than or the same number of customers as the second queue. Similarly, a customer only enters the second queue if that queue has less than or the same number of customers as the first queue. If the queues have the same number of customers, the customer can choose either queue. The three automata are given in Figure 3.3. The event q1enter is used in automata queue1 and customer. The event is thus only possible (enabled) if both automata can participate. Both automata restrict the occurrence of the event using a guard. The event is thus only enabled if both guards hold. That is, a customer never enters the first queue if it is full, but it also never enters that queue if it has more customers than the second queue. The customer automaton uses the values of the variables of the queue automata, and thus reads variables of other automata. This is allowed, due to the global read concept. This concept allows for guards, that directly and intuitively represent the condition under which an event may take place. In the guard the variable count of automaton queue1 is referred to by prefixing the variable name with the automaton name, i.e., queue1.count refers to variable count of automaton queue1. count < 2 q1enter count := count + 1 count < 2 q2enter count := count + 1 queue1.count queue2.count q1enter count = 0 count = 0 count > 0 q1leave count := count 1 count > 0 q2leave count := count 1 queue2.count queue1.count q2enter Figure 3.3: Network of automata for the supermarket. From left to right these automata are named queue1, queue2, and customer. The global read concept should only be used when it is intuitive. In the supermarket example, the customer can physically see how many customers are in the queues. It is therefore intuitive to directly refer to the count variables of the queue automata. If however the customer would not be able to physically observe the queues, then the customer would not be able to directly base its decision of which queue to join on that information. In that latter case, it may not be a good idea to model the guard in such way. The local write concept means that a variable can only be written by the automaton in which it is declared. It is not allowed for the automata customer and queue2 to write (change the value of) the variable count of the automaton queue1. Only automaton queue1 may write that variable. The local write concept prevents that multiple automata write to the same variable, as part of a synchronizing event, potentially causing conflicting values to be assigned to that variable. This leads to several benefits, most notably simpler semantics. 1 CIF offers features for reuse and parameterization of automata. However these are beyond the scope of this course. The online language tutorial contains all the relevant information:

7 3.2 Shared variables 43 R In the tool Supremica ( variables are used that are declared globally and may be written and read in every automaton. From the perspective of modelling discrete-event systems and synthesizing supervisory controllers, Supremica may be considered an interesting alternative for CIF. In theory, each and every variable needs to be declared explicitly. However, it will turn out te be very convenient to be able to check whether or not another automaton is in a particular state in guards. Therefore, we assume the presence of Boolean variables that indicate whether an automaton is in a specific location. More concretely, for any automaton with name A and location l within that automaton we assume the existence of a Boolean variable A.l that is true if automaton A is in location l, and false otherwise. These location variables are never explicitly updated in the automata. Example 3.3 Consider the two automata given in Example 3.1. Suppose we want to adapt the condition of the event produce from the provider automaton in order to prevent it from being taken in cases where the consumer automaton is not yet in location Idle. With the location variables just introduced this amounts to adding the guard consumer.idle to the produce event. Exercise 3.13 For the pump-valve-controller system, as discussed in Exercise 3.6, model a valve flow sensor. This time collect the resulting value in a variable flow. Figure 3.4: Schematic representation of the ATM and bank system. Exercise 3.14 Exam 2014/10/28. Model a system consisting of an ATM and a bank. In Figure 3.4 the events that are used to describe interactions between these systems are depicted. No other events may be used! Provide one automaton for the ATM and one for the bank. It is not needed to model the user. Your model of the ATM should be able to repeatedly handle the interactions with the user in the same order as depicted in the picture from top to bottom. Model the exchange of the bank card just as the occurrence of an event bank_card. Upon receipt of a request, the ATM may inspect a variable User.request_amount to obtain the amount that the user wants to withdraw from his account. The ATM asks the bank for permission. The bank uses the same variable from the user to get to know the amount of money the user wants to withdraw and checks with respect to the users balance (stored in variable balance) if this is still possible without ending up with a negative balance. The bank replies to the ATM with either OK or not_ok. The ATM returns the bank card and provides the cash (by means of the event cash). There is no need to model the amount of cash in the ATM or in the possession of the user. Exercise 3.15 Traffic system [CL99, Exercise 3.28]. Consider the traffic system shown in Figure 3.5. There are two vehicles, denoted by a and b, that must go from the origin to the destination. The road is divided into four sections, numbered 1-4. There are traffic lights at the entrances of sections 1 and 4. There are vehicle detectors at the entrances of sections 1, 3, and 4 and at the destination. Let events x i (for x = a,b and i = 1,...,5) denote that vehicle x enters section i, where section 5 is the destination. Develop a model for a controller that guarantees that (i) the two vehicles must reach

8 44 Chapter 3. Networks of automata Figure 3.5: Traffic system; schematic representation. the destination, and (ii) only one vehicle can be in a road section at any given time (in order to avoid collisions). You may assume that vehicle x (for x = a,b) can only perform the sequence of events x 1 x 2 x 3 x 4 x 5 (for x = a,b). The controller may only use the events x 1, x 3, x 4 and x 5 (for x = a,b). Take care that your controller does not prevent the events a 3 and b 3 from happening since there is no traffic light at the start of section 3. Is your controller more restrictive than necessary? Exercise 3.16 Three servers. Can you improve on your model for the three server system from Exercise 2.12 by modeling it as a network of automata using variables? Exercise 3.17 Manufacturing system [Oue+11]. Consider a system consisting of three machines M 1, M 2, and M 3, working on parts stored in two buffers B 1 and B 2 of size 16 and 8, respectively. Parts are supplied through an input buffer IN (of infinite size) and stored after being processed in two output buffers OUT 1 and OUT 2 (of infinite size). The system operates as follows: M 1 supplies B 1 with parts taken from the input buffer IN; M 2 takes a part from B 2 and after processing puts it either in OUT 1 or in B 1 ; and M 3 takes a part from B 1 and after processing puts it either in OUT 2 or in B 2. Provide a network of automata that models all possible movement of parts between these subsystems. There is no need to discriminate between parts. Exercise 3.18 Manufacturing system [MMF13]. Model the following manufacturing system that consists of four machines M 1, M 2, M 3, and M 4, linked by three buffers B 1, B 2, and B 3. Workpieces are processed by M 1 (event s 1 ) and then placed into B 1 ( f 1 ), then they go to M 2 (s 2 ) and are placed into B 2 ( f 2 ). From B 2, the workpieces go to M 3 for final processing (s 3 ) and then M 3 outputs them from the system ( f 3 ). Additionally, M 4 takes workpieces from outside the system (s 4 ), processes them and sends them either to M 2 or M 3 through B 1 (event re) and B 3 (events f 3 for transport to the buffer and s 34 for transport from buffer to machine), respectively. Provide a network of automata that models all possible movement of parts between these subsystems. There is no need to discriminate between parts. Exercise 3.19 A customer C orders a product at a plant P. The plant passes the order to the manufacturer M. The manufacturer makes the product and gives it to the transporter T. The transporter delivers the product to the customer, unless something goes wrong in transport. If this occurs, this is reported to P, who will take care of the production of a new product. Provide a model for this system. How many products can be in production in this system? How should the specification be changed to increase this number of products in production?

9 3.3 Open automata 45 Exercise 3.20 Manufacturing process [CL99, Exercise 2.39]. A simple manufacturing process involves two machines, M 1 and M 2, and a buffer B in between. There is an infinite supply of parts to M 1. When a part has finished processing at M 1, it is placed in B, which has a capacity of one part only. The part is subsequently processed by M 2. Each machine has three states I (Idle), P (Processing), and D (Down). Each machine has four transitions: see Figure 3.6 for the automata. Explain why the two machines use different event names! Give a separate controller for each of the following requirements: M 1 can only begin processing if the buffer is empty; M 2 can only begin processing if the buffer is full; M 1 cannot begin processing if M 2 is down; If both machines are down, then M 2 gets repaired first. Can you establish whether the system consisting of all these automata has deadlock? start_m 1 breakdown_m 1 start_m 2 breakdown_m 2 I P D end_m 1 repair_m 1 I P D end_m 2 repair_m 2 end_m 1 E F start_m 2 Figure 3.6: Network of automata for the simple manufacturing system consisting of automata for two machines and one buffer. Exercise 3.21 Extended Workcell with a test unit. Adopt your model from Exercise 4.5 to allow for multiple workpieces in each machine, and in the buffer. Assume that the capacities of the machines are given by some constant C 1 and C 2 and that the buffer may contain C B workpieces. 3.3 Open automata As mentioned in the previous section we will use automata that allow two types of variables: local variables that may only be assigned by that automaton, and external variables that may be read by the automaton. We thus need to adapt Definition of automata. As we have seen before in Example 3.2 different automata may use the same local variable name. Both the automata queue1 and queue2 use a local variable count. To differentiate between these in mathematical representations we will always prefix local variables with the name of the automaton they are local to. Thus, for the purpose of mathematical description we would first transform the automata for the queues from Figure 3.3 into the following automata: Definition Open automaton. An open automaton is a 8-tuple (L,V,X,E,,L m,l,v) where L is a finite set of locations; V is a finite set of local variables; X is a finite set of variables (V X);

10 46 Chapter 3. Networks of automata queue1.count < 2 q1enter queue1.count := queue1.count + 1 queue2.count < 2 q2enter queue2.count := queue2.count + 1 queue1.count = 0 queue2.count = 0 queue1.count > 0 q1leave queue1.count := queue1.count 1 queue2.count > 0 q2leave queue2.count := queue2.count 1 Figure 3.7: Transformed versions of automata queue1 and queue2 from Figure 3.3. E is a finite set of events; L G(X) E U(V, X) L is the transition relation; L m L is a set of marked states; l L is the initial location; v : V Λ is the initial valuation of the local variables. The notation U(V,X) represents the set of all updates of variables from the set V where variables from X may be used in the right-hand sides of the updates. The set of variables X \V is referred to as the (set of) external variables. Observe that an open automaton where X = V is just an automaton in the style of Definition Definition Network of automata. Let I be an arbitrary index set. A network of automata is a collection of open automata M i =(L i,v i,x i,e i, i,l mi,l i,v i ) for i I, with pairwise disjoint sets of local variables V i such that V i = X i, i.e., each global / external variable of an open automaton is local to exactly one of the contained open automata. i I i I Example 3.4 Consider the (transformed) network of automata for the supermarket from Figures 3.3 and 3.7. The automaton queue1 has set of local variables {queue1.count} and automaton queue2 has set of local variables {queue2.count}. Both of these automata have no additional variables. The automaton customer has no local variables and has set of variables {queue1.count,queue2.count}. The specification of the other components of the 8-tuples representing the automata follows the same lines as before with the difference that also there the full names of the variables are used. R Our graphical representations usually only show the local and external variables that actually occur in guards and updates. It may be the case that a local variable is declared in some automaton and not used in any of the guards or updates. In such cases this will be mentioned explicitly. We thus assume that the sets of local variables and variables are always the sets of variables mentioned in the guards and updates, unless stated otherwise. 3.4 Synchronous composition of automata Networks of automata were motivated from the point of view that describing larger systems with a single automaton is inconvenient. In principle, nevertheless, a single automaton is represented by such a network of

11 3.4 Synchronous composition of automata 47 automata. In this section we define how to obtain a single automaton representing a network of automata. Thereto, first the synchronous product of two open automata is defined. Definition Synchronous product. Given two open automata M 1 =(L 1,V 1,X 1,E 1, 1,L m1,l 1,v 1 ) and M 2 =(L 2,V 2,X 2,E 2, 2,L m2,l 2,v 2 ), the synchronous product of these, denoted by M 1 M 2, is given by the open automaton (L,V,X,E,,L m,l,v) where L = L 1 L 2 V = V 1 V 2 X = X 1 X 2 E = E 1 E 2 is defined as the smallest relation that is defined by the following deduction rules: if σ E 1 E 2, then ((s 1,s 2 ),g 1 g 2,σ,u 1 u 2,(t 1,t 2 )) for each (s 1,g 1,σ,u 1,t 1 ) 1 and (s 2,g 2,σ,u 2,t 2 ) 2 such that u 1 (x)=u 2 (x) for all x dom(v 1 ) dom(v 2 ) if σ E 1 \ E 2, then ((s 1,s 2 ),g 1,σ,u 1,(t 1,s 2 )) for each (s 1,g 1,σ,u 1,t 1 ) 1 if σ E 2 \ E 1, then ((s 1,s 2 ),g 2,σ,u 2,(s 1,t 2 )) for each (s 2,g 2,σ,u 2,t 2 ) 2 L m = L m1 L m2 l =(l 1,l 2 ) { v 1 (x), for x dom(v 1 ) v : V Λ is defined as follows: v(x)= v 2 (x) otherwise R Note that in order to respect our naming convention for the variables, we need to replace all prefixes of the local variables of the involved automata with the name of the resulting automaton. Note that v is well-defined since the sets of local variables of the automata, i.e., V 1 and V 2, are disjoint. This is a consequence of our naming convention for variables! For updates u 1 and u 2 in the above definition the following notation has been used: u 1 u 2 denotes the update with domain dom(u 1 ) dom(u 2 ) that is defined as follows: { u 1 (x), if x dom(u 1 ) (u 1 u 2 )(x)= u 2 (x), otherwise. Note that in our graphical representations the combination of two updates just means that the updates are both put on the edge! Example 3.5 Consider the two automata given in Example 3.1. The synchronous product of these two automata is given graphically by Producing Idle produce Idle Idle consume provide consume Producing Consuming produce Idle Consuming

12 48 Chapter 3. Networks of automata The locations of this resulting automaton are formally represented by the set {(Producing,Idle), (Idle,Idle), (Producing,Consuming), (Idle,Consuming)}. Graphically we just listed the two original location names in the location. Example 3.6 Consider the automata queue1 and customer from Example 3.2. The synchronous product of these automata results in the following automaton. queue1.count < 2 queue1.count queue2.count q1enter queue1.count := queue1.count + 1 queue1.count > 0 q1leave queue1.count := queue1.count 1 queue1.count = 0 queue2.count queue1.count q2enter queue2.count := queue2.count + 1 Exercise 3.22 Consider the following automaton, named Sem. get 1 2 put Compute the synchronous product of automaton Sem with itself, i.e., Sem Sem. Based on the result of the previous exercise you may be tempted to believe that for any automaton M we have that the synchronous product of M with itself is very similar to M itself. The next exercise challenges you to prove that this is not the case. Exercise 3.23 Provide an automaton M for which the marked languages of M and M M are different. Exercise 3.24 The first buffer has capacity C 1 and the second buffer has capacity C 2. Items arrive in the first buffer using the event in1 and leave this buffer via event out1in2. Similarly, items arrive in the second buffer using the event out1in2 and leave this buffer via event out2. Provide automata models for two buffers. Conmpute the synchronous product of the two buffers. Exercise 3.25 Compute the synchronous product of the automata used for the ATM and the bank from Exercise In Chapter 2 the meaning of an automaton was presented in terms of the (marked) language accepted by that automaton. The meaning of a network of automata is also defined to be a set of strings. The (marked) language of a network of automata is the (marked) language of the automaton that results from computing the synchronous product of all involved open automata. Sometimes, we simply call the automaton that results from the computation of this synchronous product the semantics of the network. Example 3.7 Consider the network of automata from Example 3.2. The synchronous product of these

13 3.5 Tool support for networks of automata in CIF 49 three automata results in the following automaton. Note how the guards of the shared event q1enter from the two automata are combined. queue1.count < 2 queue1.count queue2.count q1enter queue1.count := queue1.count + 1 queue1.count > 0 q1leave queue1.count := queue1.count 1 queue1.count = 0 queue2.count = 0 queue2.count < 2 queue2.count queue1.count q2enter queue2.count := queue2.count + 1 queue2.count > 0 q2leave queue2.count := queue2.count 1 Exercise 3.26 Compute the synchronous product of the machine and buffer automata from Exercise Exercise 3.27 Consider the four automata from your answer of Exercise 3.3. Compute the synchronous product of these automata. Establish if the system has deadlock. Can you provide an additional automaton (that only uses the events for claiming the resources) that, when composed with the computed synchronous product, prevents all deadlock situations and still allows the users to make use of the resources. Exercise 3.28 Provide a single automaton model for the supermarket from Example Tool support for networks of automata in CIF A network of automata is just modelled in CIF by putting all the involved automata in a single CIF model. Example 3.8 The CIF model representing the network of automata for the supermarket checkout from Example 3.2 is as follows: 1 event q1enter, q1leave, q2enter, q2leave; 2 3 automaton queue1: 4 disc int count = 0; 5 location l0: 6 initial; 7 edge q1enter when count < 2 do count := count + 1; 8 edge q1leave when count > 0 do count := count - 1; 9 end automaton queue2: 12 disc int count = 0; 13 location l0: 14 initial; 15 edge q2enter when count < 2 do count := count + 1; 16 edge q2leave when count > 0 do count := count - 1; 17 end automaton customer: 20 location l0:

14 50 Chapter 3. Networks of automata 21 initial; 22 edge q1enter when queue1.count <= queue2.count; 23 edge q2enter when queue2.count <= queue1.count; 24 end For computing the synchronous product of automata without variables CIF has the option Apply synchronous product... (again the keyword event may not be used and should be replaced by controllable or uncontrollable). The CIF tool set has two functions for replacing a network of automata with a single automaton. Neither of these computes the synchronous product as defined in this chapter. Exercise 3.29 Use CIF to simulate the model from Exercise 3.4 in order to establish if you have succeeded in removing the deadlock situation(s). Exercise 3.30 Pump-valve-controller system, adapted from [CL99, Example 2.25]. Consider a heating system consisting of a pump, a valve, and a controller as modelled in Exercise 3.5. Simulate your model to gain confidence in your solution. 3.6 Additional modelling exercises Exercise 3.31 Tic tac toe. Team up with one of your fellow students for this exercise in which you will need to provide a model for the game of tic tac toe. 1. First develop a model in which each possible placement of cross and circle is present. 2. Divide the roles of cross-player and circle-player. Develop an automaton for the player that is assigned to you. 3. Combine the automaton or automata representing the board with the player automata and play the game. 4. Provide a separate automaton that controls the turns, i.e., that guarantees that players take their turns in a fair way. 5. Provide an (observer) automaton that terminates the game when one of the players has won, or in case no more turns are possible. Exercise puzzle. Imagine a 15-puzzle. Provide a model of the 15-puzzle in CIF. It should be possible to simulate all legal moves. The game ends as soon as the final configuration is reached. Simulate the game!

15 3.6 Additional modelling exercises Control of a reconfigurable machine tool In this subsection, inspired by [Sch15], we discuss the modelling approach presented in this chapter on a somewhat larger example of a reconfigurable machine tool. Reconfigurable manufacturing systems are designed to allow rapid adjustment of production capacity and functionality in response to new or changed circumstances, by adapting the functionality of their machine devices, by reconfiguring the arrangement of their machines, and even by modifying the building structure of the manufacturing system. We consider the model-based development of a controller for a reconfigurable machine tool. The reconfigurable machine tool (RMT) that we consider can perform three different operations: drilling, milling, and polishing. The tool consists of six components: a conveyor, a machine stand, a machine head, a drill, a mill, and a polishing tool. Products can enter and leave the RMT from the conveyor. The machine head of the RMT can move to three different positions for drilling, milling, and polishing (see Figure 3.8). The machine stand enables the vertical movement of the machine head to an upper and a lower position. Figure 3.8: Schematic of the example RMT with the configurations D (drilling), M (milling), and P (polishing) Exercise 3.33 Uncontrolled plant for RMT. Model the components of the RMT by automata. It is not necessary to model the movements exactly, it suffices to model the relevant positions of the components and the moves between these positions.

16 52 Chapter 3. Networks of automata The uncontrolled plant consists of these six components. Hence the model of the uncontrolled plant is the network of hybrid automata that consists of the models of the components. Is there any interaction between these models (so far)? Validate your model of the uncontrolled plant by simulating it and interpreting what happens. When modelling and simulating the uncontrolled plant, it should become clear that the uncontrolled plant may behave in several undesired ways. To prevent (some of) this undesired behaviour, we wish to control the behaviour of the plant to respect the following requirements: 1. the machine tools should only operate if the machine head is in the lower position, and 2. the machine stand is only allowed to move down if a product is present in the system. In the following exercises you are asked to develop a controller for these requirements. Exercise 3.34 Controller. Develop a model of a controller that forces the plant to behave in such a way that the aforementioned requirements are respected. Use simulation to validate if the controlled plant, i.e., the uncontrolled plant in combination with the controller, indeed satisfies the requirements. The requirements mentioned above do not disallow to operate the different machine tools if the machine head is not in the right position. Therefore, we add the following requirement: 3. the different machine tools should only operate if the machine head is turned to the correct position. Exercise 3.35 Adapt controller. Adapt your controller in such a way that the controlled system satisfies all three requirements. Use simulation to validate if the controlled plant satisfies the requirements. Exercise 3.36 Cancel a requirement. Adapt your controller in such a way that the controlled system satisfies only the first and the third requirement. Use simulation to validate if the controlled plant satisfies the requirements. In adapting the controller as asked for in the previous two exercises you may have experienced that it is not always immediately clear which constructions in your controller are present for which reason. Exercise 3.37 Split your controller in one controller for each requirement. Use simulation to validate if the controlled plant satisfies the requirements.

17 Bibliography [Bae+11] [Bee+14] [CW10] [CL99] [CL08] [FW06] [Flo+07] [For+12] J.C.M. Baeten et al. A Process-Theoretic Approach to Supervisory Control Theory. In: Proceedings of ACC. IEEE, 2011, pages (cited on page 86). D. A. van Beek et al. CIF 3: Model-Based Engineering of Supervisory Controllers. In: Tools and Algorithms for the Construction and Analysis of Systems - 20th International Conference, TACAS 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, Proceedings. Edited by Erika Ábrahám and Klaus Havelund. Volume Lecture Notes in Computer Science. Springer, 2014, pages (cited on page 32). K. Cai and W.M. Wonham. Supervisor Localization: A Top-Down Approach to Distributed Control of Discrete-Event Systems. In: IEEE Transactions on Automatic Control 55.3 (2010), pages (cited on page 86). C. G. Cassandras and S. Lafortune. Introduction to Discrete Event Systems. International Series on Discrete Event Dynamic Systems. Springer-Verlag, 1999 (cited on pages 15, 16, 39, 43, 44, 50). C.G. Cassandras and S. Lafortune. Introduction to Discrete Event Systems. Springer, 2008 (cited on page 9). L. Feng and W.M. Wonham. Computationally efficient supervisor design: abstraction and modularity. In: Proceedings of WODES. 2006, pages 3 8 (cited on page 86). H. Flordal et al. Compositional synthesis of maximally permissive supervisors using supervisor equivalence. In: Discrete Event Dynamic Systems 17.4 (2007), pages (cited on page 86). S.T.J. Forschelen et al. Application of supervisory control theory to theme park vehicles. In: Discrete Event Dynamic Systems 22.4 (2012), pages (cited on page 83).

18 54 Chapter 3. Networks of automata [Gla90] [Gla93] [HTL08] [LLW05] [LA14] [MW06] [MF08] [Mar+10] [MMF13] [Oue+11] [Pnu77] [QC00] [RW87a] [RW87b] Rob J. van Glabbeek. The Linear Time-Branching Time Spectrum (Extended Abstract). In: CONCUR 90, Theories of Concurrency: Unification and Extension, Amsterdam, The Netherlands, August 27-30, 1990, Proceedings. 1990, pages DOI: /BFb URL: (cited on page 29). Rob J. van Glabbeek. The Linear Time - Branching Time Spectrum II. In: CONCUR 93, 4th International Conference on Concurrency Theory, Hildesheim, Germany, August 23-26, 1993, Proceedings. 1993, pages DOI: / _6. URL: (cited on page 29). R.C. Hill, D.M. Tilbury, and S. Lafortune. Modular supervisory control with equivalencebased conflict resolution. In: Proceedings of ACC. 2008, pages (cited on page 86). R.J. Leduc, M. Lawford, and W.M. Wonham. Hierarchical interface-based supervisory control-part II: parallel case. In: IEEE Transactions on Automatic Control 50.9 (2005), pages (cited on page 86). Hai Lin and Panos J. Antsaklis. Hybrid dynamical systems: An introduction to control and verification. Now Publishers Inc., 2014 (cited on page 13). C. Ma and W.M. Wonham. Nonblocking supervisory control of state tree structures. In: IEEE Transactions on Automatic Control 51.5 (2006), pages (cited on page 86). R. Malik and H. Flordal. Yet another approach to compositional synthesis of discrete event systems. In: Proceedings of WODES. 2008, pages (cited on page 86). J. Markovski et al. Coordination of resources using generalized state-based requirements. In: Proceedings of WODES. 2010, pages (cited on page 72). Sahar Mohajerani, Robi Malik, and Martin Fabian. Compositional nonblocking verification for extended finite-state automata using partial unfolding. In: 2013 IEEE International Conference on Automation Science and Engineering, CASE 2013, Madison, WI, USA, August 17-20, , pages DOI: /CoASE URL: (cited on page 44). Lucien Ouedraogo et al. Nonblocking and Safe Control of Discrete-Event Systems Modeled as Extended Finite Automata. In: IEEE Trans. Automation Science and Engineering 8.3 (2011), pages DOI: /TASE URL: (cited on pages 44, 66). Amir Pnueli. The temporal logic of programs. In: Proceedings of the 18th IEEE Symposium on the Foundations of Computer Science (FOCS-77). Providence, Rhode Island: IEEE Computer Society Press, 1977, pages (cited on page 109). M.H. de Queiroz and J.E.R. Cury. Modular supervisory control of composed systems. In: Proceedings of ACC. 2000, pages (cited on page 86). P.J. Ramadge and W.M. Wonham. Supervisory control of a class of discrete event processes. In: SIAM Journal on Control and Optimization 25.1 (1987), pages (cited on page 57). P.J. Ramadge and W.M. Wonham. Supervisory control of a class of discrete event processes. In: SIAM J. Control and Optimization 25.1 (1987), pages (cited on page 86).

19 3.6 Additional modelling exercises 55 [Ric08] [Sch15] [Sha01] [SSR09] [SSR10] [SSR12] [ST06] [Swa17] [WW96] [Won10] Elaine Rich. Automata, Computability, and Complexity: Theory and Applications. Pearson Prentice Hall, 2008 (cited on pages 22, 23, 32). K. W. Schmidt. Computation of supervisors for reconfigurable machine tools. In: Discrete Event Dynamic Systems 25 (2015), pages (cited on page 51). A.C. Shaw. Real-Time Systems and Software. John Wiley & Sons, Inc., 2001 (cited on page 71). R. Su, J. van Schuppen, and J. Rooda. Synthesize nonblocking distributed supervisors with coordinators. In: Proceedings of the 17th Mediterranean Conference on Control and Automation. 2009, pages (cited on page 86). R. Su, J.H. van Schuppen, and J.E. Rooda. Aggregative synthesis of distributed supervisors based on automaton abstraction. In: IEEE Transactions on Automatic Control 55.7 (2010), pages (cited on page 86). R. Su, J.H. van Schuppen, and J.E. Rooda. The Synthesis of Time Optimal Supervisors by Using Heaps-of-Pieces. In: IEEE Transactions on Automatic Control 57.1 (2012), pages (cited on page 86). R. Su and J.G. Thistle. A distributed supervisor synthesis approach based on weak bisimulation. In: Proceedings of WODES. 2006, pages (cited on page 86). Lennart Swartjes. PhD thesis. Eindhoven, The Netherlands: Department of Mechanical Engineering, Eindhoven University of Technology, 2017 (cited on page 37). K.C. Wong and W.M. Wonham. Hierarchical control of discrete-event systems. In: Discrete Event Dynamic Systems: Theory and Applications 6.3 (1996), pages (cited on page 86). W.M. Wonham. Supervisory control of discrete-event systems. Technical report. University of Toronto, 2010 (cited on page 60).

DISCRETE-event dynamic systems (DEDS) are dynamic

DISCRETE-event dynamic systems (DEDS) are dynamic IEEE TRANSACTIONS ON CONTROL SYSTEMS TECHNOLOGY, VOL. 7, NO. 2, MARCH 1999 175 The Supervised Control of Discrete-Event Dynamic Systems François Charbonnier, Hassane Alla, and René David Abstract The supervisory

More information

Supervisory Control Synthesis the Focus in Model-Based Systems Engineering

Supervisory Control Synthesis the Focus in Model-Based Systems Engineering Supervisory Control Synthesis the Focus in Model-Based Systems Engineering Jos Baeten and Asia van de Mortel-Fronczak Systems Engineering Group Department of Mechanical Engineering November 23, 2011 What

More information

Modelling Large-Scale Discrete-Event Systems Using Modules, Aliases, and Extended Finite-State Automata

Modelling Large-Scale Discrete-Event Systems Using Modules, Aliases, and Extended Finite-State Automata Proceedings of the 18th World Congress The International Federation of Automatic Control Modelling Large-Scale Discrete-Event Systems Using Modules, Aliases, and Exted Finite-State Automata Robi Malik

More information

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL

Introduction to Linear-Time Temporal Logic. CSE 814 Introduction to LTL Introduction to Linear-Time Temporal Logic CSE 814 Introduction to LTL 1 Outline Motivation for TL in general Types of properties to be expressed in TL Structures on which LTL formulas are evaluated Syntax

More information

Chapter 2 Overview of the Design Methodology

Chapter 2 Overview of the Design Methodology Chapter 2 Overview of the Design Methodology This chapter presents an overview of the design methodology which is developed in this thesis, by identifying global abstraction levels at which a distributed

More information

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications.

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications. Petri Nets 2. Applications Y Narahari Y Narahari is currently an Associate Professor of Computer Science and Automation at the Indian Institute of Science, Bangalore. His research interests are broadly

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

Minimal Communication in a Distributed Discrete-Event System

Minimal Communication in a Distributed Discrete-Event System IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 48, NO. 6, JUNE 2003 957 Minimal Communication in a Distributed Discrete-Event System Karen Rudie, Senior Member, IEEE, Stéphane Lafortune, Fellow, IEEE, and

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

More information

HYBRID PETRI NET MODEL BASED DECISION SUPPORT SYSTEM. Janetta Culita, Simona Caramihai, Calin Munteanu

HYBRID PETRI NET MODEL BASED DECISION SUPPORT SYSTEM. Janetta Culita, Simona Caramihai, Calin Munteanu HYBRID PETRI NET MODEL BASED DECISION SUPPORT SYSTEM Janetta Culita, Simona Caramihai, Calin Munteanu Politehnica University of Bucharest Dept. of Automatic Control and Computer Science E-mail: jculita@yahoo.com,

More information

PETRI NET ANALYSIS OF BATCH RECIPES

PETRI NET ANALYSIS OF BATCH RECIPES Presented at FOCAPO 98, Snowbird, USA. PETRI NET ANALYSIS OF BATCH RECIPES STRUCTURED WITH GRAFCHART Charlotta Johnsson and Karl-Erik Årzén Department of Automatic Control, Lund Institute of Technology,

More information

Simulation and Verification of Timed and Hybrid Systems

Simulation and Verification of Timed and Hybrid Systems Simulation and Verification of Timed and Hybrid Systems Bert van Beek and Koos Rooda Systems Engineering Group Eindhoven University of Technology ISC 2007 Delft 11 June 2007 Bert van Beek and Koos Rooda

More information

Research Article Modeling and Simulation Based on the Hybrid System of Leasing Equipment Optimal Allocation

Research Article Modeling and Simulation Based on the Hybrid System of Leasing Equipment Optimal Allocation Discrete Dynamics in Nature and Society Volume 215, Article ID 459381, 5 pages http://dxdoiorg/11155/215/459381 Research Article Modeling and Simulation Based on the Hybrid System of Leasing Equipment

More information

Editor. Analyser XML. Scheduler. generator. Code Generator Code. Scheduler. Analyser. Simulator. Controller Synthesizer.

Editor. Analyser XML. Scheduler. generator. Code Generator Code. Scheduler. Analyser. Simulator. Controller Synthesizer. TIMES - A Tool for Modelling and Implementation of Embedded Systems Tobias Amnell, Elena Fersman, Leonid Mokrushin, Paul Pettersson, and Wang Yi? Uppsala University, Sweden Abstract. Times is a new modelling,

More information

TIMES A Tool for Modelling and Implementation of Embedded Systems

TIMES A Tool for Modelling and Implementation of Embedded Systems TIMES A Tool for Modelling and Implementation of Embedded Systems Tobias Amnell, Elena Fersman, Leonid Mokrushin, Paul Pettersson, and Wang Yi Uppsala University, Sweden. {tobiasa,elenaf,leom,paupet,yi}@docs.uu.se.

More information

Process Management And Synchronization

Process Management And Synchronization Process Management And Synchronization In a single processor multiprogramming system the processor switches between the various jobs until to finish the execution of all jobs. These jobs will share the

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

Abstract Path Planning for Multiple Robots: An Empirical Study

Abstract Path Planning for Multiple Robots: An Empirical Study Abstract Path Planning for Multiple Robots: An Empirical Study Charles University in Prague Faculty of Mathematics and Physics Department of Theoretical Computer Science and Mathematical Logic Malostranské

More information

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: P R O B L E M S Finite Autom ata. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: a) Are a multiple of three in length. b) End with the string

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

UltraDES - A Library for Modeling, Analysis and Control of Discrete Event Systems

UltraDES - A Library for Modeling, Analysis and Control of Discrete Event Systems UltraDES - A Library for Modeling, Analysis and Control of Discrete Event Systems Lucas V. R. Alves Lucas R. R. Martins Patrícia N. Pena COLTEC - Universidade Federal de Minas Gerais Belo Horizonte, MG,

More information

Module 3. Requirements Analysis and Specification. Version 2 CSE IIT, Kharagpur

Module 3. Requirements Analysis and Specification. Version 2 CSE IIT, Kharagpur Module 3 Requirements Analysis and Specification Lesson 6 Formal Requirements Specification Specific Instructional Objectives At the end of this lesson the student will be able to: Explain what a formal

More information

JOURNAL OF OBJECT TECHNOLOGY

JOURNAL OF OBJECT TECHNOLOGY JOURNAL OF OBJECT TECHNOLOGY Online at www.jot.fm. Published by ETH Zurich, Chair of Software Engineering JOT, 2002 Vol. 1, No. 2, July-August 2002 The Theory of Classification Part 2: The Scratch-Built

More information

CS 275 Automata and Formal Language Theory. First Problem of URMs. (a) Definition of the Turing Machine. III.3 (a) Definition of the Turing Machine

CS 275 Automata and Formal Language Theory. First Problem of URMs. (a) Definition of the Turing Machine. III.3 (a) Definition of the Turing Machine CS 275 Automata and Formal Language Theory Course Notes Part III: Limits of Computation Chapt. III.3: Turing Machines Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/13/index.html

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

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

Supervisory control synthesis for a patient support system Theunissen, R.J.M.; Schiffelers, R.R.H.; van Beek, D.A.; Rooda, J.E.

Supervisory control synthesis for a patient support system Theunissen, R.J.M.; Schiffelers, R.R.H.; van Beek, D.A.; Rooda, J.E. Supervisory control synthesis for a patient support system Theunissen, R.J.M.; Schiffelers, R.R.H.; van Beek, D.A.; Rooda, J.E. Published: 01/01/2008 Document Version Publisher s PDF, also known as Version

More information

An Agent Modeling Language Implementing Protocols through Capabilities

An Agent Modeling Language Implementing Protocols through Capabilities An Agent Modeling Language Implementing Protocols through Capabilities Nikolaos Spanoudakis 1,2 1 Technical University of Crete, Greece nikos@science.tuc.gr Pavlos Moraitis 2 2 Paris Descartes University,

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

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University Eugene Syriani Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science McGill University 1 OVERVIEW In the context In Theory: Timed Automata The language: Definitions and Semantics

More information

RSL Reference Manual

RSL Reference Manual RSL Reference Manual Part No.: Date: April 6, 1990 Original Authors: Klaus Havelund, Anne Haxthausen Copyright c 1990 Computer Resources International A/S This document is issued on a restricted basis

More information

Progress Towards the Total Domination Game 3 4 -Conjecture

Progress Towards the Total Domination Game 3 4 -Conjecture Progress Towards the Total Domination Game 3 4 -Conjecture 1 Michael A. Henning and 2 Douglas F. Rall 1 Department of Pure and Applied Mathematics University of Johannesburg Auckland Park, 2006 South Africa

More information

Concurrent Systems Modeling using Petri Nets Part II

Concurrent Systems Modeling using Petri Nets Part II Concurrent Systems Modeling using Petri Nets Part II Marlon Dumas (Based on lecture material by Wil van der Aalst Eindhoven University of Technology, The Netherlands http://www.workflowcourse.com) PN-1

More information

Darshan Institute of Engineering & Technology for Diploma Studies

Darshan Institute of Engineering & Technology for Diploma Studies REQUIREMENTS GATHERING AND ANALYSIS The analyst starts requirement gathering activity by collecting all information that could be useful to develop system. In practice it is very difficult to gather all

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

The alternator. Mohamed G. Gouda F. Furman Haddix

The alternator. Mohamed G. Gouda F. Furman Haddix Distrib. Comput. (2007) 20:21 28 DOI 10.1007/s00446-007-0033-1 The alternator Mohamed G. Gouda F. Furman Haddix Received: 28 August 1999 / Accepted: 5 July 2000 / Published online: 12 June 2007 Springer-Verlag

More information

Verification of Concurrent Programs, Part I: The Temporal Framework

Verification of Concurrent Programs, Part I: The Temporal Framework June 1981 Report. No. ~ 1 AN-U-81-836 Verification of Concurrent Programs, Part I: The Temporal Framework by Zohar MilnIla Amir Ynucli Office of Navitl Rcscarch Department of Computer Science Stanford

More information

Byzantine Consensus in Directed Graphs

Byzantine Consensus in Directed Graphs Byzantine Consensus in Directed Graphs Lewis Tseng 1,3, and Nitin Vaidya 2,3 1 Department of Computer Science, 2 Department of Electrical and Computer Engineering, and 3 Coordinated Science Laboratory

More information

Specifying Precise Use Cases with Use Case Charts

Specifying Precise Use Cases with Use Case Charts Specifying Precise Use Cases with Use Case Charts Jon Whittle Dept of Information & Software Engineering George Mason University 4400 University Drive Fairfax, VA 22030 jwhittle@ise.gmu.edu Abstract. Use

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

An Eternal Domination Problem in Grids

An Eternal Domination Problem in Grids Theory and Applications of Graphs Volume Issue 1 Article 2 2017 An Eternal Domination Problem in Grids William Klostermeyer University of North Florida, klostermeyer@hotmail.com Margaret-Ellen Messinger

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

CS 125 Section #4 RAMs and TMs 9/27/16

CS 125 Section #4 RAMs and TMs 9/27/16 CS 125 Section #4 RAMs and TMs 9/27/16 1 RAM A word-ram consists of: A fixed set of instructions P 1,..., P q. Allowed instructions are: Modular arithmetic and integer division on registers; the standard

More information

Concurrent Systems Modeling using Petri Nets Part II

Concurrent Systems Modeling using Petri Nets Part II Concurrent Systems Modeling using Petri Nets Part II Marlon Dumas (Based on lecture material by Wil van der Aalst Eindhoven University of Technology, The Netherlands http://www.workflowcourse.com) PN-1

More information

Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem

Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem Pawe l Żyliński Institute of Mathematics University of Gdańsk, 8095 Gdańsk, Poland pz@math.univ.gda.pl Submitted: Sep 9, 005;

More information

T Reactive Systems: Kripke Structures and Automata

T Reactive Systems: Kripke Structures and Automata Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Kripke Structures and Automata Spring 2005, Lecture 3 January 31, 2005 Tik-79.186 Reactive Systems 2 Properties of systems invariants: the system

More information

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University Metamodeling Janos ISIS, Vanderbilt University janos.sztipanovits@vanderbilt.edusztipanovits@vanderbilt edu Content Overview of Metamodeling Abstract Syntax Metamodeling Concepts Metamodeling languages

More information

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN NOTES ON OBJECT-ORIENTED MODELING AND DESIGN Stephen W. Clyde Brigham Young University Provo, UT 86402 Abstract: A review of the Object Modeling Technique (OMT) is presented. OMT is an object-oriented

More information

MODEL-BASED DESIGN OF CODE FOR PLC CONTROLLERS

MODEL-BASED DESIGN OF CODE FOR PLC CONTROLLERS Krzysztof Sacha Warsaw University of Technology, Nowowiejska 15/19, 00-665 Warszawa, Poland k.sacha@ia.pw.edu.pl Keywords: Abstract: Automatic program generation, Model verification, Finite state machine,

More information

A DEVS LIBRARY FOR LAYERED QUEUING NETWORKS

A DEVS LIBRARY FOR LAYERED QUEUING NETWORKS A DEVS LIBRARY FOR LAYERED QUEUING NETWORKS Dorin B. Petriu and Gabriel Wainer Department of Systems and Computer Engineering Carleton University, 1125 Colonel By Drive Ottawa, Ontario K1S 5B6, Canada.

More information

Timo Latvala. January 28, 2004

Timo Latvala. January 28, 2004 Reactive Systems: Kripke Structures and Automata Timo Latvala January 28, 2004 Reactive Systems: Kripke Structures and Automata 3-1 Properties of systems invariants: the system never reaches a bad state

More information

2 Discrete Dynamic Systems

2 Discrete Dynamic Systems 2 Discrete Dynamic Systems This chapter introduces discrete dynamic systems by first looking at models for dynamic and static aspects of systems, before covering continuous and discrete systems. Transition

More information

Lecture Notes on Program Equivalence

Lecture Notes on Program Equivalence Lecture Notes on Program Equivalence 15-312: Foundations of Programming Languages Frank Pfenning Lecture 24 November 30, 2004 When are two programs equal? Without much reflection one might say that two

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

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 165

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 165 S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 165 5.22. You are given a graph G = (V, E) with positive edge weights, and a minimum spanning tree T = (V, E ) with respect to these weights; you may

More information

Modeling Interactions of Web Software

Modeling Interactions of Web Software Modeling Interactions of Web Software Tevfik Bultan Department of Computer Science University of California Santa Barbara, CA 9106 bultan@cs.ucsb.edu Abstract Modeling interactions among software components

More information

want turn==me wait req2==0

want turn==me wait req2==0 Uppaal2k: Small Tutorial Λ 16 October 2002 1 Introduction This document is intended to be used by new comers to Uppaal and verification. Students or engineers with little background in formal methods should

More information

CS2 Language Processing note 3

CS2 Language Processing note 3 CS2 Language Processing note 3 CS2Ah 5..4 CS2 Language Processing note 3 Nondeterministic finite automata In this lecture we look at nondeterministic finite automata and prove the Conversion Theorem, which

More information

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Henry Lin Division of Computer Science University of California, Berkeley Berkeley, CA 94720 Email: henrylin@eecs.berkeley.edu Abstract

More information

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ -  artale/z CHAPTER 10 GRAPHS AND TREES Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/z SECTION 10.1 Graphs: Definitions and Basic Properties Copyright Cengage Learning. All rights reserved. Graphs: Definitions

More information

Distributed minimum spanning tree problem

Distributed minimum spanning tree problem Distributed minimum spanning tree problem Juho-Kustaa Kangas 24th November 2012 Abstract Given a connected weighted undirected graph, the minimum spanning tree problem asks for a spanning subtree with

More information

Finite State Machines: Motivating Examples

Finite State Machines: Motivating Examples Finite State Machines: Motivating Examples Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin The Wolf-Goat-Cabbage Puzzle A shepherd

More information

3.7 Denotational Semantics

3.7 Denotational Semantics 3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These

More information

Interprocess Communication By: Kaushik Vaghani

Interprocess Communication By: Kaushik Vaghani Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p. CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections 10.1-10.3 p. 1/106 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55. 1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)

More information

Creating Smart Agents:

Creating Smart Agents: Creating Smart Agents: A Distributed Control Theory for DES Kai Cai Osaka City University RW30 Workshop at CDC 17 2017.12.11 1 I am interested in multi-agent systems: I am working on both agents with continuous

More information

Fiona A Tool to Analyze Interacting Open Nets

Fiona A Tool to Analyze Interacting Open Nets Fiona A Tool to Analyze Interacting Open Nets Peter Massuthe and Daniela Weinberg Humboldt Universität zu Berlin, Institut für Informatik Unter den Linden 6, 10099 Berlin, Germany {massuthe,weinberg}@informatik.hu-berlin.de

More information

Overview of Dataflow Languages. Waheed Ahmad

Overview of Dataflow Languages. Waheed Ahmad Overview of Dataflow Languages Waheed Ahmad w.ahmad@utwente.nl The purpose of models is not to fit the data but to sharpen the questions. Samuel Karlins 11 th R.A Fisher Memorial Lecture Royal Society

More information

Managing test suites for services

Managing test suites for services Managing test suites for services Kathrin Kaschner Universität Rostock, Institut für Informatik, 18051 Rostock, Germany kathrin.kaschner@uni-rostock.de Abstract. When developing an existing service further,

More information

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Spring 2015 1 Multi Character Lookahead We may allow finite automata to look beyond the next input character.

More information

Formal modelling and verification in UPPAAL

Formal modelling and verification in UPPAAL Budapest University of Technology and Economics Department of Measurement and Information Systems Fault Tolerant Systems Research Group Critical Embedded Systems Formal modelling and verification in UPPAAL

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu Calornia Institute of Technology AFRL, 25 April 2012 Outline Spin model checker: modeling

More information

Raising Level of Abstraction with Partial Models: A Vision

Raising Level of Abstraction with Partial Models: A Vision Raising Level of Abstraction with Partial Models: A Vision Marsha Chechik 1, Arie Gurfinkel 2, Sebastian Uchitel 3, and Shoham Ben-David 1 1 Department of Computer Science, University of Toronto 2 SEI/CMU

More information

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 20 Concurrency Control Part -1 Foundations for concurrency

More information

2 Introduction to operational semantics

2 Introduction to operational semantics 2 Introduction to operational semantics This chapter presents the syntax of a programming language, IMP, a small language of while programs. IMP is called an "imperative" language because program execution

More information

The Game of Hex and Brouwer s Fixed-Point Theorem. Michael Cao

The Game of Hex and Brouwer s Fixed-Point Theorem. Michael Cao The Game of Hex and Brouwer s Fixed-Point Theorem Michael Cao June, 2017 Contents 1 Abstract 2 2 The Game of Hex 3 2.1 Introduction.............................. 3 2.2 Setup and Rules...........................

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 An Introduction to Graphs A few centuries ago, residents of the city of Königsberg, Prussia were interested in a certain problem.

More information

Exception Handling in S88 using Grafchart *

Exception Handling in S88 using Grafchart * Presented at the World Batch Forum North American Conference Woodcliff Lake, NJ April 7-10, 2002 107 S. Southgate Drive Chandler, Arizona 85226-3222 480-893-8803 Fax 480-893-7775 E-mail: info@wbf.org www.wbf.org

More information

Liveness and Fairness Properties in Multi-Agent Systems

Liveness and Fairness Properties in Multi-Agent Systems Liveness and Fairness Properties in Multi-Agent Systems Hans-Dieter Burkhard FB Informatik Humboldt-University Berlin PF 1297, 1086 Berlin, Germany e-mail: hdb@informatik.hu-berlin.de Abstract Problems

More information

ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS

ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS Adrien Leitold 1 Miklós Gerzson 2 Anna I. Pózna 2 and Katalin M. Hangos 2,3 1 Department of Mathematics 3 Process

More information

Thirty one Problems in the Semantics of UML 1.3 Dynamics

Thirty one Problems in the Semantics of UML 1.3 Dynamics Thirty one Problems in the Semantics of UML 1.3 Dynamics G. Reggio R.J. Wieringa September 14, 1999 1 Introduction In this discussion paper we list a number of problems we found with the current dynamic

More information

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

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

IEC Compliant Control Code Generation from Discrete Event Models

IEC Compliant Control Code Generation from Discrete Event Models Proceedings of the 13th Mediterranean Conference on Control and Automation Limassol, Cyprus, June 27-29, 2005 MoM04-3 IEC 61131-3 Compliant Control Code Generation from Discrete Event Models Gašper Mušič,

More information

IEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3

IEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3 LANGUAGE REFERENCE MANUAL Std P1076a-1999 2000/D3 Clause 10 Scope and visibility The rules defining the scope of declarations and the rules defining which identifiers are visible at various points in the

More information

UNIT -2 LEXICAL ANALYSIS

UNIT -2 LEXICAL ANALYSIS OVER VIEW OF LEXICAL ANALYSIS UNIT -2 LEXICAL ANALYSIS o To identify the tokens we need some method of describing the possible tokens that can appear in the input stream. For this purpose we introduce

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu California Institute of Technology EECI 19 Mar 2013 Outline Spin model checker: modeling

More information

Generell Topologi. Richard Williamson. May 27, 2013

Generell Topologi. Richard Williamson. May 27, 2013 Generell Topologi Richard Williamson May 27, 2013 1 1 Tuesday 15th January 1.1 Topological spaces definition, terminology, finite examples Definition 1.1. A topological space is a pair (X, O) of a set

More information

Utility Maximization

Utility Maximization Utility Maximization Mark Dean Lecture Notes for Spring 2015 Behavioral Economics - Brown University 1 Lecture 1 1.1 Introduction The first topic we are going to cover in the course isn t going to seem

More information

Timed Automata Based Scheduling for a Miniature Pipeless Plant with Mobile Robots *

Timed Automata Based Scheduling for a Miniature Pipeless Plant with Mobile Robots * Timed Automata Based Scheduling for a Miniature Pipeless Plant with Mobile Robots * Christian Schoppmeyer, Martin Hüfner, Subanatarajan Subbiah, and Sebastian Engell Abstract In this contribution we present

More information

Regular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.

Regular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal. Regular Languages (14 points) Problem 1 (6 points) inimize the following automaton Show that the resulting DFA is minimal. Solution: We apply the State Reduction by Set Partitioning algorithm (särskiljandealgoritmen)

More information

Model-checking with the TimeLine formalism

Model-checking with the TimeLine formalism Model-checking with the TimeLine formalism Andrea Zaccara University of Antwerp Andrea.Zaccara@student.uantwerpen.be Abstract A logical model checker can be an effective tool for verification of software

More information

Lecture 4: September 11, 2003

Lecture 4: September 11, 2003 Algorithmic Modeling and Complexity Fall 2003 Lecturer: J. van Leeuwen Lecture 4: September 11, 2003 Scribe: B. de Boer 4.1 Overview This lecture introduced Fixed Parameter Tractable (FPT) problems. An

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down

More information

Chapter 1: Principles of Programming and Software Engineering

Chapter 1: Principles of Programming and Software Engineering Chapter 1: Principles of Programming and Software Engineering Data Abstraction & Problem Solving with C++ Fifth Edition by Frank M. Carrano Software Engineering and Object-Oriented Design Coding without

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

Chalmers Publication Library

Chalmers Publication Library Chalmers Publication Library Application of Formal Verification to the Lane Change Module of an Autonomous Vehicle This document has been downloaded from Chalmers Publication Library (CPL). It is the author

More information

Extending BPEL with transitions that can loop

Extending BPEL with transitions that can loop Extending BPEL with transitions that can loop ActiveVOS linksaretransitions BPEL Extension AN ACTIVE ENDPOINTS PAPER AUTHOR: DR MICHAEL ROWLEY 2009 Active Endpoints Inc. ActiveVOS is a trademark of Active

More information

Chapter 3: Propositional Languages

Chapter 3: Propositional Languages Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical

More information