ソースを参照

Update code generation roadmap

Joeri Exelmans 4 年 前
コミット
0cbab80f62

+ 3 - 1
src/sccd/action_lang/static/statement.py

@@ -102,10 +102,12 @@ class Assignment(Statement):
     def init_stmt(self, scope: Scope) -> ReturnBehavior:
         rhs_t = self.rhs.init_expr(scope)
         self.is_initialization = self.lhs.init_lvalue(scope, rhs_t, self.rhs)
+
         # Very common case of assignment of a function to an identifier:
         # Make the function's scope name a little bit more expressive
         if isinstance(self.rhs, FunctionDeclaration) and isinstance(self.lhs, Identifier):
-            self.rhs.scope.name += "_" + self.lhs.name
+            self.rhs.scope.name = "fn_"+self.lhs.name
+
         return NeverReturns
 
     def exec(self, memory: MemoryInterface) -> Return:

+ 32 - 6
src/sccd/statechart/codegen/code_generation.txt

@@ -5,11 +5,18 @@ Code generation
 
 Tests currently passing (flag --rust):
 
+  features/action_lang/test_closure.xml
+  features/action_lang/test_cond.xml
+  features/action_lang/test_expressions.xml
+  features/action_lang/test_functions2.xml
+  features/action_lang/test_guard_action.xml
   features/history/test_composite_shallow.xml
   features/history/test_default.xml
   features/history/test_shallow.xml
   features/after/test_after.xml
   features/parallel/test_parallel.xml
+  day_atlee/test_01_dialer_takemany.xml
+  day_atlee/test_01_dialer_takeone.xml
   day_atlee/test_02_counter_takeone.xml
   day_atlee/test_03_trafficlight_single.xml
   day_atlee/test_04_counter_single.xml
@@ -40,9 +47,8 @@ Tests currently passing (flag --rust):
 
 Currently unimplemented:
 
-    - action language (guards, actions)
-      - event parameters
-      - memory protocol semantics
+    - event parameters
+    - memory protocol semantics
     - 'queuing' internal event semantics
     - concurrency semantics
 
@@ -87,11 +93,11 @@ Roadmap
 
   (DONE) Milestone 3: Support history
 
-  Milestone 4: Timers (should be easy)
+  (DONE) Milestone 4: Timers (should be easy)
 
-  Milestone 5: Internal Events
+  (DONE) Milestone 5: Internal Events
 
-  Milestone 6: Action language
+  (DONE) Milestone 6: Action language
 
 
 Insights
@@ -101,3 +107,23 @@ Insights
   - e.g. An unexecutable transition is detected as an unreachable statement
   - e.g. An unused event is detected as an unused variable or never-constructed enum variant.
 
+
+
+Binary sizes
+------------
+
+for test semantics/big_step_maximality/test_ortho_takemany.xml
+
+action lang working (commit 354576dd47587fd8e6277539a26a4743b2167565)
+
+no opt:                            513760
+opt-level=3:                       421056
+opt-level=3 inline-threshold=1000: 421056
+opt-level=z:                       429200
+
+
+implemented big-step maximality (commit aa6a734f7d900479de9be99a8cdf68af0d561481)
+
+no opt:                            478976
+opt-level=3 inline-threshold=1000: 410880
+opt-level=z:                       413576