tla-sbuilder 0.2.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +150 -116
  3. data/VERSION +1 -1
  4. data/lib/cli/cli-customer.rb +23 -3
  5. data/lib/cli/cli-pet.rb +66 -12
  6. data/lib/cli/cli-text.rb +127 -8
  7. data/lib/cli/cli.rb +49 -6
  8. data/lib/sbuilder.rb +26 -3
  9. data/lib/sbuilder/constants.rb +165 -6
  10. data/lib/sbuilder/controller.rb +943 -169
  11. data/lib/sbuilder/controller_utils.rb +122 -0
  12. data/lib/sbuilder/default-sbuilder.yaml +38 -44
  13. data/lib/sbuilder/domain.rb +160 -36
  14. data/lib/sbuilder/domain_cardinality.rb +1 -1
  15. data/lib/sbuilder/domain_range.rb +102 -0
  16. data/lib/sbuilder/domain_type.rb +150 -0
  17. data/lib/sbuilder/domain_value.rb +21 -13
  18. data/lib/sbuilder/exception.rb +16 -0
  19. data/lib/sbuilder/extension_loader.rb +67 -686
  20. data/lib/sbuilder/extension_loader_deprecated_step_extensions.rb +711 -0
  21. data/lib/sbuilder/extension_loader_step_generator.rb +876 -0
  22. data/lib/sbuilder/facade/{api_loader.rb → api_loader_facade.rb} +176 -45
  23. data/lib/sbuilder/facade/api_loader_plugin.rb +6 -32
  24. data/lib/sbuilder/facade/api_loader_plugin_mixer.rb +35 -0
  25. data/lib/sbuilder/facade/facade_constants.rb +23 -0
  26. data/lib/sbuilder/facade/loader_plugin_root.rb +56 -0
  27. data/lib/sbuilder/facade/param_set_root.rb +55 -0
  28. data/lib/sbuilder/facade/snippet_loader_facade.rb +600 -0
  29. data/lib/sbuilder/facade/snippet_loader_plugin.rb +76 -0
  30. data/lib/sbuilder/facade/snippet_loader_plugin_mixer.rb +56 -0
  31. data/lib/sbuilder/factory.rb +224 -45
  32. data/lib/sbuilder/model.rb +125 -45
  33. data/lib/sbuilder/mustache/template.rb +107 -58
  34. data/lib/sbuilder/mustache/template_reader.rb +56 -46
  35. data/lib/sbuilder/mustache/template_reader_context.rb +64 -234
  36. data/lib/sbuilder/mustache/template_resolve.rb +103 -0
  37. data/lib/sbuilder/mustache/template_root.rb +71 -0
  38. data/lib/sbuilder/param_set.rb +30 -15
  39. data/lib/sbuilder/param_set_db.rb +1 -1
  40. data/lib/sbuilder/param_set_def.rb +6 -1
  41. data/lib/sbuilder/param_set_def_func.rb +39 -0
  42. data/lib/sbuilder/param_set_if.rb +45 -10
  43. data/lib/sbuilder/param_set_loader_swagger.rb +56 -26
  44. data/lib/sbuilder/param_set_step.rb +1 -1
  45. data/lib/sbuilder/param_sets.rb +2 -1
  46. data/lib/sbuilder/parameter.rb +9 -3
  47. data/lib/sbuilder/parameter_container.rb +1 -1
  48. data/lib/sbuilder/parameter_dom.rb +17 -5
  49. data/lib/sbuilder/parameter_ref.rb +39 -10
  50. data/lib/sbuilder/parser/parser_facade.rb +310 -0
  51. data/lib/sbuilder/resolver.rb +11 -6
  52. data/lib/sbuilder/resolver_loader.rb +1 -1
  53. data/lib/sbuilder/resolver_loader_yaml.rb +1 -1
  54. data/lib/sbuilder/resolver_rule.rb +1 -1
  55. data/lib/sbuilder/resolver_rule_match.rb +10 -4
  56. data/lib/sbuilder/resolver_rule_ref.rb +1 -1
  57. data/lib/sbuilder/setup_loader.rb +49 -0
  58. data/lib/sbuilder/setup_loader_env.rb +478 -0
  59. data/lib/sbuilder/setup_loader_pref.rb +56 -0
  60. data/lib/sbuilder/snippet_loader_simple.rb +125 -0
  61. data/lib/sbuilder/spec/api_loader.rb +34 -0
  62. data/lib/sbuilder/spec/api_loader_facade.rb +169 -32
  63. data/lib/sbuilder/spec/loader_plugin.rb +98 -0
  64. data/lib/sbuilder/spec/snippet_loader.rb +228 -0
  65. data/lib/sbuilder/symbol_table.rb +279 -0
  66. data/lib/utils/{cache_lines.rb → fileio.rb} +8 -1
  67. data/lib/utils/logger.rb +2 -1
  68. data/lib/utils/powerset.rb +13 -0
  69. data/lib/utils/validate.rb +38 -0
  70. data/mustache/cfg/const_def.mustache +2 -0
  71. data/mustache/cfg/macro_run.mustache +1 -4
  72. data/mustache/data-model-header.mustache +1 -0
  73. data/mustache/definition_types.mustache +34 -4
  74. data/mustache/domains.mustache +1 -1
  75. data/mustache/domains_assign.mustache +1 -1
  76. data/mustache/infrastructure-service-init.mustache +1 -1
  77. data/mustache/interface_processes.mustache +16 -10
  78. data/mustache/interface_types.mustache +37 -11
  79. data/mustache/operator-infrastructure-service.mustache +1 -1
  80. data/mustache/resources/schedule_operator_new_step.tla +8 -0
  81. data/mustache/resources/schedule_process_macro.tla +37 -0
  82. data/mustache/resources/schedule_process_procedure.tla +22 -0
  83. data/mustache/resources/schedule_throw.tla +16 -0
  84. data/mustache/setup/domains_run.mustache +8 -2
  85. data/mustache/setup/operator_run.mustache +0 -4
  86. data/mustache/setup/steps_run.mustache +4 -3
  87. data/mustache/setup/steps_run_parameterBind.mustache +14 -6
  88. data/mustache/setup/steps_run_parameterExact.mustache +7 -3
  89. data/mustache/state_type_invariant-infrastructure-service.mustache +9 -4
  90. data/mustache/tla/const_def.mustache +1 -1
  91. data/mustache/tla/macro_run.mustache +7 -1
  92. data/mustache/tla/module_header.mustache +1 -1
  93. data/mustache/tla/operator_run.mustache +8 -5
  94. data/mustache/tla/plc_define_run.mustache +45 -36
  95. data/mustache/tla/plc_run_state.mustache +12 -5
  96. data/src-extend/extend/extend_assumptions.mustache +3 -0
  97. data/src-extend/extend/extend_const.mustache +3 -0
  98. data/src-extend/extend/extend_implementation.mustache +3 -0
  99. data/src-extend/extend/extend_invariant.mustache +3 -0
  100. data/src-extend/extend/extend_macros.mustache +3 -0
  101. data/src-extend/extend/extend_operations.mustache +3 -0
  102. data/src-extend/extend/extend_state.mustache +3 -0
  103. data/src/pet/extend/extend_assumptions.mustache +4 -0
  104. data/src/pet/extend/extend_implementation.mustache +3 -0
  105. data/src/pet/extend/extend_invariant.mustache +3 -0
  106. data/src/pet/extend/extend_macros.mustache +3 -0
  107. data/src/pet/extend/extend_operations.mustache +4 -0
  108. data/src/pet/extend/extend_state.mustache +3 -0
  109. data/src/pet/interface +5 -5
  110. data/src/pet/interface_delete_pet.tla +1 -1
  111. data/src/pet/interface_get_pet.tla +1 -1
  112. data/src/pet/interface_post_pet.tla +4 -2
  113. data/src/pet/interface_post_tag.tla +1 -1
  114. data/src/pet/interface_put_tag.tla +1 -1
  115. data/tla-sbuilder.gemspec +3 -3
  116. metadata +44 -19
  117. data/mustache/name_definition_type.mustache +0 -5
  118. data/mustache/name_domain.mustache +0 -5
  119. data/mustache/name_domain_value.mustache +0 -5
  120. data/mustache/name_domain_value_prefix.mustache +0 -5
  121. data/mustache/name_interface_response_type.mustache +0 -6
  122. data/mustache/name_interface_type.mustache +0 -6
  123. data/mustache/name_parameter_type.mustache +0 -6
  124. data/mustache/name_process.mustache +0 -6
  125. data/mustache/state_type_invariant.mustache +0 -17
  126. data/mustache/state_variables.mustache +0 -20
  127. data/src-extend/extend/extend_invariant_cfg.mustache +0 -7
@@ -1,9 +1,5 @@
1
1
  (* Control execution *)
2
2
 
3
3
  \* RunProcessRunning( stepdefs ) == { e.process : e \in Head( stepdefs ) }
4
- RunProcessRunning( stepdefs ) == (CHOOSE s \in Head( stepdefs ): TRUE ).process
5
- RunProcessEnabled( stepdefs, s ) == Len( stepdefs ) # 0 /\ s = RunProcessRunning( stepdefs )
6
- RunProcessesToRun( stepdefs ) == Tail( stepdefs )
7
- RunProcessParameter( stepdefs ) == Head( stepdefs )
8
4
 
9
5
  RunInTransaction == tx_running \* state variable tx_running records transaction state
@@ -11,9 +11,10 @@
11
11
  RunSteps == <<
12
12
  {{#steps}}
13
13
 
14
- { [ process |-> "p_{{process}}",
15
- bindRule |-> {{>setup/steps_run_bind_rule.mustache }},
16
- bindSet |-> {{>setup/steps_run_bind_set.mustache }}
14
+ { [ process |-> "p_{{process}}"
15
+ , bindRule |-> {{>setup/steps_run_bind_rule.mustache }}
16
+ , bindSet |-> {{>setup/steps_run_bind_set.mustache }}
17
+ , ctx |-> Nil
17
18
  ]
18
19
  } {{_comma}} (* interface/process : {{process}} *)
19
20
  {{/steps}}
@@ -22,15 +22,15 @@
22
22
 
23
23
  Case 1:
24
24
 
25
- }}{{#domain_element}}{{parameter_name}}|->"{{domain_element}}"{{_comma}}{{/domain_element}}{{!
25
+ }}{{#domain_element}}{{#parameter_name}}{{parameter_name}}|->{{/parameter_name}}"{{domain_element}}"{{_comma}}{{/domain_element}}{{!
26
26
 
27
27
  Case 2:
28
28
 
29
- }}{{#domain_value}}{{parameter_name}}|->{{domain_value}}{{_comma}}{{/domain_value}}{{!
29
+ }}{{#domain_value}}{{#parameter_name}}{{parameter_name}}|->{{/parameter_name}}{{{domain_value}}}{{_comma}}{{/domain_value}}{{!
30
30
 
31
31
  Case 3:
32
32
 
33
- }}{{^domain_value}}{{^domain_element}}{{^columns.length}}{{^rows.length}}{{parameter_name}}|->Nil{{_comma}}{{/rows.length}}{{/columns.length}}{{/domain_element}}{{/domain_value}}{{!
33
+ }}{{^domain_value}}{{^domain_element}}{{^columns.length}}{{^rows.length}}{{#parameter_name}}{{parameter_name}}|->{{/parameter_name}}Nil{{_comma}}{{/rows.length}}{{/columns.length}}{{/domain_element}}{{/domain_value}}{{!
34
34
 
35
35
 
36
36
  Case 4: Record
@@ -70,13 +70,21 @@ NOTICE: no newline --> parameter nicely on one line
70
70
 
71
71
  Start array parameter
72
72
 
73
- }}{{#rows.length}} _rows |-> { [ key |-> "{{parameter_name}}", set |-> { {{/rows.length}}{{!
73
+ }}{{#rows.length}} _rows |-> { [ key |-> "{{parameter_name}}", row_types |-> "{{row_types}}", set |-> { {{/rows.length}}{{!
74
74
 
75
75
  iterate rows
76
76
  [ <recursion> ] _comma
77
77
 
78
- }}{{#rows}} [ {{#columns}} {{>setup/steps_run_parameterBind.mustache}} {{/columns}} ] {{_comma}} {{/rows}}{{!
78
+ }}{{#rows}}{{!
79
+ row with singleton elements (i.e. columns: false )
80
+ }}{{^columns.length}}{{>setup/steps_run_parameterBind.mustache}} {{/columns.length}}{{!
81
+
82
+ row with hash element starts (i.e. columns.length defined )
83
+
84
+ }}{{#columns.length}}[ {{/columns.length}}{{#columns}}{{>setup/steps_run_parameterBind.mustache}} {{/columns}} {{!
85
+ row with hash element ends
86
+ }}{{#columns.length}} ]{{_comma}}{{/columns.length}} {{/rows}}{{!
79
87
 
80
88
  End of rows
81
89
 
82
- }}{{#rows.length}} } ]} {{/rows.length}}
90
+ }}{{#rows.length}} } ]}{{_comma}} {{/rows.length}}
@@ -53,7 +53,7 @@
53
53
 
54
54
  - output: domain_value
55
55
 
56
- }}{{#domain_value}}{{domain_value}}{{/domain_value}}{{!
56
+ }}{{#domain_value}}{{{domain_value}}}{{/domain_value}}{{!
57
57
 
58
58
  Case 3: no domain_value, no domain_elment, no rows, no columns
59
59
 
@@ -65,7 +65,11 @@
65
65
  - iterate rows [ <recursion> ]
66
66
  - output }
67
67
 
68
- }}{{#rows.length}} { {{/rows.length}}{{#rows}}[ {{>setup/steps_run_parameterExact.mustache}} ]{{_comma}}{{/rows}}{{#rows.length}} }{{/rows.length}}{{!
68
+ }}{{#rows.length}} { {{/rows.length}}{{#rows}}{{!
69
+
70
+ when iterating rows check if row defines columns (i.e. columns.length given ) --> surround with [ ... ]
71
+
72
+ }}{{#columns.length}}[ {{/columns.length}} {{>setup/steps_run_parameterExact.mustache}} {{#columns.length}} ]{{/columns.length}}{{_comma}}{{/rows}}{{#rows.length}} }{{/rows.length}}{{!
69
73
 
70
74
  Case 5: columns
71
75
  - output [
@@ -76,4 +80,4 @@
76
80
 
77
81
  End of columns (add comma)
78
82
 
79
- }}{{_comma}}{{/columns}}
83
+ }}{{_comma}}{{/columns}}{{! no new line }}
@@ -17,15 +17,20 @@
17
17
 
18
18
  iterate infrastructureServices
19
19
 
20
- - output: <interface_name> |-> Nil,
20
+ - output: <interface-name> |-> Nil,
21
21
 
22
22
 
23
- }}{{#infrastructureServices}}InfrastructureService_TypeInvariant_{{interface_name}} == responses.{{>name_process.mustache}}.response \in { Nil }{{!
23
+ }}{{#infrastructureServices}}InfrastructureService_TypeInvariant_{{#SPEC_NAME}}infra_services.{{interface_operation}}{{/SPEC_NAME}} == responses.{{#SPEC_NAME}}infra_services.{{interface_operation}}{{/SPEC_NAME}}.response \in { Nil }{{!
24
24
 
25
25
  iterate response definitions
26
+
26
27
  }}{{#response_definitions}}{{!
28
+
27
29
  end of response definitions
28
- }} \union {{namespace}}{{type}}{{/response_definitions}}{{!
30
+
31
+ add ???
32
+
33
+ }} \union {{#SPEC_NAME}}{{metatype}}.{{type}}{{/SPEC_NAME}}{{/response_definitions}}{{!
29
34
 
30
35
  end of intefaces
31
36
 
@@ -39,7 +44,7 @@
39
44
  Iterate infrastructureServices again to create call
40
45
 
41
46
  }}InfrastructureService_TypeInvariant == TRUE {{#infrastructureServices}}
42
- /\ InfrastructureService_TypeInvariant_{{interface_name}}{{/infrastructureServices}}
47
+ /\ InfrastructureService_TypeInvariant_{{#SPEC_NAME}}infra_services.{{interface_operation}}{{/SPEC_NAME}}{{/infrastructureServices}}
43
48
 
44
49
  {{!
45
50
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  CONSTANTS WildCard \* bind to any value
4
4
  CONSTANTS Nil \* no value
5
-
5
+ CONSTANTS Abort \* response.status error
@@ -11,10 +11,13 @@
11
11
  await ProcessEnabled( steps, s );
12
12
 
13
13
  (* process entered, remove head from sequence 'steps' *)
14
- step := ProcessRunning( steps ); \* Head( steps );
14
+ step := ProcessRunning( steps ); \* Head( steps ).process;
15
15
  step_parameter := ProcessParameter( steps );
16
16
  \* steps := ProcessesToRun( steps ); \* Tail( steps );
17
17
 
18
+ \* Context to resume to from Head(steps ), Nil = not resuming
19
+ resume_context := ProcessStep( steps ).ctx;
20
+
18
21
  (* Reset infrastructure service responses on process entry *)
19
22
  responses := InfrastructureServiceInit;
20
23
 
@@ -38,6 +41,9 @@
38
41
  macro process_done( s ) {
39
42
 
40
43
  steps := ProcessesToRun( steps ); \* Tail( steps );
44
+
45
+ \* process must clear resume context
46
+ assert( resume_context = Nil );
41
47
 
42
48
  (* Flag Transaction started *)
43
49
  tx_running := FALSE;
@@ -5,5 +5,5 @@ Generation timestemp: {{META.timestamp}}
5
5
 
6
6
  ------------------------------ MODULE model ------------------------------
7
7
 
8
- EXTENDS TLC, FiniteSets, Sequences, Naturals
8
+ EXTENDS TLC, FiniteSets, Sequences, Integers
9
9
 
@@ -1,9 +1,12 @@
1
- (* Override in extending model *)
2
1
 
3
- ProcessEnabled( stepdefs, s ) == FALSE
4
- ProcessRunning( stepdefs ) == {} \* Head( stepdefs )
5
- ProcessParameter( stepdefs ) == {} \* Head( stepdefs )
6
- ProcessesToRun( stepdefs ) == {} \* Tail( stepdefs )
2
+ (* schedule operators *)
3
+
4
+ \* Notice: cardinality of +steps+ sequence elements is 1, change in future?
5
+ ProcessStep( stepdefs ) == (CHOOSE s \in Head( stepdefs ): TRUE )
6
+ ProcessRunning( stepdefs ) == ProcessStep( stepdefs ).process
7
+ ProcessEnabled( stepdefs, s ) == Len( stepdefs ) # 0 /\ s = ProcessRunning( stepdefs )
8
+ ProcessesToRun( stepdefs ) == Tail( stepdefs )
9
+ ProcessParameter( stepdefs ) == ProcessStep( stepdefs )
7
10
 
8
11
  TickNext( t ) == t + 1 \* advance time (when process start)
9
12
  InTransaction == FALSE \* TRUE when application service running, FALSE when not
@@ -1,19 +1,23 @@
1
1
 
2
- (*
3
- Current time in state variable now gets ticked
4
- when process starts.
5
- *)
6
- currentTime == now
2
+ (*
3
+ Current time in state variable now gets ticked
4
+ when process starts.
5
+ *)
6
+ currentTime == now
7
7
 
8
8
  (*
9
- Variable step_parameter' contains a record with field 'bindSet', which
10
- contains a set with input for the process. If 'bindSet' is 'Nil' return
11
- whole 'inputSet'
12
- *)
13
- ProcessParameterInput( inputSet ) == IF (CHOOSE s \in step_parameter': TRUE).bindSet = Nil
14
- THEN inputSet
15
- ELSE (CHOOSE s \in step_parameter': TRUE).bindSet
9
+ Return set of possible bindings to an enabled process
16
10
 
11
+ @param [Set] inputSet set of all possible inputs to a process
12
+ @return first that matches
13
+ - inputSet if step_parameter.bindSet == Nil
14
+ - step_parameter.bindSet if step_parameter.bindSet != Nil
15
+ *)
16
+ ProcessParameterInput( inputSet ) ==
17
+ IF step_parameter'.bindSet = Nil
18
+ THEN inputSet
19
+ ELSE step_parameter'.bindSet
20
+
17
21
  (* All record fields in 'bindDef' must bind with corresponding fields in 'inputParam' *)
18
22
  \* ProcessParameterEnablesTst( inputParam, bindDefs ) == \A key \in { k \in DOMAIN bindDefs : k # "_key" }: bindDefs[key] = inputParam[key]
19
23
 
@@ -22,36 +26,41 @@
22
26
 
23
27
  - all 'normal' field in 'bindDefs' are found in 'inputParam'
24
28
  - and all subrecords can be validated recursively using 'ProcessParameterEnables' using a the set in field '_key'
25
- - and each record in the set in field '_rows' validates at least one row in 'inputParam'
26
- -- cardinality of inputParam[key] = cardinality _row.set
29
+ - and for each record in the set in field '_rows'
30
+ -- validates at least one row in 'inputParam'
31
+ --- cardinality of inputParam[key] = cardinality _row.set
32
+ -- OR equals 'values' set
27
33
 
28
-
29
-
30
34
  Recurse one level down in 'inputParam' using keys 'bindDefs._key.key'.
31
35
  Recursion is done only if 'bindDefs' defines field '_key'.
32
36
 
37
+
33
38
  *)
34
39
  RECURSIVE ProcessParameterEnables( _, _ )
35
- ProcessParameterEnables( inputParam, bindDefs ) == ( \A key \in { k \in DOMAIN bindDefs : Len(k)<4 \/ (SubSeq(k,1,4) # "_key" /\ k # "_rows" )}: bindDefs[key] = inputParam[key] )
40
+ ProcessParameterEnables( inputParam, bindDefs ) ==
41
+ ( \A key \in { k \in DOMAIN bindDefs : Len(k)<4 \/ (SubSeq(k,1,4) # "_key" /\ k # "_rows" )}: bindDefs[key] = inputParam[key] )
36
42
  /\ ( \A reckey \in { k \in DOMAIN bindDefs : Len(k)>3 /\SubSeq(k,1,4) = "_key" }: \A r \in bindDefs[reckey] : ProcessParameterEnables( inputParam[r.key], r.rec ) )
37
- /\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_rows" }: \A r \in bindDefs[reckey] :
38
- Cardinality( r.set ) = Cardinality( inputParam[r.key] ) /\ \A bDef \in r.set: \E ip \in inputParam[r.key]: ProcessParameterEnables( ip, bDef )
39
- )
43
+ /\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_rows" }: \A r \in bindDefs[reckey] :
44
+ (r.row_types = "singletons" /\ r.set = inputParam[r.key] )
45
+ \/ (r.row_types = "hashes" /\ Cardinality( r.set ) = Cardinality( inputParam[r.key] ) /\ \A bDef \in r.set: \E ip \in inputParam[r.key]: ProcessParameterEnables( ip, bDef ) )
46
+ )
40
47
 
41
48
 
42
- (* ProcessParameterBind operator
43
-
44
- Bind 'inputParam' for the process currently being executed with values in 'step_parameter'.
45
-
46
- Bind to inputParameter allowed if one the following matches
47
- - step parameter WildCard
48
- - process parameter = WildCard
49
- - predicate 'ProcessParameterEnables' resolves TRUE for some paramter set in 'step_parameter'
50
-
51
- *)
52
- ProcessParameterBind( inputParam ) == step_parameter' = WildCard
53
- \/ { processEnabledInStep \in step_parameter' :
54
- processEnabledInStep.process = step'
55
- /\ ( processEnabledInStep.bindRule = WildCard
56
- \/ ProcessParameterEnables( inputParam, processEnabledInStep.bindRule ) ) } # {}
57
-
49
+ (*
50
+
51
+ Predicate to filter elements in ProcessParameterInput set to pass
52
+ to +steps+ element in +step_parameter' variable.
53
+
54
+ Pass +inputParameter+ to a process if one the following matches
55
+ - resume_contex # Nil (i.e. process execution is resuming)
56
+ - step_parameter = WildCard (i.e. Head elemend of +steps+ sequence is WildCard, allow everything )
57
+ - step_parameter.bindSet = WildCard (i.e. Head element defines bindSet element)
58
+ - predicate 'ProcessParameterEnables' resolves TRUE for step_parameter'.bindRule
59
+ *)
60
+
61
+ ProcessParameterBind( inputParam ) ==
62
+ \/ resume_context' # Nil
63
+ \/ step_parameter' = WildCard
64
+ \/ step_parameter'.bindRule = WildCard
65
+ \/ ProcessParameterEnables( inputParam, step_parameter'.bindRule )
66
+
@@ -5,8 +5,15 @@
5
5
  ******************************************************************)
6
6
 
7
7
  variables
8
- steps = Steps; \* sequence of [ { process |-> {}, parameter |-> {} }]
9
- step = Nil; \* processes currently enabled
10
- step_parameter = {}; \* paramter binding for currently enabled processes
11
- now = 0; \* current time
12
- tx_running = FALSE; \* TRUE when process is running
8
+ \* sequence of [ { process |-> {}, parameter |-> {} }]
9
+ steps = Steps;
10
+ \* process currently running = self with _ replcing non-numeric
11
+ step = Nil;
12
+ \* head from +steps+ sequence used to schedule +step+
13
+ step_parameter = {};
14
+ \* current time tick, each process run in own tick
15
+ now = 0;
16
+ \* TRUE when process is running
17
+ tx_running = FALSE;
18
+ \* rec [ ret_ctx |-> stack entry push in resume ], when resuming, Nil when not
19
+ resume_context = Nil;
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Assumption partials: {{#ACTIONS.dump_partials}}assumptions{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  {{>assumption}}
@@ -2,4 +2,7 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Const partials: {{#ACTIONS.dump_partials}}const{{/ACTIONS.dump_partials}}
7
+
5
8
  ******************************************************************)
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Implementation partials: {{#ACTIONS.dump_partials}}Implementation{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
 
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Invariant partials: {{#ACTIONS.dump_partials}}invariant{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  \* Operators for correctness
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Macro partials: {{#ACTIONS.dump_partials}}macros{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  (* ******************************************************************
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Operation partials: {{#ACTIONS.dump_partials}}operations{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
 
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ State partials: {{#ACTIONS.dump_partials}}state{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  {{>state}}
@@ -2,6 +2,10 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Assumption partials: {{#ACTIONS.dump_partials}}assumptions{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
10
+
7
11
  {{>assumption}}
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Implementation partials: {{#ACTIONS.dump_partials}}Implementation{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
 
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Invariant partials: {{#ACTIONS.dump_partials}}invariant{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  \* Operators for correctness
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Macro partials: {{#ACTIONS.dump_partials}}macros{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  (* ******************************************************************
@@ -2,6 +2,10 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ Operation partials: {{#ACTIONS.dump_partials}}operations{{/ACTIONS.dump_partials}}
7
+
8
+
5
9
  *)
6
10
 
7
11
 
@@ -2,6 +2,9 @@
2
2
  {{META.desc}}
3
3
  - modelData {{META.modelData}}
4
4
  - template {{META.template}}
5
+
6
+ State partials: {{#ACTIONS.dump_partials}}state{{/ACTIONS.dump_partials}}
7
+
5
8
  *)
6
9
 
7
10
  {{>state}}