code_generation.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. - memory protocol semantics
  47. - 'queuing' internal event semantics
  48. - concurrency semantics
  49. Roadmap
  50. -------
  51. (DONE) Milestone 1: Initial compilation to Rust
  52. - (DONE) entering and exiting states correctly
  53. - (DONE) incoming event triggers the right transition
  54. - (DONE) a port of the Controller class to Rust
  55. - (DONE) one implemented action: raise output event
  56. - (DONE) fixed semantics (YAKINDU-like)
  57. - "Take One" big step maximality
  58. - parent-first
  59. - (DONE) goal: subset of SCCD tests passes:
  60. semantics/big_step_maximality/test_flat_takeone.xml
  61. semantics/big_step_maximality/test_ortho_takeone.xml
  62. semantics/priority/test_source_parent.xml
  63. semantics/priority/test_explicit_flat.xml
  64. semantics/priority/test_explicit_ortho.xml
  65. - no history
  66. - no action language
  67. - guards evals and action stmts are just logged to console
  68. - guards always true, actions no effect
  69. - no event parameters
  70. (DONE) Milestone 2: Minimal support for semantic variability:
  71. - (DONE) Priority: Child-first
  72. - (DONE) Big-Step Maximality: Take Many
  73. - (DONE) goal: following tests should pass:
  74. semantics/priority/test_source_child.xml
  75. semantics/big_step_maximality/test_flat_takemany.xml
  76. semantics/big_step_maximality/test_ortho_takemany.xml
  77. (DONE) Milestone 3: Support history
  78. (DONE) Milestone 4: Timers (should be easy)
  79. (DONE) Milestone 5: Internal Events
  80. (DONE) Milestone 6: Action language
  81. Insights
  82. --------
  83. - Rust compiler warnings are actually useful for the modeler:
  84. - e.g. An unexecutable transition is detected as an unreachable statement
  85. - e.g. An unused event is detected as an unused variable or never-constructed enum variant.
  86. Performance over time
  87. ---------------------
  88. for test semantics/big_step_maximality/test_ortho_takemany.xml
  89. commit 354576dd47587fd8e6277539a26a4743b2167565 - Dec 17, 2020 - action lang working
  90. binary size, no opt: 513760 bytes
  91. binary size, opt-level=3: 421056 bytes
  92. binary size, opt-level=3 inline-threshold=1000: 421056 bytes
  93. binary size, opt-level=z: 429200 bytes
  94. instruction count (perf stat) (opt-level=3): 575.539 instructions:u
  95. commit aa6a734f7d900479de9be99a8cdf68af0d561481 - Dec 2, 2020 - implemented big-step maximality
  96. binary size, no opt: 478976 bytes
  97. binary size, opt-level=3 inline-threshold=1000: 410880 bytes
  98. binary size, opt-level=z: 413576 bytes
  99. instruction count (perf stat) (opt-level=3): 580.701 instructions:u
  100. Performance insights
  101. - instruction count improved a little over time (but could be due to non-relevant changes such as debug output)
  102. - 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)