Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Questions from Principles of Cyber-physical Systems by Rajeev Alur Exercise 2.6 from PCPS. Design an event-triggered component SecondToMinute with the input event variable second and

Questions from Principles of Cyber-physical Systems by Rajeev Alur

  1. Exercise 2.6 from PCPS. Design an event-triggered component SecondToMinute with the input event variable second and the output event variable minute such that minute is present every 60th time the event second is present.

2. Exercise 2.14 from PCPS. Design a synchronous reactive component ComputeAverage with an integer input variable x , an input event variable clock , and a realvalued output variable y with the following behavior: in the first round, the output y is 0 ; in a subsequent round i , let j be the most recent round before round i in which the input event clock is present (if clock is absent in all rounds before i , then let j=0 ), the output should be the average of input values for x in rounds j , j+1 , up to i-1 . The following is a sample behavior of the desired component:

The component should be designed so that the output y does not await any of the input variables.

clock

T

T

x

5

2

-3

1

6

5

-2

11

y

0

5

3.5

-3

-1

1.33

2.25

-2

3. Exercise 2.17 from PCPS. Recall the event-triggered component SecondToMinute from exercise 2.6 with the input event variable second and the output event variable minute such that minute is present every 60th time the event second is present. Now suppose we want to design an event-triggered component SecondToHour with an input event variable second and an output event variable hour , such that the output event hour is present every 3600th time the event second is present. Show how to construct the desired component SecondToHour from the component SecondToMinute using the operations of parallel composition, instantiation, and output hiding.

4. Exercise 2.22 from PCPS. Consider the leader election algorithm in synchronous networks (figure 2.35). Argue that if the value of id does not change in a given round, then there is no need to send it in the following round (that is, the output out can be absent in the next round). This can reduce the number of messages sent. Modify the description of the component SyncLENode to implement this change.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions