These are sample questions for the second midterm. All problems relate to Esterel. The midterm is open books: in particular, you can take with you the Esterel primer. In the sample computations, ';' separates the signals received in different ticks (this is similar to the simulator syntax). Outputs are written in the line below the inputs, for clarity.
A1 ; A2 ; ; A1 A4 ; ; ; A5 ; ; A2 ; ... ; O ; ; O ; ; ; ; ; O ; ...
T ; T ; T ; T ; T ; A T ; T ; T ; T ; T ; T ; A T ; T ; ... ; O ; ; O ; ; ; ; O ; ; ; O ; ; O ; ...
loop
[weak] abort
[immediate] await A
when [immediate] B
end loop
Here, the square brackets indicate optional keywords. There are eight
cases, depending on the subset of the optional three keywords that are
included in the program.
For which of the eight cases is the loop non-immediate?
present A then
emit B
end present
||
present B else
emit A
end present
||
emit A