1 / 59

“Software” Esterel Execution (work in progress)

“Software” Esterel Execution (work in progress). Dumitru POTOP-BUTUCARU Ecole des Mines de Paris tyshbe@math.tau.ac.il. loop emit S ; pause end. Start. » loop emit S ; pause end. Start. loop » emit S ; pause end. Start. loop emit S ; » pause end. Start.

jeneil
Download Presentation

“Software” Esterel Execution (work in progress)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. “Software” Esterel Execution(work in progress) DumitruPOTOP-BUTUCARU Ecole des Mines de Paris tyshbe@math.tau.ac.il

  2. loop emit S ; pause end

  3. Start »loop emit S ; pause end

  4. Start loop »emit S ; pause end

  5. Start loop emit S ; »pause end

  6. Start loop emit S ; pause end

  7. Resume »loop emit S ; pause end

  8. Resume loop emit S ; »pause end

  9. Resume loop »emit S ; pause end

  10. Resume loop emit S ; »pause end

  11. Resume loop emit S ; pause end

  12. Overview • Building an Intermediate Representation • Giving it a (proper) meaning, based on existing semantics • Some interesting classes of programs • Simulation and tentative optimization

  13. What Esterel • Esterel v5 (with data) • In this paper, examples without data

  14. signal S in emit S ; pause || present S then pause end end

  15. signal S in emit S ; pause1 ||3 present S then pause2 end end

  16. Organizing Actions in a Graph »signal S in emit S ; pause1 ||3 present S then pause2 end end start ·

  17. Organizing Actions in a Graph · signal S in »emit S ; pause1 ||3 »present S then pause2 end end start enter 3 fork ·  

  18. Organizing Actions in a Graph · signal S+ in emit S ; »pause1 ||3 »present S then pause2 end end S start enter 3 fork ·  

  19. Organizing Actions in a Graph · signal S+ in emit S ; »pause1 ||3 present S then »pause2 end end S start enter 3 fork F S ·  T 

  20. Organizing Actions in a Graph enter 1 · signal S+ in emit S ; pause1 ||3 present S then »pause2 end end S start enter 3 fork F S · T p 

  21. Organizing Actions in a Graph enter 1 · signal S+ in emit S ; pause1 ||3 present S then pause2 end end S start enter 3 fork F S enter 2 · T p p

  22. Organizing Actions in a Graph join enter 1 pause(1) signal S in emit S ; pause1 ||3 present S then pause2 end end S start enter 3 fork term(2) F pause S pause · enter 2 pause(2) T

  23. Organizing Actions in a Graph join enter 1 pause(1) »signal S in emit S ; pause1 ||3 present S then pause2 end end S start enter 3 fork term(2) F pause S pause enter 2 pause(2) T join F inactive(1) active 1 exit 1 term(1) resume T fork · F inactive(2) active 2 term exit 3 term T exit 2 term(2)

  24. Organizing Actions in a Graph join enter 1 pause(1) signal S- in emit S ; »pause1 ||3 present S then »pause2 end end S start enter 3 fork term(2) F pause S pause enter 2 pause(2)  T  join F F inactive(1) active 1 exit 1 term(1) · resume T fork F inactive(2) active 2 term exit 3 term T exit 2 · term(2)

  25. Organizing Actions in a Graph join enter 1 pause(1) signal S- in emit S ; pause1 ||3 present Sthen »pause2 end end S start enter 3 fork term(2) F pause S pause enter 2 pause(2) T t  join F F inactive(1) active 1 exit 1 term(1) · resume T fork F inactive(2) active 2 term exit 3 term T exit 2 · term(2)

  26. Organizing Actions in a Graph join enter 1 pause(1) signal S- in emit S ; pause1 ||3 present S then pause2 end end S start enter 3 fork term(2) F pause S pause enter 2 pause(2) T t t join F F inactive(1) active 1 exit 1 term(1) · resume T fork F inactive(2) active 2 term exit 3 term T exit 2 · term(2)

  27. Organizing Actions in a Graph join enter 1 pause(1) signal S in emit S ; pause1 ||3 present S then pause2 end end S start enter 3 fork term(2) F pause S pause enter 2 pause(2) T join F inactive(1) active 1 exit 1 term(1) resume T fork F inactive(2) active 2 term exit 3 term · T exit 2 term(2)

  28. Intermediate format • Vertices – represent computation • test • fork • join (parallel branch termination synchronizing) • emit • state/memory update action • Edges – control flow and signal dependencies S S

  29. State representation issues • no state encoding decision yet • intuitive semantics: • one boolean variable per pause and composed statement • all false, in the beginning • enter sets it to 1, exit sets it to 0 • several possible encoding techniques • optimization issues

  30. Semantics • SOS rules (using Cannot auxiliary functions) - dynamic • CCFG-like semantics on the intermediate graph • Translation to Constructive Circuits – fine grained, static

  31. SOS rules k , E’ p’ p’’ E p’, p’’ are terms over statement p k  {} – completion code E:S v{0,1,} – input event E’ – emitted signal or  0 , E’ p’ p E  , E’ p’;q p;·q E

  32. SOS rules ,S p’ p’’ E(S,) , signal S in p’end signal S+ in p’’ end E SCannot(p’) , signal S inp’end signal S- in p’ end E CONSTRUCTIVE

  33. CCFG-based semantics • goal is sequential code generation • graph interpreted as a classical flowchart • limited class of programs • related to intermediate representation of Stephen Edwards and of the CNET group • graph acyclicity required • lesser grain • static

  34. CCFG-based semantics ,S p’ p’’ E(S,) , signal S, in p’end signal S ,+ in p’’ end E SCannot’(p’) , signal S, + in p’end signal S+ in p’ end E SCannot’(p’) , signal S,  inp’end signal S- in p’ end E

  35. S  Cannot(p’) • CCFG view • all the signal emission statements have been ruled out by executed tests • Constructive view • all the signal emission statements have been ruled out by either: • executed tests • not yet executed tests for which the test condition is already computed so that we can prune one of the test branches.

  36. Acyclicity • Can be defined on both intermediate graph and associated circuit • Simple (cheap) correctness criteria for big programs • Basis of static scheduling • Problem: graph acyclicity is not the same as circuit acyclicity • what is a compilable program

  37. Acyclicity discrepancy signal S in [ nothing || present I then nothing else present S then pause else pause end end present ]; emit S end signal term term(1) S start fork T term(2) pause I pause(2) T F S F

  38. Acyclicity discrepancy signal S in [ nothing || present I then nothing else present S then pause else pause end end present ]; emit S end signal term term(1) S start fork T term(2) pause I pause(2) T F S F

  39. Acyclicity discrepancy signal S in [ nothing || present I then nothing else present S then pause else pause end end present ]; emit S end signal term S start T pause T F F

  40. Acyclicity discrepancy • Possible solutions: • splitting the synchronizers with problems, and so borrow some expressive power from circuit semantics • duplicate cycle code based on the trigger or the problem test (improve the CCFG model)

  41. Compilable Program Classes acyclic circuit acyclic CCFG

  42. Compilable Program Classes acyclic circuit acyclic CCFG

  43. Static analysis • Graph arc removal in the circuit • Results hold in CCFG, if the result is acyclic • Problem: causality • Some particular simplifications proved, like erasing dependencies based on state incompatibility

  44. Static analysis • What I would like to do term term(1) S start fork T term(2) pause I pause(2) T F S · F

  45. Static analysis • What I would like to do term term(1) S start fork T term(2) pause I pause(2) T F S · F

  46. Static analysis • What I would like to do term term(1) S start fork T term(2) pause I pause(2) T F S · F

  47. Compilable Program Classes acyclic after simplif. acyclic circuit acyclic CCFG

  48. Compilable Program Classes correct programs acyclic after simplif. acyclic circuit acyclic CCFG

  49. Cyclic specifications • Proving correctness – not my goal • Execution (Simulation)

  50. Cyclic specifications • 3-valued simulation • Resynthesis of cyclic parts

More Related