code_generation.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ===============
  2. Code generation
  3. ===============
  4. Roadmap
  5. =======
  6. (DONE) Milestone 1: Initial compilation to Rust
  7. - (DONE) entering and exiting states correctly
  8. - (DONE) incoming event triggers the right transition
  9. - (DONE) a port of the Controller class to Rust
  10. - (DONE) one implemented action: raise output event
  11. - (DONE) fixed semantics (YAKINDU-like)
  12. - "Take One" big step maximality
  13. - parent-first
  14. - (DONE) goal: subset of SCCD tests passes:
  15. semantics/big_step_maximality/test_flat_takeone.xml
  16. semantics/big_step_maximality/test_ortho_takeone.xml
  17. semantics/priority/test_source_parent.xml
  18. semantics/priority/test_explicit_flat.xml
  19. semantics/priority/test_explicit_ortho.xml
  20. - no history
  21. - no action language
  22. - guards evals and action stmts are just logged to console
  23. - guards always true, actions no effect
  24. - no event parameters
  25. Milestone 2: Minimal support for semantic variability:
  26. - (DONE) Priority: Child-first
  27. - Big-Step Maximality: Take Many
  28. - goal: following tests should pass:
  29. (DONE) semantics/priority/test_source_child.xml
  30. semantics/big_step_maximality/test_flat_takemany.xml
  31. semantics/big_step_maximality/test_ortho_takemany.xml
  32. Insights
  33. ========
  34. - Rust compiler warnings are actually useful for the modeler:
  35. - e.g. An unexecutable transition is detected as an unreachable statement
  36. - e.g. An unused event is detected as an unused variable or never-constructed enum variant.
  37. Implementation
  38. ==============
  39. Data types
  40. ----------
  41. - state machine's state
  42. - [M1] current state(s)
  43. nested structure of
  44. - tagged unions (OR-states)
  45. - structs (AND-states)
  46. - history values
  47. - timer IDs
  48. Operations
  49. ----------
  50. - hierarchical operations
  51. - [M1] entering a state's default state
  52. - entering a state's (deep/shallow) history
  53. - "flat" operations
  54. - [M1] firing a transition
  55. - [M1] exit states
  56. + save history values
  57. + canceling timers
  58. + exit actions
  59. - transition's actions
  60. - [M1] enter states
  61. + enter actions
  62. + reading history values
  63. + starting timers
  64. - [M1] select and execute transition given an event