Smantique dEsterel t instruction au dbut de linstant
Sémantique d’Esterel • t instruction au début de l’instant t, P b t’, E • t’ instruction à la fin de l’instant • P signaux présents • E signaux émis • b booléen de terminaison (vrai = terminé) Sémantique d'Esterel 1
Instructions de base z nothing, P vrai nothing, {} faux nothing, {} vrai nothing, {S} z pause, P z emit S, P Sémantique d'Esterel 2
Séquence z La partie gauche ne termine pas t, P t; u, P faux t’, E faux t’; u, E z La partie gauche termine t, P vrai t’, E t; u, P Sémantique d'Esterel b u, P b u’, E’ u’, E+E’ 3
Parallélisme z Terminaison globale quand les 2 branches terminent t, P b 1 t’, E t || u, P Sémantique d'Esterel b 1 et b 2 u, P b 2 u’, E’ t’ || u’, E+E’ 4
Boucle z boucle infinie t, P loop t end, P Sémantique d'Esterel b t’, E b t’; loop t end, E 5
Présence/absence z Présence S dans P t, P b t’, E present S then t else u end, P b t’, E z absence S pas dans P u, P b present S then t else u end, P Sémantique d'Esterel u’, E b u’, E 6
Préemption z Premier instant b t, P abort t when S, P b t’, E abort t’ when immediate S, E z instants suivants present S else abort t when S end, P abort t when immediate S, P Sémantique d'Esterel b b u’, E 7
Signaux locaux z Hypothèse de présence t, P+S b t’, E signal S in t end, P b S dans E signal S in t’ end, E’ E’ semblable à E, sauf pour S qui est défini par P z Hypothèse d’absence t, P-S b signal S in t end, P Sémantique d'Esterel t’, E b S pas dans E signal S in t’ end, E’ 8
Programme correct z Ex: present S then emit T end || emit S emit T, {S} vrai nothing, {S, T} present S then emit T end, {S} vrai nothing, {S, T} emit S, {S} vrai present S then emit T end || emit S, {S} vrai nothing, {S, T} signal S in present S then emit T end || emit S end, {} nothing, {S} vrai nothing, {T} vrai nothing, {} present S then emit T end, {} vrai nothing, {} emit S, {} present S then emit T end || emit S, {} vrai nothing, {S} signal S in present S then emit T end || emit S end, {} Sémantique d'Esterel vrai ? 9
Non déterminisme z Ex: present S then emit S end emit T, {S} vrai nothing, {S, T} emit S, {S} present S then emit S; emit T end, {S} vrai signal S in present S then emit S; emit T end, {} vrai nothing, {S} nothing, {S, T} nothing, {} vrai nothing, {} present S then emit S; emit T end, {} signal S in present S then emit S; emit T end, {} Sémantique d'Esterel vrai nothing, {} 10
Absence de solution z Ex: present S else emit S end emit S, {} vrai nothing, {S} emit S; emit T, {} vrai nothing, {T} nothing, {S, T} present S else emit S; emit T end, {} vrai nothing, {S} ? signal S in present S else emit S; emit T end, {} nothing, {S} vrai nothing, {} present S else emit S; emit T end, {S} vrai nothing, {} signal S in present S else emit S; emit T end, {} Sémantique d'Esterel ? 11
Solutions non causales. . . z present S then emit T end; emit S emit T, {S} vrai nothing, {S, T} present S then emit T end, {S} vrai nothing, {S, T} emit S, {S} present S then emit T end; emit S, {S} vrai nothing, {S} nothing, {S, T} signal S in present S then emit T end; emit S end, {} vrai nothing, {T} C’est la seule solution : le programme est accepté Sémantique d'Esterel 12
Conclusion z Sémantique opérationnelle “comportementale” z abstraite (macro-step) : une reécriture = un instant z simple : structurelle Mais : z n’exprime pas comment trouver la solution z accepte des programmes non causaux z inefficace Sémantique d'Esterel 13
Conclusion - 2 z La réaction retardée à l’absence (instant suivant) permet d’éliminer les problèmes de causalité : 0 ou plusieurs solutions, ou 1 solution mais non-causale z Privilégier la solution où le signal est absent (pour éliminer les solutions non-causales) z Sémantique “concrète” exprimant comment calculer la solution Programmation réactive Sémantique d'Esterel 14
- Slides: 14