Assignment 2: Chapter 5, Design Patterns, and Testing CSI 5390
Individual Assignment
Due: November 20 (Wednesday), 2019
5.11. Modify the specification given by the FSM of figure 5.15 by considering the case
where temperature and pressure each have two different associated signals, one indicating
a slight deviation from the acceptable value and the other a dangerous deviation from the
acceptable value. In the latter case, the system must be shut off immediately. (1 point)
5.16. Use the foregoing PH extension to describe a message dispatcher that works along
the following lines: The dispatcher receives messages from two different channels and
the checks the parity of each message. If the parity is wrong, it sends a nack (negative
acknowledgement through a reply channel (there is one such channel for each input
channel); if the parity is right, it places the received message into a buffer. The buffer
may store 10 messages. When the buffer is full, the dispatcher sends the whole contents
of the buffer to a processing unit through another channel. No message can be placed
into a full buffer. (1 point)
5.22. Give an alternative specification for lighting up a button using PNs augmented with
priorities, instead of timed PNs. Discuss the differences between the two representations.
(1 point)
5.30. Give a logic specification for a program that reads in a sequence of n + 1 values and
checks whether the first value also appears in the next n input values. (0.5 points)
1. Design {a,b}*{baaa} in a deterministic FSM. Use the tool demonstrated in class to verify your design for the following strings: (1 point)
baaa, aabbbaaa, bbaabaaa, baaaaabb, baaaabbaa
Turn in the resulting screen shots of these strings.
2. Build the Petri Net (PN) in Figure 5.36 using the PIPE tool demonstrated in class. Simulate the PN for the following scenario: The elevator is at Floor 4, and the external
down button on Floor 8 is pressed. The elevator then starts moving towards Floor 8.
When the elevator is about to reach Floor 5, the internal button for Floor 5 is pressed. The
elevator stops at Floor 5 to serve after ?t seconds from the departure of Floor 4. After serving Floor 5, the internal button for Floor 5 is reset, but the down button on floor 8 is
still on. Submit the markings that simulate the elevator moving including the final marking when the elevator stopped at the floor 5. Capture the screen for each marking as
the token moves. The PN must integrate the position, internal button, and external button
modules. (1.5 point)








Recent Comments