a. Write the always circuit from Monday, exercise 3, as a MiniFlash
program.
b. Write a delay circuit in MiniFlash, where the output of
the compiled program is the same as the input but delayed
by one time unit.
c. Yet another bomb detonator, but this time, the user has to
press the buttons a, b and c in
any order (even at the same time) before the bomb explodes.
(This is the same as Tuesday's exercise 1.)
d. Consider the following programming construct, so called big case:
if cond1 then
prog1
elseif cond2 then
prog2
elseif
...
elseif condn then
progn
endif
Is there an optimization that we can apply if we are guaranteed
that the several conditions are all exclusive (meaning only
one of them can be true at the same time)?
e. Are the following two MiniFlash programs equivalent:
forever (P1 || P2)
and
forever P1 || forever P2
?
|