tla-sbuilder 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +328 -0
  3. data/VERSION +1 -0
  4. data/bin/sbuilder.rb +5 -0
  5. data/lib/cli/cli-customer.rb +420 -0
  6. data/lib/cli/cli-example.rb +92 -0
  7. data/lib/cli/cli-pet.rb +767 -0
  8. data/lib/cli/cli-text.rb +226 -0
  9. data/lib/cli/cli.rb +298 -0
  10. data/lib/sbuilder.rb +52 -0
  11. data/lib/sbuilder/constants.rb +72 -0
  12. data/lib/sbuilder/controller.rb +798 -0
  13. data/lib/sbuilder/default-sbuilder.yaml +372 -0
  14. data/lib/sbuilder/domain.rb +124 -0
  15. data/lib/sbuilder/domain_cardinality.rb +37 -0
  16. data/lib/sbuilder/domain_value.rb +81 -0
  17. data/lib/sbuilder/exception.rb +27 -0
  18. data/lib/sbuilder/extension_loader.rb +721 -0
  19. data/lib/sbuilder/factory.rb +234 -0
  20. data/lib/sbuilder/model.rb +356 -0
  21. data/lib/sbuilder/mustache/template.rb +125 -0
  22. data/lib/sbuilder/mustache/template_reader.rb +206 -0
  23. data/lib/sbuilder/mustache/template_reader_context.rb +371 -0
  24. data/lib/sbuilder/param_set.rb +132 -0
  25. data/lib/sbuilder/param_set_db.rb +20 -0
  26. data/lib/sbuilder/param_set_def.rb +57 -0
  27. data/lib/sbuilder/param_set_if.rb +68 -0
  28. data/lib/sbuilder/param_set_loader.rb +77 -0
  29. data/lib/sbuilder/param_set_loader_swagger.rb +424 -0
  30. data/lib/sbuilder/param_set_step.rb +62 -0
  31. data/lib/sbuilder/param_sets.rb +54 -0
  32. data/lib/sbuilder/parameter.rb +97 -0
  33. data/lib/sbuilder/parameter_container.rb +72 -0
  34. data/lib/sbuilder/parameter_dom.rb +70 -0
  35. data/lib/sbuilder/parameter_ref.rb +71 -0
  36. data/lib/sbuilder/resolver.rb +78 -0
  37. data/lib/sbuilder/resolver_loader.rb +79 -0
  38. data/lib/sbuilder/resolver_loader_yaml.rb +103 -0
  39. data/lib/sbuilder/resolver_rule.rb +36 -0
  40. data/lib/sbuilder/resolver_rule_match.rb +55 -0
  41. data/lib/sbuilder/resolver_rule_ref.rb +37 -0
  42. data/lib/utils/hash_inject.rb +12 -0
  43. data/lib/utils/logger.rb +80 -0
  44. data/lib/utils/netio.rb +58 -0
  45. data/lib/utils/string_inject.rb +10 -0
  46. data/lib/utils/version.rb +13 -0
  47. data/mustache/cfg/const_def.mustache +8 -0
  48. data/mustache/cfg/const_run.mustache +3 -0
  49. data/mustache/cfg/invariant-infrastructure-service.mustache +4 -0
  50. data/mustache/cfg/macro_run.mustache +6 -0
  51. data/mustache/cfg/module_footer.mustache +0 -0
  52. data/mustache/cfg/module_header.mustache +7 -0
  53. data/mustache/data-model-dump.mustache +19 -0
  54. data/mustache/data-model-footer.mustache +5 -0
  55. data/mustache/data-model-header.mustache +16 -0
  56. data/mustache/definition_types.mustache +40 -0
  57. data/mustache/domains.mustache +20 -0
  58. data/mustache/domains_assign.mustache +22 -0
  59. data/mustache/domains_run.mustache +21 -0
  60. data/mustache/extend/extend_assumptions.mustache +7 -0
  61. data/mustache/extend/extend_const.mustache +5 -0
  62. data/mustache/extend/extend_implementation.mustache +9 -0
  63. data/mustache/extend/extend_invariant.mustache +7 -0
  64. data/mustache/extend/extend_invariant_cfg.mustache +7 -0
  65. data/mustache/extend/extend_macros.mustache +19 -0
  66. data/mustache/extend/extend_operations.mustache +9 -0
  67. data/mustache/extend/extend_state.mustache +9 -0
  68. data/mustache/infrastructure-service-init.mustache +36 -0
  69. data/mustache/infrastructure-service-variables.mustache +10 -0
  70. data/mustache/interface_processes.mustache +38 -0
  71. data/mustache/interface_stubs_dummy.mustache +13 -0
  72. data/mustache/interface_types.mustache +52 -0
  73. data/mustache/markdown-header.mustache +24 -0
  74. data/mustache/markdown-toc.mustache +13 -0
  75. data/mustache/name_definition_type.mustache +5 -0
  76. data/mustache/name_domain.mustache +5 -0
  77. data/mustache/name_domain_value.mustache +5 -0
  78. data/mustache/name_domain_value_prefix.mustache +5 -0
  79. data/mustache/name_interface_response_type.mustache +6 -0
  80. data/mustache/name_interface_type.mustache +6 -0
  81. data/mustache/name_parameter_definition.mustache +5 -0
  82. data/mustache/name_parameter_type.mustache +6 -0
  83. data/mustache/name_process.mustache +6 -0
  84. data/mustache/name_type_invariant.mustache +5 -0
  85. data/mustache/name_variable.mustache +6 -0
  86. data/mustache/operator-infrastructure-service.mustache +13 -0
  87. data/mustache/possibility/module_extends.mustache +1 -0
  88. data/mustache/possibility/module_footer.mustache +1 -0
  89. data/mustache/possibility/module_header.mustache +8 -0
  90. data/mustache/possibility/possibility_definition.mustache +12 -0
  91. data/mustache/possibility/possibility_directive.mustache +1 -0
  92. data/mustache/possibility/possility_setup.mustache +28 -0
  93. data/mustache/setup/module_footer.mustache +1 -0
  94. data/mustache/setup/module_header.mustache +9 -0
  95. data/mustache/setup/operator_run.mustache +7 -0
  96. data/mustache/setup/operator_tick.mustache +2 -0
  97. data/mustache/setup/steps_run.mustache +22 -0
  98. data/mustache/setup/steps_run_bind_rule.mustache +51 -0
  99. data/mustache/setup/steps_run_bind_set.mustache +37 -0
  100. data/mustache/setup/steps_run_parameterBind.mustache +80 -0
  101. data/mustache/setup/steps_run_parameterExact.mustache +79 -0
  102. data/mustache/state_type_invariant-infrastructure-service.mustache +49 -0
  103. data/mustache/state_type_invariant.mustache +17 -0
  104. data/mustache/state_type_invariant_cfg.mustache +18 -0
  105. data/mustache/state_variables.mustache +20 -0
  106. data/mustache/tla/const_def.mustache +5 -0
  107. data/mustache/tla/const_run.mustache +3 -0
  108. data/mustache/tla/macro-infrastructure-service.mustache +14 -0
  109. data/mustache/tla/macro_run.mustache +40 -0
  110. data/mustache/tla/module_footer.mustache +2 -0
  111. data/mustache/tla/module_header.mustache +9 -0
  112. data/mustache/tla/operator_run.mustache +8 -0
  113. data/mustache/tla/operators-infrastructure-service.mustache +12 -0
  114. data/mustache/tla/plc_define_footer.mustache +1 -0
  115. data/mustache/tla/plc_define_header.mustache +1 -0
  116. data/mustache/tla/plc_define_run.mustache +59 -0
  117. data/mustache/tla/plc_footer.mustache +2 -0
  118. data/mustache/tla/plc_header.mustache +2 -0
  119. data/mustache/tla/plc_run_state.mustache +12 -0
  120. data/mustache/tla/plc_tail.mustache +8 -0
  121. data/mustache/tla/plc_translation.mustache +2 -0
  122. data/resources/schema/json_schema/draft-04.json +150 -0
  123. data/resources/schema/swagger/2.0/schema.json +1591 -0
  124. data/src-extend/README +2 -0
  125. data/src-extend/extend/extend_assumptions.mustache +7 -0
  126. data/src-extend/extend/extend_const.mustache +5 -0
  127. data/src-extend/extend/extend_implementation.mustache +9 -0
  128. data/src-extend/extend/extend_invariant.mustache +11 -0
  129. data/src-extend/extend/extend_invariant_cfg.mustache +7 -0
  130. data/src-extend/extend/extend_macros.mustache +19 -0
  131. data/src-extend/extend/extend_operations.mustache +9 -0
  132. data/src-extend/extend/extend_state.mustache +9 -0
  133. data/src-extend/extend_app/assumption +20 -0
  134. data/src-extend/extend_app/correctness +19 -0
  135. data/src-extend/extend_app/correctness.cfg +9 -0
  136. data/src-extend/extend_app/infrastructure +25 -0
  137. data/src-extend/extend_app/interface +11 -0
  138. data/src-extend/extend_app/operator +18 -0
  139. data/src-extend/extend_app/possibility +16 -0
  140. data/src-extend/extend_app/service +33 -0
  141. data/src-extend/extend_app/state +16 -0
  142. data/src-extend/extend_app/transaction +22 -0
  143. data/src/pet/assumption +29 -0
  144. data/src/pet/assumption_address_domains.tla +12 -0
  145. data/src/pet/assumption_domains.tla +16 -0
  146. data/src/pet/assumption_generic.tla +8 -0
  147. data/src/pet/assumption_id_domains.tla +2 -0
  148. data/src/pet/assumption_owner_domains.tla +14 -0
  149. data/src/pet/assumption_pet_domains.tla +16 -0
  150. data/src/pet/assumption_tag_domains.tla +13 -0
  151. data/src/pet/correctness +24 -0
  152. data/src/pet/correctness.cfg +9 -0
  153. data/src/pet/correctness_coherent_owner_address.tla +6 -0
  154. data/src/pet/correctness_pet_name.tla +4 -0
  155. data/src/pet/correctness_ref_tag.tla +13 -0
  156. data/src/pet/correctness_type_invariants.tla +12 -0
  157. data/src/pet/correctness_unique_pet.tla +3 -0
  158. data/src/pet/correctness_unique_tag.tla +3 -0
  159. data/src/pet/docs/Petstore.md +117 -0
  160. data/src/pet/extend/extend_assumptions.mustache +7 -0
  161. data/src/pet/extend/extend_implementation.mustache +9 -0
  162. data/src/pet/extend/extend_invariant.mustache +11 -0
  163. data/src/pet/extend/extend_invariant_cfg.mustache +7 -0
  164. data/src/pet/extend/extend_macros.mustache +19 -0
  165. data/src/pet/extend/extend_operations.mustache +9 -0
  166. data/src/pet/extend/extend_state.mustache +9 -0
  167. data/src/pet/infrastructure +25 -0
  168. data/src/pet/infrastructure_id_get.tla +24 -0
  169. data/src/pet/interface +12 -0
  170. data/src/pet/interface_delete_pet.tla +5 -0
  171. data/src/pet/interface_get_pet.tla +4 -0
  172. data/src/pet/interface_post_pet.tla +5 -0
  173. data/src/pet/interface_post_tag.tla +5 -0
  174. data/src/pet/interface_put_tag.tla +3 -0
  175. data/src/pet/operator +30 -0
  176. data/src/pet/operator_find_tag_by_owner_name.tla +1 -0
  177. data/src/pet/operator_get_pet.tla +4 -0
  178. data/src/pet/operator_get_pet_by_tag.tla +4 -0
  179. data/src/pet/operator_get_tag.tla +10 -0
  180. data/src/pet/operator_new_owner.tla +3 -0
  181. data/src/pet/operator_new_pet.tla +13 -0
  182. data/src/pet/operator_new_tag.tla +3 -0
  183. data/src/pet/operator_next_pet_id.tla +3 -0
  184. data/src/pet/operator_responses.tla +8 -0
  185. data/src/pet/operator_tag_exists.tla +2 -0
  186. data/src/pet/operator_tag_owner_validated.tla +2 -0
  187. data/src/pet/operator_tag_referenced.tla +4 -0
  188. data/src/pet/operator_valid_owner.tla +17 -0
  189. data/src/pet/operator_valid_pet.tla +6 -0
  190. data/src/pet/operator_valid_tag.tla +5 -0
  191. data/src/pet/possibility +18 -0
  192. data/src/pet/possibility_at_least_two_tags.tla +12 -0
  193. data/src/pet/possibility_invalid_tag_address.tla +8 -0
  194. data/src/pet/service +35 -0
  195. data/src/pet/service_pet_delete.tla +11 -0
  196. data/src/pet/service_pet_get.tla +27 -0
  197. data/src/pet/service_pet_post.tla +78 -0
  198. data/src/pet/service_tag_post.tla +53 -0
  199. data/src/pet/service_tag_put.tla +82 -0
  200. data/src/pet/state +16 -0
  201. data/src/pet/state_infra.tla +6 -0
  202. data/src/pet/state_pet.tla +5 -0
  203. data/src/pet/state_tag_id.tla +2 -0
  204. data/src/pet/transaction +23 -0
  205. data/src/pet/transaction_delete_pet.tla +13 -0
  206. data/src/pet/transaction_enter_pet.tla +13 -0
  207. data/src/pet/transaction_enter_tag.tla +56 -0
  208. data/src/pet/transaction_error.tla +23 -0
  209. data/tla-sbuilder.gemspec +43 -0
  210. metadata +353 -0
@@ -0,0 +1,2 @@
1
+ Commmand sbuilder.rb extend copies content of these directories to cwd.
2
+
@@ -0,0 +1,7 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+ {{>assumption}}
@@ -0,0 +1,5 @@
1
+ (******************************************************************
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ ******************************************************************)
@@ -0,0 +1,9 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+
8
+ {{>infrastructure}}
9
+ {{>service}}
@@ -0,0 +1,11 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+ \* Operators for correctness
8
+ {{>correctness}}
9
+
10
+ \* Operators for possibilities
11
+ {{>possibility}}
@@ -0,0 +1,7 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+ {{>correctness.cfg}}
@@ -0,0 +1,19 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+ (* ******************************************************************
8
+ Transactions (modify state)
9
+ * ******************************************************************)
10
+
11
+ {{>transaction}}
12
+
13
+
14
+ (* ******************************************************************
15
+ Macros implmeneting entries to interface services
16
+ * ******************************************************************)
17
+
18
+ {{>interface}}
19
+
@@ -0,0 +1,9 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+
8
+ {{>operator}}
9
+
@@ -0,0 +1,9 @@
1
+ (*
2
+ {{META.desc}}
3
+ - modelData {{META.modelData}}
4
+ - template {{META.template}}
5
+ *)
6
+
7
+ {{>state}}
8
+
9
+
@@ -0,0 +1,20 @@
1
+ {{!
2
+
3
+ Assumption predicates (and possibly operators), and ASSUME directive.
4
+
5
+ For example:
6
+
7
+ \* True iff 'field' in records in 'set' have correct 'domain'
8
+ Assume_DomainOfAField( set, field, domain ) == { p[field] : p \in set } = domain
9
+
10
+ \* Verify that domain of named field is correct
11
+ Assume_Pet_Domains == Assume_DomainOfAField( t_Pet, "id", d_pet_id )
12
+
13
+ \* Domain verification phase 1
14
+ ASSUME Assume_Pet_Domains
15
+
16
+
17
+ }}
18
+
19
+ {{!>assumption_generic.tla}}
20
+ {{!>assumption_pet.tla}}
@@ -0,0 +1,19 @@
1
+ {{!
2
+
3
+ Define correctness predicates.
4
+
5
+ Correctness predicates may refer operators defined in 'operators'.
6
+ In order to activate invariant add INVARIANT directive in 'correcness.cfg'
7
+
8
+ For example:
9
+
10
+ \* When 'PetStore_ValidatePet' is defined in 'operators'
11
+
12
+ \* All pets in 'v_pets' should be valid
13
+ PetStore_ValidatePets == \A pet \in v_pets: PetStore_ValidatePet( pet )
14
+
15
+ }}
16
+
17
+ {{!>correctness_pet_name.tla}}
18
+ {{!>correctness_types.tla}}
19
+
@@ -0,0 +1,9 @@
1
+ {{!
2
+
3
+ Activate correcness predicates
4
+
5
+ For example:
6
+
7
+ INVARIANT PetStore_ValidatePets
8
+
9
+ }}
@@ -0,0 +1,25 @@
1
+ {{!
2
+
3
+ Procedure implmenting services for infrastructure interfaces.
4
+
5
+ May use 'operators' defined earlier
6
+
7
+ For example:
8
+
9
+ procedure generateId() {
10
+
11
+ generateId_start:
12
+
13
+ \* remove one id from set of valid ids
14
+ v_pet_ids := v_pet_ids \ { Next_pet_id } ;
15
+
16
+
17
+ \* return generated identifier
18
+ InfrastructureServiceReturn( "/id/pet(get)", [ id |-> Next_pet_id ] );
19
+ return;
20
+ }
21
+
22
+ }}
23
+
24
+
25
+ {{!>infrastructure_generate_id.tla}}
@@ -0,0 +1,11 @@
1
+ {{!
2
+
3
+ Macros implmeneting entries to interface services
4
+
5
+ }}
6
+
7
+
8
+ {{!>interface_post_pet.tla}}
9
+ {{!>interface_get_pet.tla}}
10
+ {{!>interface_delete_pet.tla}}
11
+
@@ -0,0 +1,18 @@
1
+ {{!
2
+
3
+ Application operators
4
+
5
+ Example:
6
+
7
+ \* All pets should have a name
8
+ PetStore_ValidatePetData( pet ) == pet.name # Nil
9
+
10
+
11
+ }}
12
+
13
+
14
+ {{!>operator_next_pet_id.tla}}
15
+ {{!>operator_valid_pet.tla}}
16
+ {{!>operator_get_pet.tla}}
17
+ {{!>operator_responses.tla}}
18
+ {{!>operator_new_pet.tla}}
@@ -0,0 +1,16 @@
1
+ {{!
2
+
3
+ Define operator possibilities.
4
+
5
+ To activate the operators add per setup add name of the operator
6
+ to 'possibilities' arrays
7
+
8
+ setups:
9
+ - setupDirectory: setup1
10
+ possibilities:
11
+ - poss1
12
+ - poss2
13
+
14
+
15
+ }}
16
+
@@ -0,0 +1,33 @@
1
+ {{!
2
+
3
+ Procedures implmenting interface services.
4
+
5
+ Notice: Procedure is not necassarily needed if
6
+ service is fully implemented in interface entry-macro
7
+ (see interfaces_entry)
8
+
9
+
10
+ For example:
11
+
12
+ procedure delete_pet( delete_pet_input ) {
13
+
14
+ delete_pet_start:
15
+
16
+ \* transaction
17
+ delete_pet( delete_pet_input );
18
+
19
+ return;
20
+ }
21
+
22
+
23
+
24
+ }}
25
+
26
+ {{!>service_pet_post.tla}}
27
+ {{!>service_pet_get.tla}}
28
+ {{!>service_pet_delete.tla}}
29
+
30
+
31
+
32
+
33
+
@@ -0,0 +1,16 @@
1
+ {{!
2
+
3
+ Application variables and initial value
4
+
5
+
6
+ For example:
7
+
8
+ \* pet entiries of type t_Pet, initially empty
9
+ v_pets = {};
10
+
11
+
12
+ }}
13
+
14
+ {{!>state_pet.tla}}
15
+ {{!>state_infra.tla}}
16
+
@@ -0,0 +1,22 @@
1
+ {{!
2
+
3
+ Place to define macros modifying application state.
4
+
5
+ For example:
6
+
7
+ macro enter_pet( new_pet ) {
8
+
9
+ v_pets := v_pets \union { new_pet };
10
+
11
+ }
12
+
13
+ }}
14
+
15
+
16
+ {{!>transaction_error.tla}}
17
+ {{!>transaction_enter_pet.tla}}
18
+ {{!>transaction_delete_pet.tla}}
19
+
20
+
21
+
22
+
@@ -0,0 +1,29 @@
1
+ {{!
2
+
3
+ Assumption predicates (and possibly operators), and ASSUME directive.
4
+
5
+ For example:
6
+
7
+ \* True iff 'field' in records in 'set' have correct 'domain'
8
+ Assume_DomainOfAField( set, field, domain ) == { p[field] : p \in set } = domain
9
+
10
+ \* Verify that domain of named field is correct
11
+ Assume_Pet_Domains == Assume_DomainOfAField( t_Pet, "id", d_id )
12
+
13
+ \* Domain verification phase 1
14
+ ASSUME Assume_Pet_Domains
15
+
16
+
17
+ }}
18
+
19
+ {{>assumption_generic.tla}}
20
+
21
+
22
+ \* Defintion domains
23
+ {{>assumption_address_domains.tla}}
24
+ {{>assumption_owner_domains.tla}}
25
+ {{>assumption_tag_domains.tla}}
26
+ {{>assumption_pet_domains.tla}}
27
+ {{>assumption_id_domains.tla}}
28
+ {{>assumption_domains.tla}}
29
+
@@ -0,0 +1,12 @@
1
+ (*
2
+ Domains in Address definition
3
+
4
+ - street : d_street
5
+ - city : d_city
6
+
7
+ *)
8
+
9
+ Assume_Address_Domains ==
10
+ Assume_CorrectDomain( t_Address, "street", d_street )
11
+ /\ Assume_CorrectDomain( t_Address, "city", d_city )
12
+
@@ -0,0 +1,16 @@
1
+ (*
2
+
3
+ Operator combining assumption on all defintions.
4
+
5
+ *)
6
+
7
+
8
+ Assume_Domains ==
9
+ Assume_Pet_Domains
10
+ /\ Assume_Id_Domains
11
+ /\ Assume_Tag_Domains
12
+ /\ Assume_Address_Domains
13
+ /\ Assume_Owner_Domains
14
+
15
+
16
+ ASSUME Assume_Domains
@@ -0,0 +1,8 @@
1
+ (* ******************************************************************
2
+ Helpers to make assumptions
3
+ ******************************************************************)
4
+
5
+
6
+ \* True iff in all records in 'set' have 'field' type 'domain'
7
+ Assume_CorrectDomain( set, field, domain ) == { p[field] : p \in set } = domain
8
+
@@ -0,0 +1,2 @@
1
+
2
+ Assume_Id_Domains == Assume_CorrectDomain( t_Id, "id", d_id )
@@ -0,0 +1,14 @@
1
+ (*
2
+ Domains in Owner definition
3
+
4
+ - name : d_owner_name
5
+ - address : t_Address
6
+
7
+ *)
8
+
9
+
10
+
11
+ Assume_Owner_Domains ==
12
+ Assume_CorrectDomain( t_Owner, "name", d_owner_name )
13
+ /\ Assume_CorrectDomain( t_Owner, "address", t_Address )
14
+
@@ -0,0 +1,16 @@
1
+ (*
2
+ Domains in Pet definition
3
+
4
+ - id : d_id
5
+ - name : d_pet_name
6
+ - tag : d_id
7
+
8
+ *)
9
+
10
+
11
+
12
+ \* Verify that domain of named field is correct
13
+ Assume_Pet_Domains == Assume_CorrectDomain( t_Pet, "id", d_id )
14
+ /\ Assume_CorrectDomain( t_Pet, "name", d_pet_name )
15
+ /\ Assume_CorrectDomain( t_Pet, "tag", d_id )
16
+
@@ -0,0 +1,13 @@
1
+ (*
2
+ Domains in Tag definition
3
+
4
+ - tag : d_id
5
+ - owner : t_Owner
6
+
7
+ *)
8
+
9
+
10
+
11
+ Assume_Tag_Domains == Assume_CorrectDomain( t_Tag, "tag", d_id )
12
+ /\ Assume_CorrectDomain( t_Tag, "owner", t_Owner )
13
+
@@ -0,0 +1,24 @@
1
+ {{!
2
+
3
+ Correctness predicates.
4
+
5
+ Correctness predicates may refer operators defined in 'operators'.
6
+ In order to activate invariant add INVARIANT directive in 'correcness.cfg'
7
+
8
+ For example:
9
+
10
+ \* When 'ValidatePet' is defined in 'operators'
11
+
12
+ \* All pets in 'v_pets' should be valid
13
+ ValidatePets == \A pet \in v_pets: ValidatePet( pet )
14
+
15
+ }}
16
+
17
+ {{>correctness_type_invariants.tla}}
18
+
19
+ {{>correctness_pet_name.tla}}
20
+ {{>correctness_unique_pet.tla}}
21
+ {{>correctness_unique_tag.tla}}
22
+ {{>correctness_ref_tag.tla}}
23
+ {{>correctness_coherent_owner_address.tla}}
24
+