Download presentation
Presentation is loading. Please wait.
Published byEthan Barton Modified over 9 years ago
1
Optimized State Encoding for Esterel Programs Dumitru POTOP-BUTUCARU
2
Overview State of an Esterel program The optimizing property Applications: Register removal State re-encoding using the optimizing information
3
State of an Esterel program Esterel statements: p¦¦q, p;q, 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
4
State 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)
5
State 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
6
State 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
7
State of an Esterel program Selection nodes pause nodes exclusive selection nodes parallel selection nodes p;q present S then p else q end # pq p¦¦q ¦¦ pq
8
State of an Esterel program Example # pause loop present I then pause;emit O1 else pause;emit O2 end present end loop
9
State of an Esterel program Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause parallel loop
10
The optimizing property Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause parallel loop
11
The optimizing property Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause = parallel loop
12
The optimizing property Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause = parallel loop
13
The optimizing property Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause == parallel loop
14
The optimizing property Example trap TERMINATE in loop pause; emit O1; pause; emit O2 end loop ¦¦ sustain RUNNING ¦¦ await TERMINATE_SIGNAL; exit TERMINATE end trap sustainawait # ¦¦ pause === parallel loop
15
The 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
16
The optimizing property Non-termination criteria The static analysis of the Esterel program that is done at compile time Cheap method (the information comes for free)
17
The optimizing property Some statistics:
18
Applications Register removal sustainawait # ¦¦ pause === parallel loop parallel status = loop status = sustain status = await status
19
Applications Register removal sustainawait # ¦¦ pause === parallel loop parallel status = loop status = sustain status = await status
20
Applications Register removal sustain await # pause parallel loop parallel status = loop status = sustain status = await status
21
Applications Register removal
22
Applications State re-encoding Exclusive selection nodes become switches that choose the selected son # # 12 3 45 0 011011 01
23
Applications State re-encoding The selection tree encoding is given by the encoding of all the ¦¦ # # = # # =
24
Applications State re-encoding The selection tree encoding is given by the encoding of all the sub-trees ¦¦ # # = 0 1 2 34 56
25
Applications State re-encoding The selection tree encoding is given by the encoding of all the sub-trees ¦¦ # # = 0 1 2 4 56
26
Applications State re-encoding The selection tree encoding is given by the encoding of all the sub-trees 3
27
Applications State re-encoding
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.