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.
- checksums.yaml +4 -4
- data/README.md +150 -116
- data/VERSION +1 -1
- data/lib/cli/cli-customer.rb +23 -3
- data/lib/cli/cli-pet.rb +66 -12
- data/lib/cli/cli-text.rb +127 -8
- data/lib/cli/cli.rb +49 -6
- data/lib/sbuilder.rb +26 -3
- data/lib/sbuilder/constants.rb +165 -6
- data/lib/sbuilder/controller.rb +943 -169
- data/lib/sbuilder/controller_utils.rb +122 -0
- data/lib/sbuilder/default-sbuilder.yaml +38 -44
- data/lib/sbuilder/domain.rb +160 -36
- data/lib/sbuilder/domain_cardinality.rb +1 -1
- data/lib/sbuilder/domain_range.rb +102 -0
- data/lib/sbuilder/domain_type.rb +150 -0
- data/lib/sbuilder/domain_value.rb +21 -13
- data/lib/sbuilder/exception.rb +16 -0
- data/lib/sbuilder/extension_loader.rb +67 -686
- data/lib/sbuilder/extension_loader_deprecated_step_extensions.rb +711 -0
- data/lib/sbuilder/extension_loader_step_generator.rb +876 -0
- data/lib/sbuilder/facade/{api_loader.rb → api_loader_facade.rb} +176 -45
- data/lib/sbuilder/facade/api_loader_plugin.rb +6 -32
- data/lib/sbuilder/facade/api_loader_plugin_mixer.rb +35 -0
- data/lib/sbuilder/facade/facade_constants.rb +23 -0
- data/lib/sbuilder/facade/loader_plugin_root.rb +56 -0
- data/lib/sbuilder/facade/param_set_root.rb +55 -0
- data/lib/sbuilder/facade/snippet_loader_facade.rb +600 -0
- data/lib/sbuilder/facade/snippet_loader_plugin.rb +76 -0
- data/lib/sbuilder/facade/snippet_loader_plugin_mixer.rb +56 -0
- data/lib/sbuilder/factory.rb +224 -45
- data/lib/sbuilder/model.rb +125 -45
- data/lib/sbuilder/mustache/template.rb +107 -58
- data/lib/sbuilder/mustache/template_reader.rb +56 -46
- data/lib/sbuilder/mustache/template_reader_context.rb +64 -234
- data/lib/sbuilder/mustache/template_resolve.rb +103 -0
- data/lib/sbuilder/mustache/template_root.rb +71 -0
- data/lib/sbuilder/param_set.rb +30 -15
- data/lib/sbuilder/param_set_db.rb +1 -1
- data/lib/sbuilder/param_set_def.rb +6 -1
- data/lib/sbuilder/param_set_def_func.rb +39 -0
- data/lib/sbuilder/param_set_if.rb +45 -10
- data/lib/sbuilder/param_set_loader_swagger.rb +56 -26
- data/lib/sbuilder/param_set_step.rb +1 -1
- data/lib/sbuilder/param_sets.rb +2 -1
- data/lib/sbuilder/parameter.rb +9 -3
- data/lib/sbuilder/parameter_container.rb +1 -1
- data/lib/sbuilder/parameter_dom.rb +17 -5
- data/lib/sbuilder/parameter_ref.rb +39 -10
- data/lib/sbuilder/parser/parser_facade.rb +310 -0
- data/lib/sbuilder/resolver.rb +11 -6
- data/lib/sbuilder/resolver_loader.rb +1 -1
- data/lib/sbuilder/resolver_loader_yaml.rb +1 -1
- data/lib/sbuilder/resolver_rule.rb +1 -1
- data/lib/sbuilder/resolver_rule_match.rb +10 -4
- data/lib/sbuilder/resolver_rule_ref.rb +1 -1
- data/lib/sbuilder/setup_loader.rb +49 -0
- data/lib/sbuilder/setup_loader_env.rb +478 -0
- data/lib/sbuilder/setup_loader_pref.rb +56 -0
- data/lib/sbuilder/snippet_loader_simple.rb +125 -0
- data/lib/sbuilder/spec/api_loader.rb +34 -0
- data/lib/sbuilder/spec/api_loader_facade.rb +169 -32
- data/lib/sbuilder/spec/loader_plugin.rb +98 -0
- data/lib/sbuilder/spec/snippet_loader.rb +228 -0
- data/lib/sbuilder/symbol_table.rb +279 -0
- data/lib/utils/{cache_lines.rb → fileio.rb} +8 -1
- data/lib/utils/logger.rb +2 -1
- data/lib/utils/powerset.rb +13 -0
- data/lib/utils/validate.rb +38 -0
- data/mustache/cfg/const_def.mustache +2 -0
- data/mustache/cfg/macro_run.mustache +1 -4
- data/mustache/data-model-header.mustache +1 -0
- data/mustache/definition_types.mustache +34 -4
- data/mustache/domains.mustache +1 -1
- data/mustache/domains_assign.mustache +1 -1
- data/mustache/infrastructure-service-init.mustache +1 -1
- data/mustache/interface_processes.mustache +16 -10
- data/mustache/interface_types.mustache +37 -11
- data/mustache/operator-infrastructure-service.mustache +1 -1
- data/mustache/resources/schedule_operator_new_step.tla +8 -0
- data/mustache/resources/schedule_process_macro.tla +37 -0
- data/mustache/resources/schedule_process_procedure.tla +22 -0
- data/mustache/resources/schedule_throw.tla +16 -0
- data/mustache/setup/domains_run.mustache +8 -2
- data/mustache/setup/operator_run.mustache +0 -4
- data/mustache/setup/steps_run.mustache +4 -3
- data/mustache/setup/steps_run_parameterBind.mustache +14 -6
- data/mustache/setup/steps_run_parameterExact.mustache +7 -3
- data/mustache/state_type_invariant-infrastructure-service.mustache +9 -4
- data/mustache/tla/const_def.mustache +1 -1
- data/mustache/tla/macro_run.mustache +7 -1
- data/mustache/tla/module_header.mustache +1 -1
- data/mustache/tla/operator_run.mustache +8 -5
- data/mustache/tla/plc_define_run.mustache +45 -36
- data/mustache/tla/plc_run_state.mustache +12 -5
- data/src-extend/extend/extend_assumptions.mustache +3 -0
- data/src-extend/extend/extend_const.mustache +3 -0
- data/src-extend/extend/extend_implementation.mustache +3 -0
- data/src-extend/extend/extend_invariant.mustache +3 -0
- data/src-extend/extend/extend_macros.mustache +3 -0
- data/src-extend/extend/extend_operations.mustache +3 -0
- data/src-extend/extend/extend_state.mustache +3 -0
- data/src/pet/extend/extend_assumptions.mustache +4 -0
- data/src/pet/extend/extend_implementation.mustache +3 -0
- data/src/pet/extend/extend_invariant.mustache +3 -0
- data/src/pet/extend/extend_macros.mustache +3 -0
- data/src/pet/extend/extend_operations.mustache +4 -0
- data/src/pet/extend/extend_state.mustache +3 -0
- data/src/pet/interface +5 -5
- data/src/pet/interface_delete_pet.tla +1 -1
- data/src/pet/interface_get_pet.tla +1 -1
- data/src/pet/interface_post_pet.tla +4 -2
- data/src/pet/interface_post_tag.tla +1 -1
- data/src/pet/interface_put_tag.tla +1 -1
- data/tla-sbuilder.gemspec +3 -3
- metadata +44 -19
- data/mustache/name_definition_type.mustache +0 -5
- data/mustache/name_domain.mustache +0 -5
- data/mustache/name_domain_value.mustache +0 -5
- data/mustache/name_domain_value_prefix.mustache +0 -5
- data/mustache/name_interface_response_type.mustache +0 -6
- data/mustache/name_interface_type.mustache +0 -6
- data/mustache/name_parameter_type.mustache +0 -6
- data/mustache/name_process.mustache +0 -6
- data/mustache/state_type_invariant.mustache +0 -17
- data/mustache/state_variables.mustache +0 -20
- data/src-extend/extend/extend_invariant_cfg.mustache +0 -7
data/src/pet/interface
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
}}
|
6
6
|
|
7
7
|
|
8
|
-
{{
|
9
|
-
{{
|
10
|
-
{{
|
11
|
-
{{
|
12
|
-
{{
|
8
|
+
{{!interface_post_pet.tla}}
|
9
|
+
{{!interface_get_pet.tla}}
|
10
|
+
{{!interface_delete_pet.tla}}
|
11
|
+
{{!interface_post_tag.tla}}
|
12
|
+
{{!interface_put_tag.tla}}
|
data/tla-sbuilder.gemspec
CHANGED
@@ -33,12 +33,12 @@ EOF
|
|
33
33
|
|
34
34
|
s.required_ruby_version = '~> 2'
|
35
35
|
|
36
|
-
s.add_runtime_dependency 'mustache', '~>1.0', ">=1.0.
|
36
|
+
s.add_runtime_dependency 'mustache', '~>1.0', ">=1.0.3"
|
37
37
|
s.add_runtime_dependency 'hashie', '~>3.3', ">=3.3.2"
|
38
38
|
s.add_runtime_dependency 'thor', '~>0.19', ">=0.19.1"
|
39
39
|
s.add_runtime_dependency 'json-schema', '~>2.5', ">=2.5.2"
|
40
|
-
s.add_runtime_dependency 'tla-parser-s', ">=0.
|
41
|
-
|
40
|
+
s.add_runtime_dependency 'tla-parser-s', '~>0.2', ">=0.2.2"
|
41
|
+
|
42
42
|
# # used in pet.sh
|
43
43
|
# s.add_runtime_dependency 'bcat'
|
44
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tla-sbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jarjuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mustache
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '1.0'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.
|
22
|
+
version: 1.0.3
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '1.0'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.0.
|
32
|
+
version: 1.0.3
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: hashie
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,16 +94,22 @@ dependencies:
|
|
94
94
|
name: tla-parser-s
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0.2'
|
97
100
|
- - ">="
|
98
101
|
- !ruby/object:Gem::Version
|
99
|
-
version: 0.
|
102
|
+
version: 0.2.2
|
100
103
|
type: :runtime
|
101
104
|
prerelease: false
|
102
105
|
version_requirements: !ruby/object:Gem::Requirement
|
103
106
|
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.2'
|
104
110
|
- - ">="
|
105
111
|
- !ruby/object:Gem::Version
|
106
|
-
version: 0.
|
112
|
+
version: 0.2.2
|
107
113
|
description: |2+
|
108
114
|
|
109
115
|
A tool to generate runnable specification models in TLA+ language
|
@@ -128,22 +134,37 @@ files:
|
|
128
134
|
- lib/sbuilder.rb
|
129
135
|
- lib/sbuilder/constants.rb
|
130
136
|
- lib/sbuilder/controller.rb
|
137
|
+
- lib/sbuilder/controller_utils.rb
|
131
138
|
- lib/sbuilder/default-sbuilder.yaml
|
132
139
|
- lib/sbuilder/domain.rb
|
133
140
|
- lib/sbuilder/domain_cardinality.rb
|
141
|
+
- lib/sbuilder/domain_range.rb
|
142
|
+
- lib/sbuilder/domain_type.rb
|
134
143
|
- lib/sbuilder/domain_value.rb
|
135
144
|
- lib/sbuilder/exception.rb
|
136
145
|
- lib/sbuilder/extension_loader.rb
|
137
|
-
- lib/sbuilder/
|
146
|
+
- lib/sbuilder/extension_loader_deprecated_step_extensions.rb
|
147
|
+
- lib/sbuilder/extension_loader_step_generator.rb
|
148
|
+
- lib/sbuilder/facade/api_loader_facade.rb
|
138
149
|
- lib/sbuilder/facade/api_loader_plugin.rb
|
150
|
+
- lib/sbuilder/facade/api_loader_plugin_mixer.rb
|
151
|
+
- lib/sbuilder/facade/facade_constants.rb
|
152
|
+
- lib/sbuilder/facade/loader_plugin_root.rb
|
153
|
+
- lib/sbuilder/facade/param_set_root.rb
|
154
|
+
- lib/sbuilder/facade/snippet_loader_facade.rb
|
155
|
+
- lib/sbuilder/facade/snippet_loader_plugin.rb
|
156
|
+
- lib/sbuilder/facade/snippet_loader_plugin_mixer.rb
|
139
157
|
- lib/sbuilder/factory.rb
|
140
158
|
- lib/sbuilder/model.rb
|
141
159
|
- lib/sbuilder/mustache/template.rb
|
142
160
|
- lib/sbuilder/mustache/template_reader.rb
|
143
161
|
- lib/sbuilder/mustache/template_reader_context.rb
|
162
|
+
- lib/sbuilder/mustache/template_resolve.rb
|
163
|
+
- lib/sbuilder/mustache/template_root.rb
|
144
164
|
- lib/sbuilder/param_set.rb
|
145
165
|
- lib/sbuilder/param_set_db.rb
|
146
166
|
- lib/sbuilder/param_set_def.rb
|
167
|
+
- lib/sbuilder/param_set_def_func.rb
|
147
168
|
- lib/sbuilder/param_set_if.rb
|
148
169
|
- lib/sbuilder/param_set_loader_swagger.rb
|
149
170
|
- lib/sbuilder/param_set_step.rb
|
@@ -152,19 +173,30 @@ files:
|
|
152
173
|
- lib/sbuilder/parameter_container.rb
|
153
174
|
- lib/sbuilder/parameter_dom.rb
|
154
175
|
- lib/sbuilder/parameter_ref.rb
|
176
|
+
- lib/sbuilder/parser/parser_facade.rb
|
155
177
|
- lib/sbuilder/resolver.rb
|
156
178
|
- lib/sbuilder/resolver_loader.rb
|
157
179
|
- lib/sbuilder/resolver_loader_yaml.rb
|
158
180
|
- lib/sbuilder/resolver_rule.rb
|
159
181
|
- lib/sbuilder/resolver_rule_match.rb
|
160
182
|
- lib/sbuilder/resolver_rule_ref.rb
|
183
|
+
- lib/sbuilder/setup_loader.rb
|
184
|
+
- lib/sbuilder/setup_loader_env.rb
|
185
|
+
- lib/sbuilder/setup_loader_pref.rb
|
186
|
+
- lib/sbuilder/snippet_loader_simple.rb
|
161
187
|
- lib/sbuilder/spec/README
|
188
|
+
- lib/sbuilder/spec/api_loader.rb
|
162
189
|
- lib/sbuilder/spec/api_loader_facade.rb
|
163
|
-
- lib/
|
190
|
+
- lib/sbuilder/spec/loader_plugin.rb
|
191
|
+
- lib/sbuilder/spec/snippet_loader.rb
|
192
|
+
- lib/sbuilder/symbol_table.rb
|
193
|
+
- lib/utils/fileio.rb
|
164
194
|
- lib/utils/hash_inject.rb
|
165
195
|
- lib/utils/logger.rb
|
166
196
|
- lib/utils/netio.rb
|
197
|
+
- lib/utils/powerset.rb
|
167
198
|
- lib/utils/string_inject.rb
|
199
|
+
- lib/utils/validate.rb
|
168
200
|
- lib/utils/version.rb
|
169
201
|
- mustache/cfg/const_def.mustache
|
170
202
|
- mustache/cfg/const_run.mustache
|
@@ -194,15 +226,7 @@ files:
|
|
194
226
|
- mustache/invariant_activate.mustache
|
195
227
|
- mustache/markdown-header.mustache
|
196
228
|
- mustache/markdown-toc.mustache
|
197
|
-
- mustache/name_definition_type.mustache
|
198
|
-
- mustache/name_domain.mustache
|
199
|
-
- mustache/name_domain_value.mustache
|
200
|
-
- mustache/name_domain_value_prefix.mustache
|
201
|
-
- mustache/name_interface_response_type.mustache
|
202
|
-
- mustache/name_interface_type.mustache
|
203
229
|
- mustache/name_parameter_definition.mustache
|
204
|
-
- mustache/name_parameter_type.mustache
|
205
|
-
- mustache/name_process.mustache
|
206
230
|
- mustache/name_type_invariant.mustache
|
207
231
|
- mustache/name_variable.mustache
|
208
232
|
- mustache/operator-infrastructure-service.mustache
|
@@ -212,6 +236,10 @@ files:
|
|
212
236
|
- mustache/possibility/possibility_definition.mustache
|
213
237
|
- mustache/possibility/possibility_directive.mustache
|
214
238
|
- mustache/possibility/possility_setup.mustache
|
239
|
+
- mustache/resources/schedule_operator_new_step.tla
|
240
|
+
- mustache/resources/schedule_process_macro.tla
|
241
|
+
- mustache/resources/schedule_process_procedure.tla
|
242
|
+
- mustache/resources/schedule_throw.tla
|
215
243
|
- mustache/setup/assumptions_activate.mustache
|
216
244
|
- mustache/setup/domains_run.mustache
|
217
245
|
- mustache/setup/module_footer.mustache
|
@@ -224,9 +252,7 @@ files:
|
|
224
252
|
- mustache/setup/steps_run_parameterBind.mustache
|
225
253
|
- mustache/setup/steps_run_parameterExact.mustache
|
226
254
|
- mustache/state_type_invariant-infrastructure-service.mustache
|
227
|
-
- mustache/state_type_invariant.mustache
|
228
255
|
- mustache/state_type_invariant_cfg.mustache
|
229
|
-
- mustache/state_variables.mustache
|
230
256
|
- mustache/tla/const_def.mustache
|
231
257
|
- mustache/tla/const_run.mustache
|
232
258
|
- mustache/tla/macro-infrastructure-service.mustache
|
@@ -250,7 +276,6 @@ files:
|
|
250
276
|
- src-extend/extend/extend_const.mustache
|
251
277
|
- src-extend/extend/extend_implementation.mustache
|
252
278
|
- src-extend/extend/extend_invariant.mustache
|
253
|
-
- src-extend/extend/extend_invariant_cfg.mustache
|
254
279
|
- src-extend/extend/extend_macros.mustache
|
255
280
|
- src-extend/extend/extend_operations.mustache
|
256
281
|
- src-extend/extend/extend_state.mustache
|
@@ -1,17 +0,0 @@
|
|
1
|
-
{{!
|
2
|
-
|
3
|
-
state_type_constraint: type invariant operator for a varibale
|
4
|
-
|
5
|
-
}}
|
6
|
-
|
7
|
-
|
8
|
-
(******************************************************************
|
9
|
-
Type invariants: {{META.desc}}
|
10
|
-
- modelData {{META.modelData}}
|
11
|
-
- template {{META.template}}
|
12
|
-
******************************************************************)
|
13
|
-
|
14
|
-
{{#variables}}
|
15
|
-
{{>name_type_invariant.mustache}} == \A entry \in {{>name_variable.mustache}}: entry \in {{>name_interface_type.mustache}}
|
16
|
-
{{/variables}}
|
17
|
-
|
@@ -1,20 +0,0 @@
|
|
1
|
-
{{!
|
2
|
-
|
3
|
-
state_variables: state variables parser
|
4
|
-
|
5
|
-
|
6
|
-
}}
|
7
|
-
|
8
|
-
(******************************************************************
|
9
|
-
State varibles: {{META.desc}}
|
10
|
-
- modelData {{META.modelData}}
|
11
|
-
- template {{META.template}}
|
12
|
-
******************************************************************)
|
13
|
-
|
14
|
-
|
15
|
-
{{#variables}}
|
16
|
-
{{>name_variable.mustache}} = {}; \* of type {{>name_interface_type.mustache}}
|
17
|
-
{{/variables}}
|
18
|
-
|
19
|
-
|
20
|
-
|