tla-sbuilder 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +328 -0
- data/VERSION +1 -0
- data/bin/sbuilder.rb +5 -0
- data/lib/cli/cli-customer.rb +420 -0
- data/lib/cli/cli-example.rb +92 -0
- data/lib/cli/cli-pet.rb +767 -0
- data/lib/cli/cli-text.rb +226 -0
- data/lib/cli/cli.rb +298 -0
- data/lib/sbuilder.rb +52 -0
- data/lib/sbuilder/constants.rb +72 -0
- data/lib/sbuilder/controller.rb +798 -0
- data/lib/sbuilder/default-sbuilder.yaml +372 -0
- data/lib/sbuilder/domain.rb +124 -0
- data/lib/sbuilder/domain_cardinality.rb +37 -0
- data/lib/sbuilder/domain_value.rb +81 -0
- data/lib/sbuilder/exception.rb +27 -0
- data/lib/sbuilder/extension_loader.rb +721 -0
- data/lib/sbuilder/factory.rb +234 -0
- data/lib/sbuilder/model.rb +356 -0
- data/lib/sbuilder/mustache/template.rb +125 -0
- data/lib/sbuilder/mustache/template_reader.rb +206 -0
- data/lib/sbuilder/mustache/template_reader_context.rb +371 -0
- data/lib/sbuilder/param_set.rb +132 -0
- data/lib/sbuilder/param_set_db.rb +20 -0
- data/lib/sbuilder/param_set_def.rb +57 -0
- data/lib/sbuilder/param_set_if.rb +68 -0
- data/lib/sbuilder/param_set_loader.rb +77 -0
- data/lib/sbuilder/param_set_loader_swagger.rb +424 -0
- data/lib/sbuilder/param_set_step.rb +62 -0
- data/lib/sbuilder/param_sets.rb +54 -0
- data/lib/sbuilder/parameter.rb +97 -0
- data/lib/sbuilder/parameter_container.rb +72 -0
- data/lib/sbuilder/parameter_dom.rb +70 -0
- data/lib/sbuilder/parameter_ref.rb +71 -0
- data/lib/sbuilder/resolver.rb +78 -0
- data/lib/sbuilder/resolver_loader.rb +79 -0
- data/lib/sbuilder/resolver_loader_yaml.rb +103 -0
- data/lib/sbuilder/resolver_rule.rb +36 -0
- data/lib/sbuilder/resolver_rule_match.rb +55 -0
- data/lib/sbuilder/resolver_rule_ref.rb +37 -0
- data/lib/utils/hash_inject.rb +12 -0
- data/lib/utils/logger.rb +80 -0
- data/lib/utils/netio.rb +58 -0
- data/lib/utils/string_inject.rb +10 -0
- data/lib/utils/version.rb +13 -0
- data/mustache/cfg/const_def.mustache +8 -0
- data/mustache/cfg/const_run.mustache +3 -0
- data/mustache/cfg/invariant-infrastructure-service.mustache +4 -0
- data/mustache/cfg/macro_run.mustache +6 -0
- data/mustache/cfg/module_footer.mustache +0 -0
- data/mustache/cfg/module_header.mustache +7 -0
- data/mustache/data-model-dump.mustache +19 -0
- data/mustache/data-model-footer.mustache +5 -0
- data/mustache/data-model-header.mustache +16 -0
- data/mustache/definition_types.mustache +40 -0
- data/mustache/domains.mustache +20 -0
- data/mustache/domains_assign.mustache +22 -0
- data/mustache/domains_run.mustache +21 -0
- data/mustache/extend/extend_assumptions.mustache +7 -0
- data/mustache/extend/extend_const.mustache +5 -0
- data/mustache/extend/extend_implementation.mustache +9 -0
- data/mustache/extend/extend_invariant.mustache +7 -0
- data/mustache/extend/extend_invariant_cfg.mustache +7 -0
- data/mustache/extend/extend_macros.mustache +19 -0
- data/mustache/extend/extend_operations.mustache +9 -0
- data/mustache/extend/extend_state.mustache +9 -0
- data/mustache/infrastructure-service-init.mustache +36 -0
- data/mustache/infrastructure-service-variables.mustache +10 -0
- data/mustache/interface_processes.mustache +38 -0
- data/mustache/interface_stubs_dummy.mustache +13 -0
- data/mustache/interface_types.mustache +52 -0
- data/mustache/markdown-header.mustache +24 -0
- data/mustache/markdown-toc.mustache +13 -0
- data/mustache/name_definition_type.mustache +5 -0
- data/mustache/name_domain.mustache +5 -0
- data/mustache/name_domain_value.mustache +5 -0
- data/mustache/name_domain_value_prefix.mustache +5 -0
- data/mustache/name_interface_response_type.mustache +6 -0
- data/mustache/name_interface_type.mustache +6 -0
- data/mustache/name_parameter_definition.mustache +5 -0
- data/mustache/name_parameter_type.mustache +6 -0
- data/mustache/name_process.mustache +6 -0
- data/mustache/name_type_invariant.mustache +5 -0
- data/mustache/name_variable.mustache +6 -0
- data/mustache/operator-infrastructure-service.mustache +13 -0
- data/mustache/possibility/module_extends.mustache +1 -0
- data/mustache/possibility/module_footer.mustache +1 -0
- data/mustache/possibility/module_header.mustache +8 -0
- data/mustache/possibility/possibility_definition.mustache +12 -0
- data/mustache/possibility/possibility_directive.mustache +1 -0
- data/mustache/possibility/possility_setup.mustache +28 -0
- data/mustache/setup/module_footer.mustache +1 -0
- data/mustache/setup/module_header.mustache +9 -0
- data/mustache/setup/operator_run.mustache +7 -0
- data/mustache/setup/operator_tick.mustache +2 -0
- data/mustache/setup/steps_run.mustache +22 -0
- data/mustache/setup/steps_run_bind_rule.mustache +51 -0
- data/mustache/setup/steps_run_bind_set.mustache +37 -0
- data/mustache/setup/steps_run_parameterBind.mustache +80 -0
- data/mustache/setup/steps_run_parameterExact.mustache +79 -0
- data/mustache/state_type_invariant-infrastructure-service.mustache +49 -0
- data/mustache/state_type_invariant.mustache +17 -0
- data/mustache/state_type_invariant_cfg.mustache +18 -0
- data/mustache/state_variables.mustache +20 -0
- data/mustache/tla/const_def.mustache +5 -0
- data/mustache/tla/const_run.mustache +3 -0
- data/mustache/tla/macro-infrastructure-service.mustache +14 -0
- data/mustache/tla/macro_run.mustache +40 -0
- data/mustache/tla/module_footer.mustache +2 -0
- data/mustache/tla/module_header.mustache +9 -0
- data/mustache/tla/operator_run.mustache +8 -0
- data/mustache/tla/operators-infrastructure-service.mustache +12 -0
- data/mustache/tla/plc_define_footer.mustache +1 -0
- data/mustache/tla/plc_define_header.mustache +1 -0
- data/mustache/tla/plc_define_run.mustache +59 -0
- data/mustache/tla/plc_footer.mustache +2 -0
- data/mustache/tla/plc_header.mustache +2 -0
- data/mustache/tla/plc_run_state.mustache +12 -0
- data/mustache/tla/plc_tail.mustache +8 -0
- data/mustache/tla/plc_translation.mustache +2 -0
- data/resources/schema/json_schema/draft-04.json +150 -0
- data/resources/schema/swagger/2.0/schema.json +1591 -0
- data/src-extend/README +2 -0
- data/src-extend/extend/extend_assumptions.mustache +7 -0
- data/src-extend/extend/extend_const.mustache +5 -0
- data/src-extend/extend/extend_implementation.mustache +9 -0
- data/src-extend/extend/extend_invariant.mustache +11 -0
- data/src-extend/extend/extend_invariant_cfg.mustache +7 -0
- data/src-extend/extend/extend_macros.mustache +19 -0
- data/src-extend/extend/extend_operations.mustache +9 -0
- data/src-extend/extend/extend_state.mustache +9 -0
- data/src-extend/extend_app/assumption +20 -0
- data/src-extend/extend_app/correctness +19 -0
- data/src-extend/extend_app/correctness.cfg +9 -0
- data/src-extend/extend_app/infrastructure +25 -0
- data/src-extend/extend_app/interface +11 -0
- data/src-extend/extend_app/operator +18 -0
- data/src-extend/extend_app/possibility +16 -0
- data/src-extend/extend_app/service +33 -0
- data/src-extend/extend_app/state +16 -0
- data/src-extend/extend_app/transaction +22 -0
- data/src/pet/assumption +29 -0
- data/src/pet/assumption_address_domains.tla +12 -0
- data/src/pet/assumption_domains.tla +16 -0
- data/src/pet/assumption_generic.tla +8 -0
- data/src/pet/assumption_id_domains.tla +2 -0
- data/src/pet/assumption_owner_domains.tla +14 -0
- data/src/pet/assumption_pet_domains.tla +16 -0
- data/src/pet/assumption_tag_domains.tla +13 -0
- data/src/pet/correctness +24 -0
- data/src/pet/correctness.cfg +9 -0
- data/src/pet/correctness_coherent_owner_address.tla +6 -0
- data/src/pet/correctness_pet_name.tla +4 -0
- data/src/pet/correctness_ref_tag.tla +13 -0
- data/src/pet/correctness_type_invariants.tla +12 -0
- data/src/pet/correctness_unique_pet.tla +3 -0
- data/src/pet/correctness_unique_tag.tla +3 -0
- data/src/pet/docs/Petstore.md +117 -0
- data/src/pet/extend/extend_assumptions.mustache +7 -0
- data/src/pet/extend/extend_implementation.mustache +9 -0
- data/src/pet/extend/extend_invariant.mustache +11 -0
- data/src/pet/extend/extend_invariant_cfg.mustache +7 -0
- data/src/pet/extend/extend_macros.mustache +19 -0
- data/src/pet/extend/extend_operations.mustache +9 -0
- data/src/pet/extend/extend_state.mustache +9 -0
- data/src/pet/infrastructure +25 -0
- data/src/pet/infrastructure_id_get.tla +24 -0
- data/src/pet/interface +12 -0
- data/src/pet/interface_delete_pet.tla +5 -0
- data/src/pet/interface_get_pet.tla +4 -0
- data/src/pet/interface_post_pet.tla +5 -0
- data/src/pet/interface_post_tag.tla +5 -0
- data/src/pet/interface_put_tag.tla +3 -0
- data/src/pet/operator +30 -0
- data/src/pet/operator_find_tag_by_owner_name.tla +1 -0
- data/src/pet/operator_get_pet.tla +4 -0
- data/src/pet/operator_get_pet_by_tag.tla +4 -0
- data/src/pet/operator_get_tag.tla +10 -0
- data/src/pet/operator_new_owner.tla +3 -0
- data/src/pet/operator_new_pet.tla +13 -0
- data/src/pet/operator_new_tag.tla +3 -0
- data/src/pet/operator_next_pet_id.tla +3 -0
- data/src/pet/operator_responses.tla +8 -0
- data/src/pet/operator_tag_exists.tla +2 -0
- data/src/pet/operator_tag_owner_validated.tla +2 -0
- data/src/pet/operator_tag_referenced.tla +4 -0
- data/src/pet/operator_valid_owner.tla +17 -0
- data/src/pet/operator_valid_pet.tla +6 -0
- data/src/pet/operator_valid_tag.tla +5 -0
- data/src/pet/possibility +18 -0
- data/src/pet/possibility_at_least_two_tags.tla +12 -0
- data/src/pet/possibility_invalid_tag_address.tla +8 -0
- data/src/pet/service +35 -0
- data/src/pet/service_pet_delete.tla +11 -0
- data/src/pet/service_pet_get.tla +27 -0
- data/src/pet/service_pet_post.tla +78 -0
- data/src/pet/service_tag_post.tla +53 -0
- data/src/pet/service_tag_put.tla +82 -0
- data/src/pet/state +16 -0
- data/src/pet/state_infra.tla +6 -0
- data/src/pet/state_pet.tla +5 -0
- data/src/pet/state_tag_id.tla +2 -0
- data/src/pet/transaction +23 -0
- data/src/pet/transaction_delete_pet.tla +13 -0
- data/src/pet/transaction_enter_pet.tla +13 -0
- data/src/pet/transaction_enter_tag.tla +56 -0
- data/src/pet/transaction_error.tla +23 -0
- data/tla-sbuilder.gemspec +43 -0
- metadata +353 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
(******************************************************************
|
2
|
+
{{META.desc}}
|
3
|
+
- modelData {{META.modelData}}
|
4
|
+
- template {{META.template}}
|
5
|
+
|
6
|
+
******************************************************************)
|
7
|
+
|
8
|
+
(*
|
9
|
+
Type invariants for infrastructure service return values.
|
10
|
+
|
11
|
+
|
12
|
+
All fields in 'responses' state variable store a record [ status |-> ... , response |-> ... ]
|
13
|
+
|
14
|
+
*)
|
15
|
+
|
16
|
+
{{!
|
17
|
+
|
18
|
+
iterate infrastructureServices
|
19
|
+
|
20
|
+
- output: <interface_name> |-> Nil,
|
21
|
+
|
22
|
+
|
23
|
+
}}{{#infrastructureServices}}InfrastructureService_TypeInvariant_{{interface_name}} == responses.{{>name_process.mustache}}.response \in { Nil }{{!
|
24
|
+
|
25
|
+
iterate response definitions
|
26
|
+
}}{{#response_definitions}}{{!
|
27
|
+
end of response definitions
|
28
|
+
}} \union {{namespace}}{{type}}{{/response_definitions}}{{!
|
29
|
+
|
30
|
+
end of intefaces
|
31
|
+
|
32
|
+
}}
|
33
|
+
|
34
|
+
|
35
|
+
\* Type invariant for infrastructure service return values
|
36
|
+
|
37
|
+
{{/infrastructureServices}}{{!
|
38
|
+
|
39
|
+
Iterate infrastructureServices again to create call
|
40
|
+
|
41
|
+
}}InfrastructureService_TypeInvariant == TRUE {{#infrastructureServices}}
|
42
|
+
/\ InfrastructureService_TypeInvariant_{{interface_name}}{{/infrastructureServices}}
|
43
|
+
|
44
|
+
{{!
|
45
|
+
|
46
|
+
Composise-services enabled: end
|
47
|
+
|
48
|
+
}}
|
49
|
+
|
@@ -0,0 +1,17 @@
|
|
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
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
state_type_constraint_invariant.mustache: invarint in configuration
|
4
|
+
|
5
|
+
|
6
|
+
}}
|
7
|
+
|
8
|
+
|
9
|
+
(******************************************************************
|
10
|
+
Activate Type invariants: {{META.desc}}
|
11
|
+
- modelData {{META.modelData}}
|
12
|
+
- template {{META.template}}
|
13
|
+
******************************************************************)
|
14
|
+
|
15
|
+
|
16
|
+
{{#variables}}
|
17
|
+
INVARIANT {{>name_type_invariant.mustache}}
|
18
|
+
{{/variables}}
|
@@ -0,0 +1,20 @@
|
|
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
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
(******************************************************************
|
2
|
+
{{META.desc}}
|
3
|
+
- modelData {{META.modelData}}
|
4
|
+
- template {{META.template}}
|
5
|
+
******************************************************************)
|
6
|
+
|
7
|
+
\* set 'status' with 'response' for 'operation' into state variable 'responses'
|
8
|
+
macro InfrastructureServiceReturn( operation, status, response ) {
|
9
|
+
|
10
|
+
\* update field for 'operation' in 'responses' variable with record [ status |-> s , response |-> r ]
|
11
|
+
responses[InterfaceOperation2ProcessName(operation)] := InfrastructureServiceResponse( status, response );
|
12
|
+
}
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
(***********************************************************************
|
2
|
+
Macros to control process execution && time
|
3
|
+
***********************************************************************)
|
4
|
+
macro tick() {
|
5
|
+
now := TickNext( now ); \* now := now + 1;
|
6
|
+
}
|
7
|
+
|
8
|
+
macro enable( s ) {
|
9
|
+
(* head in sequence 'steps' enable processes *)
|
10
|
+
\* await Len( steps ) # 0 /\ ProcessEnabled( steps, s );
|
11
|
+
await ProcessEnabled( steps, s );
|
12
|
+
|
13
|
+
(* process entered, remove head from sequence 'steps' *)
|
14
|
+
step := ProcessRunning( steps ); \* Head( steps );
|
15
|
+
step_parameter := ProcessParameter( steps );
|
16
|
+
\* steps := ProcessesToRun( steps ); \* Tail( steps );
|
17
|
+
|
18
|
+
(* Reset infrastructure service responses on process entry *)
|
19
|
+
responses := InfrastructureServiceInit;
|
20
|
+
|
21
|
+
(* time advances by one tick for each process step *)
|
22
|
+
tick();
|
23
|
+
\* debug( s );
|
24
|
+
}
|
25
|
+
|
26
|
+
(* Remove currently running prosess from head of 'step'.
|
27
|
+
|
28
|
+
Calling this macro enables next process to take turn.
|
29
|
+
If a process comprises several steps, this results
|
30
|
+
processes runing parallel, unless 'process_done' is
|
31
|
+
called in the end of the process.
|
32
|
+
|
33
|
+
*)
|
34
|
+
|
35
|
+
macro process_done( s ) {
|
36
|
+
steps := ProcessesToRun( steps ); \* Tail( steps );
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
(* Override in extending model *)
|
2
|
+
|
3
|
+
ProcessEnabled( stepdefs, s ) == FALSE
|
4
|
+
ProcessRunning( stepdefs ) == {} \* Head( stepdefs )
|
5
|
+
ProcessParameter( stepdefs ) == {} \* Head( stepdefs )
|
6
|
+
ProcessesToRun( stepdefs ) == {} \* Tail( stepdefs )
|
7
|
+
|
8
|
+
TickNext( t ) == t + 1 \* advance time (when process start)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
(******************************************************************
|
2
|
+
{{META.desc}}
|
3
|
+
- modelData {{META.modelData}}
|
4
|
+
- template {{META.template}}
|
5
|
+
******************************************************************)
|
6
|
+
|
7
|
+
\* return response for 'operation' from 'responses' state variable
|
8
|
+
InfrastructureServiceGetResponse( operation ) == responses[InterfaceOperation2ProcessName(operation)].response
|
9
|
+
|
10
|
+
\* return status for 'operation' from 'responses' state variable
|
11
|
+
InfrastructureServiceGetStatus( operation ) == responses[InterfaceOperation2ProcessName(operation)].status
|
12
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
} \* define
|
@@ -0,0 +1 @@
|
|
1
|
+
define {
|
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
(*
|
3
|
+
Current time in state variable now gets ticked
|
4
|
+
when process starts.
|
5
|
+
*)
|
6
|
+
currentTime == now
|
7
|
+
|
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
|
16
|
+
|
17
|
+
(* All record fields in 'bindDef' must bind with corresponding fields in 'inputParam' *)
|
18
|
+
\* ProcessParameterEnablesTst( inputParam, bindDefs ) == \A key \in { k \in DOMAIN bindDefs : k # "_key" }: bindDefs[key] = inputParam[key]
|
19
|
+
|
20
|
+
(*
|
21
|
+
ProcessParameterEnables: 'inputParam' satisfies 'bindDefs'
|
22
|
+
|
23
|
+
- all 'normal' field in 'bindDefs' are found in 'inputParam'
|
24
|
+
- 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
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
Recurse one level down in 'inputParam' using keys 'bindDefs._key.key'.
|
31
|
+
Recursion is done only if 'bindDefs' defines field '_key'.
|
32
|
+
|
33
|
+
Should be implemented using recursion, but at the time of writing this comment could not make it work.
|
34
|
+
|
35
|
+
*)
|
36
|
+
RECURSIVE ProcessParameterEnables( _, _ )
|
37
|
+
ProcessParameterEnables( inputParam, bindDefs ) == ( \A key \in { k \in DOMAIN bindDefs : k # "_key" /\ k # "_rows" }: bindDefs[key] = inputParam[key] )
|
38
|
+
/\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_key" }: \A r \in bindDefs[reckey] : ProcessParameterEnables( inputParam[r.key], r.rec ) )
|
39
|
+
/\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_rows" }: \A r \in bindDefs[reckey] :
|
40
|
+
Cardinality( r.set ) = Cardinality( inputParam[r.key] ) /\ \A bDef \in r.set: \E ip \in inputParam[r.key]: ProcessParameterEnables( ip, bDef )
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
(* ProcessParameterBind operator
|
45
|
+
|
46
|
+
Bind 'inputParam' for the process currently being executed with values in 'step_parameter'.
|
47
|
+
|
48
|
+
Bind to inputParameter allowed if one the following matches
|
49
|
+
- step parameter WildCard
|
50
|
+
- process parameter = WildCard
|
51
|
+
- predicate 'ProcessParameterEnables' resolves TRUE for some paramter set in 'step_parameter'
|
52
|
+
|
53
|
+
*)
|
54
|
+
ProcessParameterBind( inputParam ) == step_parameter' = WildCard
|
55
|
+
\/ { processEnabledInStep \in step_parameter' :
|
56
|
+
processEnabledInStep.process = step'
|
57
|
+
/\ ( processEnabledInStep.bindRule = WildCard
|
58
|
+
\/ ProcessParameterEnables( inputParam, processEnabledInStep.bindRule ) ) } # {}
|
59
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
(******************************************************************
|
2
|
+
{{META.desc}}
|
3
|
+
- modelData {{META.modelData}}
|
4
|
+
- template {{META.template}}
|
5
|
+
******************************************************************)
|
6
|
+
|
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
|
+
|
@@ -0,0 +1,150 @@
|
|
1
|
+
{
|
2
|
+
"id": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
|
+
"description": "Core schema meta-schema",
|
5
|
+
"definitions": {
|
6
|
+
"schemaArray": {
|
7
|
+
"type": "array",
|
8
|
+
"minItems": 1,
|
9
|
+
"items": { "$ref": "#" }
|
10
|
+
},
|
11
|
+
"positiveInteger": {
|
12
|
+
"type": "integer",
|
13
|
+
"minimum": 0
|
14
|
+
},
|
15
|
+
"positiveIntegerDefault0": {
|
16
|
+
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
|
17
|
+
},
|
18
|
+
"simpleTypes": {
|
19
|
+
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
|
20
|
+
},
|
21
|
+
"stringArray": {
|
22
|
+
"type": "array",
|
23
|
+
"items": { "type": "string" },
|
24
|
+
"minItems": 1,
|
25
|
+
"uniqueItems": true
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"type": "object",
|
29
|
+
"properties": {
|
30
|
+
"id": {
|
31
|
+
"type": "string",
|
32
|
+
"format": "uri"
|
33
|
+
},
|
34
|
+
"$schema": {
|
35
|
+
"type": "string",
|
36
|
+
"format": "uri"
|
37
|
+
},
|
38
|
+
"title": {
|
39
|
+
"type": "string"
|
40
|
+
},
|
41
|
+
"description": {
|
42
|
+
"type": "string"
|
43
|
+
},
|
44
|
+
"default": {},
|
45
|
+
"multipleOf": {
|
46
|
+
"type": "number",
|
47
|
+
"minimum": 0,
|
48
|
+
"exclusiveMinimum": true
|
49
|
+
},
|
50
|
+
"maximum": {
|
51
|
+
"type": "number"
|
52
|
+
},
|
53
|
+
"exclusiveMaximum": {
|
54
|
+
"type": "boolean",
|
55
|
+
"default": false
|
56
|
+
},
|
57
|
+
"minimum": {
|
58
|
+
"type": "number"
|
59
|
+
},
|
60
|
+
"exclusiveMinimum": {
|
61
|
+
"type": "boolean",
|
62
|
+
"default": false
|
63
|
+
},
|
64
|
+
"maxLength": { "$ref": "#/definitions/positiveInteger" },
|
65
|
+
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
|
66
|
+
"pattern": {
|
67
|
+
"type": "string",
|
68
|
+
"format": "regex"
|
69
|
+
},
|
70
|
+
"additionalItems": {
|
71
|
+
"anyOf": [
|
72
|
+
{ "type": "boolean" },
|
73
|
+
{ "$ref": "#" }
|
74
|
+
],
|
75
|
+
"default": {}
|
76
|
+
},
|
77
|
+
"items": {
|
78
|
+
"anyOf": [
|
79
|
+
{ "$ref": "#" },
|
80
|
+
{ "$ref": "#/definitions/schemaArray" }
|
81
|
+
],
|
82
|
+
"default": {}
|
83
|
+
},
|
84
|
+
"maxItems": { "$ref": "#/definitions/positiveInteger" },
|
85
|
+
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
|
86
|
+
"uniqueItems": {
|
87
|
+
"type": "boolean",
|
88
|
+
"default": false
|
89
|
+
},
|
90
|
+
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
|
91
|
+
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
|
92
|
+
"required": { "$ref": "#/definitions/stringArray" },
|
93
|
+
"additionalProperties": {
|
94
|
+
"anyOf": [
|
95
|
+
{ "type": "boolean" },
|
96
|
+
{ "$ref": "#" }
|
97
|
+
],
|
98
|
+
"default": {}
|
99
|
+
},
|
100
|
+
"definitions": {
|
101
|
+
"type": "object",
|
102
|
+
"additionalProperties": { "$ref": "#" },
|
103
|
+
"default": {}
|
104
|
+
},
|
105
|
+
"properties": {
|
106
|
+
"type": "object",
|
107
|
+
"additionalProperties": { "$ref": "#" },
|
108
|
+
"default": {}
|
109
|
+
},
|
110
|
+
"patternProperties": {
|
111
|
+
"type": "object",
|
112
|
+
"additionalProperties": { "$ref": "#" },
|
113
|
+
"default": {}
|
114
|
+
},
|
115
|
+
"dependencies": {
|
116
|
+
"type": "object",
|
117
|
+
"additionalProperties": {
|
118
|
+
"anyOf": [
|
119
|
+
{ "$ref": "#" },
|
120
|
+
{ "$ref": "#/definitions/stringArray" }
|
121
|
+
]
|
122
|
+
}
|
123
|
+
},
|
124
|
+
"enum": {
|
125
|
+
"type": "array",
|
126
|
+
"minItems": 1,
|
127
|
+
"uniqueItems": true
|
128
|
+
},
|
129
|
+
"type": {
|
130
|
+
"anyOf": [
|
131
|
+
{ "$ref": "#/definitions/simpleTypes" },
|
132
|
+
{
|
133
|
+
"type": "array",
|
134
|
+
"items": { "$ref": "#/definitions/simpleTypes" },
|
135
|
+
"minItems": 1,
|
136
|
+
"uniqueItems": true
|
137
|
+
}
|
138
|
+
]
|
139
|
+
},
|
140
|
+
"allOf": { "$ref": "#/definitions/schemaArray" },
|
141
|
+
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
142
|
+
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
143
|
+
"not": { "$ref": "#" }
|
144
|
+
},
|
145
|
+
"dependencies": {
|
146
|
+
"exclusiveMaximum": [ "maximum" ],
|
147
|
+
"exclusiveMinimum": [ "minimum" ]
|
148
|
+
},
|
149
|
+
"default": {}
|
150
|
+
}
|