esterel as a realtime system programming language

24
ESTEREL Nazli Temur M1 International Master of Computer Science

Upload: inria

Post on 15-Jul-2015

108 views

Category:

Software


0 download

TRANSCRIPT

ESTERELNazli TemurM1 International Master of Computer Science

What is ESTEREL ?

Small Terminology

Where we use ESTEREL ?

Underlying Model and Basic Features

Simple - Sample Program

Conclusion - Q&A

CONTENT

WHAT IS ESTEREL ?

Esterel is a synchronous programming language for the development of complex reactive systems.

SYNCHRONIZATION TERMINOLOGY

The idea that multiple processes are to join up or handshake at a certain point,

in order to reach an agreement or commit to a certain sequence of action

As the name suggests Synchronous Motors are capable ofrunning at constant speed irrespective of the load acting on them.

The term sun synchronous means that the section monitored by the satellites is always radiated by the sun in the same way. //Always at a specific local time.

SYNCRONOUS ?

(1) Transformational systems (take some inputs, process them, deliver their outputs, and terminate their execution //Compiler

(2) Interactive systems (interact continuously with their environment, at their own speed // the Web

(3) Reactive Systems ( interact continuously with their environment, at a speed imposed by the environment

// Automatic flight control system of modern airplanes. [Real-time Systems]

REACTIVE SYSTEMS? WHERE TO USE

When activated with an input event, a reactive system reacts by producing an output event.

A real-time system is one that produce a response within a specified time, else risk severe consequences, including failure.

That is, in a system with a real-time constraint it is no good to have the correct action or the correct answer after a certain deadline.

REACTIVE SYSTEMS?

ESTEREL

The development of the language started in the early 1980s, and was mainly carried out by a team of Ecole des Mines de Paris and INRIA led by Gérard Berry.

Motivations behind ESTEREL can be summed up by the

ESTEREL = reactivity+ atomicity of reactions “perfect synchrony hypothesis,”+ instantaneous broadcast+ determinism

UNDERLYING MODEL

REACTIVITY

When activated with an input’event, a reactive system reacts by producing an output event.

Reactive systems are seen as “black boxes” that must be activated from outside in order to react;

They have input lines to receive input events from the outside, and output lines to produce output events.

The life of a reactive system is divided into instants that are the moments //external clock//where it reacts.

ATOMICITY OF REACTIONSThe basic hypothesis of ESTEREL is called the perfect synchrony hypothesis: it says that reactions are instantaneous so that activations and productions of output are synchronous,

A reactive program is a function that produces a sequence of output events from a sequence of input events.

Reactions are atomic, that is, program reactions cannot overlap.

In other words: there is no possibility to activate a system while it is reacting to the current activation.

Hypothesis simplifies the reasoning about reactive systems as concurrency between reactions is not to be considered.

Without the atomicity assumption, this concurrency would be a source of nondeterminism.

INSTANTANEOUS BROADCASTBroadcast(Hand Raising) is limited to instants: the emission of a signal (using an emit statement) lasts for the current instant.

ESTEREL broadcast has an important characteristic: emissions and receptions do no terminate the current instant.

In other words, there can be several signal emissions and receptions in sequence within the same instant.

This characteristic allows to program so called “instantaneous decisions” that are specific to ESTEREL.Hand Raising: when one wants to communicate, one raises its hand, so everybody can see.

Nondeterminism is completely thrown out of ESTEREL.

With traditional approaches, one has to choose between parallelism and nondeterminism on one hand or determinism but sequentiality on the other hand.

On the contrary, ESTEREL parallelism is deterministic.

Def : whose resulting behavior is entirely determined by its initial state and its inputs which is not random.

DETERMINISM

HELLO WORLD! :)The below program emits the output O as soon as both inputs A [HELLO] and B [WORLD!] have been received. Reset the

behavior whenever the input R is received.

module ABRO: // Programs consist of modules input A, B, R; // inputs signals andoutput O; // outputs signals

loop … each statement implements the reset

await waits for the next cycle in which its signal is present

|| operator means run the two awaits in parallel

Parallel statements terminate immediately when all branches done.

Emit O makes signal O present when A and B have both arrived

Remember Black Box

EXECUTION

As a benefit of the formal approach,ESTEREL programs can be compiled efficiently into finite states machines and can generate efficient code.

FINITE STATE STEPS

STEP1

STEP 2

STEP 3

STEP 4

HARDWARE SYNCHRONOUS CIRCUITS REPRESENTATION

Another use of ESTEREL that seems very promising is to produce code for electronic circuits.

CONCLUSION

Separating a program into parallel components for better modularity

ESTEREL high level program that can be graphically simulated and proved using verification systems;

It can be translated into several sequential languages and executed with great efficiency. But it is difficult to compile.

However, ESTEREL can be useful in larger context when one has to produce several automata that must cooperate.

Not an easy framework for checking causality but Scalability attractive for industrial users

http://www.inf.fu-berlin.de/lehre/SS13/Sem-Prog/material/ESTEREL.pdf

http://es.cs.uni-kl.de/publications/datarsg/BrSc07b.pdf

http://www-verimag.imag.fr/~halbwach/newbook.pdf

http://web.cs.wpi.edu/~cs3013/c07/lectures/Section06-Sync.pdf

http://en.wikipedia.org/

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.8.2146&rep=rep1&type=pdf

http://www.esterel.org/esterel-history/

http://slideplayer.fr/slide/1207810/

Teacher :)

REFERENCES