Question: Problem 2 . [ 5 0 points ] ( a ) [ 2 5 points ] Design a timed process with the following behavior: 1
Problem points
a points Design a timed process with the following behavior:
Within any second interval, the process must receive events of type
A Receiving a second A exactly seconds after the first A is okay, but
receiving it after seconds is bad. If it does not receive two As within
seconds, it goes to an error state and stays there forever.
Within any second interval, it must receive events of type B otherwise it goes to an error state. If any two B events are more than seconds apart, it goes to an error state. If it goes to an error state, it stays there forever.
Let n be a positive integer. At each n seconds, the machine remembers
the number of As and Bs received in the interval n n
For all n at some time in nn the process outputs the number of As and Bs received in the interval n n on the output OUT.
b points Consider an execution where the process never goes to an error state and the process receives an A exactly when it starts. Let t denote the time when it receives the second A u denote the time when it receives the first B and u the time when it receives the third B What are the minimum and maximum values for u t and u t
c points Suppose the user promises that at most one A event is input in
any second window and that any two B events will be separated by at least second. What is the largest number of A and B events that may be reported on OUT?
d points Design a timed process that ensures the users promise in c In other words, this process must produce at most one A event is output in any second window, and it must ensure that two B events are separated by at least second.
e points How would you change the timed process in d so that the
composition of the two timed process guarantees that the timed process in a never reaches an error state?
fExtra Credit: points Can you build the process in e such that the
composition of the two timed process has the largest number of executions that do not hit the error state?
The first image is my state machine for option a and my second image is my state machine for option d What other changes can I make for options e and f
I have copied the whole question. The images are my answers for option a and d
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
