The multiform notion of time
The notion of time used in Esterel differs from that of non-synchronous languages in the following way: The notion of physical time is replaced with the notion of order. Only the simultaneity and precedence of events are considered. This means that the physical time does not play any special role. This is called multiform notion of time. An Esterel program describes a totally ordered sequence of logical instants. At each instant, an arbitrary number of events occur (including 0). Event occurrences that happen at the same logical instant are considered simultaneous. Other events are ordered as their instances of occurrences. There are two types of statements: Those that take zero time (execute and terminate in the same instant) and those that delay for a prescribed number of cycles.Signals
Signals are the only means of communication. There are valued and non-valued signals. They are further categorized as being input, output, or local signals. A signal has the property of being either present or absent in an instant. Valued signals also contain a value. Signals are broadcast across the program, and that means any process can read or write a signal. The value of a valued signal can be determined in any instant, even if the signal is absent. The default status of a signal is absent. Signals remain absent until they are explicitly set to present using the emit statement. Communication is instantaneous, that means that a signal emitted in a cycle is visible immediately. Note that one can communicate back and forth in the same cycle.Signal coherence rules
* Each signal is only present or absent in a cycle, never both. * All writers run before any readers do. Thus present A else emit A end is an erroneous program, since the writer "emit A" should run before the reader "present A", whereas this program requires "present A" to be performed first.The language statements
Primitive Esterel statements
Pure Esterel has eleven primitive statements.Derived Esterel statements
Esterel has several derived constructions:Other Esterel statements
The full Esterel language also has statements for declaring and instantiating modules, for variables, for calling external procedures, and for valued signals.Example (ABRO)
The following program emits the output O as soon as both inputs A and B have been received. Reset the behaviour whenever the input R is received.Advantages of Esterel
* Model of time gives programmer precise control * Concurrency convenient for specifying control systems * Completely deterministic * Finite-state language ** Execution time predictable ** Much easier to verify formally * Can be implemented in hardware as well as in softwareDisadvantages of Esterel
* Finite-state nature of the language limits flexibility (but expressivity is sufficient for the chosen application field) * Semantic challenges ** Avoiding causality violations is often difficult ** Difficult to compile in the general case, but simple correctness criteria existSee also
* Lustre, a cousin programming language *References
{{reflistExternal links