code_generation.txt 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ===============
  2. Code generation
  3. ===============
  4. Tests currently passing (flag --rust):
  5. features/action_lang/test_closure.xml
  6. features/action_lang/test_cond.xml
  7. features/action_lang/test_expressions.xml
  8. features/action_lang/test_functions2.xml
  9. features/action_lang/test_guard_action.xml
  10. features/history/test_composite_shallow.xml
  11. features/history/test_default.xml
  12. features/history/test_shallow.xml
  13. features/after/test_after.xml
  14. features/parallel/test_parallel.xml
  15. day_atlee/test_01_dialer_takemany.xml
  16. day_atlee/test_01_dialer_takeone.xml
  17. day_atlee/test_02_counter_takeone.xml
  18. day_atlee/test_03_trafficlight_single.xml
  19. day_atlee/test_04_counter_single.xml
  20. day_atlee/test_06_counter_lifeline.xml
  21. day_atlee/test_21_counter_combo.xml
  22. semantics/priority/test_explicit_flat.xml
  23. semantics/priority/test_explicit_ortho.xml
  24. semantics/priority/test_source_child.xml
  25. semantics/priority/test_source_parent.xml
  26. semantics/event_lifeline/test_flat_nextss_takemany.xml
  27. semantics/event_lifeline/test_flat_nextss_takeone.xml
  28. semantics/event_lifeline/test_flat_remainder.xml
  29. semantics/event_lifeline/test_ortho_nextcs_takemany.xml
  30. semantics/event_lifeline/test_ortho_nextcs_takeone.xml
  31. semantics/event_lifeline/test_ortho_nextss.xml
  32. semantics/big_step_maximality/test_cross_region1.xml
  33. semantics/big_step_maximality/test_cross_region2.xml
  34. semantics/big_step_maximality/test_flat_syntactic.xml
  35. semantics/big_step_maximality/test_flat_takemany.xml
  36. semantics/big_step_maximality/test_flat_takeone.xml
  37. semantics/big_step_maximality/test_ortho_syntactic.xml
  38. semantics/big_step_maximality/test_ortho_takemany.xml
  39. semantics/big_step_maximality/test_ortho_takeone.xml
  40. xml_syntax/stateref/test_flat_absolute.xml
  41. xml_syntax/stateref/test_flat_relative.xml
  42. xml_syntax/stateref/test_nested_absolute.xml
  43. xml_syntax/stateref/test_nested_relative.xml
  44. Currently unimplemented:
  45. - event parameters
  46. - builtin functions: e.g. INSTATE (should be turned into a macro)
  47. - memory protocol semantics
  48. - 'queuing' internal event semantics
  49. - concurrency semantics
  50. Roadmap
  51. -------
  52. (DONE) Milestone 1: Initial compilation to Rust
  53. - (DONE) entering and exiting states correctly
  54. - (DONE) incoming event triggers the right transition
  55. - (DONE) a port of the Controller class to Rust
  56. - (DONE) one implemented action: raise output event
  57. - (DONE) fixed semantics (YAKINDU-like)
  58. - "Take One" big step maximality
  59. - parent-first
  60. - (DONE) goal: subset of SCCD tests passes:
  61. semantics/big_step_maximality/test_flat_takeone.xml
  62. semantics/big_step_maximality/test_ortho_takeone.xml
  63. semantics/priority/test_source_parent.xml
  64. semantics/priority/test_explicit_flat.xml
  65. semantics/priority/test_explicit_ortho.xml
  66. - no history
  67. - no action language
  68. - guards evals and action stmts are just logged to console
  69. - guards always true, actions no effect
  70. - no event parameters
  71. (DONE) Milestone 2: Minimal support for semantic variability:
  72. - (DONE) Priority: Child-first
  73. - (DONE) Big-Step Maximality: Take Many
  74. - (DONE) goal: following tests should pass:
  75. semantics/priority/test_source_child.xml
  76. semantics/big_step_maximality/test_flat_takemany.xml
  77. semantics/big_step_maximality/test_ortho_takemany.xml
  78. (DONE) Milestone 3: Support history
  79. (DONE) Milestone 4: Timers (should be easy)
  80. (DONE) Milestone 5: Internal Events
  81. (DONE) Milestone 6: Action language
  82. Insights
  83. --------
  84. - Rust compiler warnings are actually useful for the modeler:
  85. - e.g. An unexecutable transition is detected as an unreachable statement
  86. - e.g. An unused event is detected as an unused variable or never-constructed enum variant.
  87. Performance over time
  88. ---------------------
  89. for test semantics/big_step_maximality/test_ortho_takemany.xml
  90. commit ec39dd73ea42a9ccee6f1edc8863b36625e0721a - Dec 20, 2020 - put reusable stuff in library
  91. binary size, opt-level=3: 422192 bytes
  92. instruction count (perf stat) (opt-level=3): 571.641 instructions:u
  93. commit 354576dd47587fd8e6277539a26a4743b2167565 - Dec 17, 2020 - action lang working
  94. binary size, no opt: 513760 bytes
  95. binary size, opt-level=3: 421056 bytes
  96. binary size, opt-level=3 inline-threshold=1000: 421056 bytes
  97. binary size, opt-level=z: 429200 bytes
  98. instruction count (perf stat) (opt-level=3): 575.539 instructions:u
  99. commit aa6a734f7d900479de9be99a8cdf68af0d561481 - Dec 2, 2020 - implemented big-step maximality
  100. binary size, no opt: 478976 bytes
  101. binary size, opt-level=3 inline-threshold=1000: 410880 bytes
  102. binary size, opt-level=z: 413576 bytes
  103. instruction count (perf stat) (opt-level=3): 580.701 instructions:u
  104. Performance insights
  105. - instruction count improved a little over time (but could be due to non-relevant changes such as debug output)
  106. - binary size slightly worse when optimizing for size (opt-level=z). this means that inlining is actually reducing the binaries' size, as we would expect (lots of dead code can be eliminated)