Synchronous languages Assignment Help
A synchronous Programming language is also called synchronous reactive programming or SRP. The principle of SRP is to make the same abstraction for programming languages as the synchronous abstraction in digital circuits.
fig:Synchronous languages
Here is an example Unit of Synchronous languages
{` process BIG_BEN =
( ? event TICK;
! integer DAY, HOUR, MINUTE, SECOND; )
(| (SECOND, NEW_MINUTE) := CNT_MOD {60} (TICK, TICK)
| (MINUTE, NEW_HOUR ) := CNT_MOD {60} (TICK, NEW_MINUTE)
| (HOUR , NEW_DAY ) := CNT_MOD {24} (TICK, NEW_HOUR)
| DAY ^= TICK
| DAY := DAY$ + 1 when NEW_DAY default DAY$ init 1
|)
where
event NEW_MINUTE, NEW_HOUR, NEW_DAY;
process CNT_MOD = % Counter modulo N %
`}