Title: Optimized State Encoding for Esterel Programs
1Optimized State Encoding for Esterel Programs
2Overview
- State of an Esterel program
- The optimizing property
- Applications
- Register removal
- State re-encoding using the optimizing
information
3State of an Esterel program
- pq , pq , loop p end
- emit S, present S then p else q end
- signal S in p end
- trap T in p end , exit T
- suspend p when S end
- pause
- derived statements await S, abort p when S,
sustain S , every S do p end
4State of an Esterel program
- Esterel program execution
- Esterel synchronous language
- Program execution sequence of synchronous
execution instants (clock ticks) - Execution instant instantaneous mapping
(current state, input signals)
(next instant state,output signals)
5State of an Esterel program
- Global state and state of a statement
- Program state state of the pause statements in
the program - State of a sub-statement state of the pause
sub-statements of the given statement - The state of a composed statement is the union
of the states of its direct sub-statements
6State of an Esterel program
- Selection and selection tree
- Selected statement statement that has at least
one active pause sub-statement - The selection status of composed statement is
the OR of the selection statuses of its direct
sub-statements - Selection tree the tree defined by the pause
statements and the OR gates corresponding to the
composed statements
7State of an Esterel program
- pause nodes
- exclusive selection nodes
- parallel selection nodes
pq present S then p else q end ?
p
q
pq ?
p
q
8State of an Esterel program
loop present I then pauseemit O1
else pauseemit O2 end present end loop
pause
pause
9State of an Esterel program
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
10The optimizing property
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
11The optimizing property
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
12The optimizing property
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
13The optimizing property
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
14The optimizing property
trap TERMINATE in loop pause emit O1
pause emit O2 end loop sustain
RUNNING await TERMINATE_SIGNAL exit
TERMINATE end trap
parallel
loop
sustain
await
pause
pause
15The optimizing property
- If a parallel statement branch cannot terminate
then the selection status of the branch is equal,
at each instant, with the selection status of the
entire parallel statement
16The optimizing property
- The static analysis of the Esterel program that
is done at compile time - Cheap method (the information comes for free)
17The optimizing property
18Applications
parallel
parallel status loop status sustain
status await status
loop
sustain
await
pause
pause
19Applications
parallel
parallel status loop status sustain
status await status
loop
sustain
await
pause
pause
20Applications
parallel status loop status sustain
status await status
await
parallel
sustain
loop
pause
pause
21Applications
22Applications
- Exclusive selection nodes become switches that
choose the selected son
0
01
10
11
1
2
3
0
1
4
5
23Applications
- The selection tree encoding is given by the
encoding of all the
24Applications
- The selection tree encoding is given by the
encoding of all the sub-trees
0
2
1
3
4
5
6
25Applications
- The selection tree encoding is given by the
encoding of all the sub-trees
0
2
1
4
5
6
26Applications
- The selection tree encoding is given by the
encoding of all the sub-trees
3
27Applications