The VM* Wiki

Official documentation for the VM* family of model manipulation languages.

User Tools

Site Tools


vmtl:annotations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
vmtl:annotations [2015/08/23 15:50]
rvac
vmtl:annotations [2015/09/22 10:12]
rvac [Clauses]
Line 13: Line 13:
 User-defined variables can be used in any VMTL pattern. They may appear wherever the host modeling language accepts a user-defined meta-attribute value, such as for representing the name of a model element. In addition, they can be manipulated via operators within VMTL annotations. ​ User-defined variables can be used in any VMTL pattern. They may appear wherever the host modeling language accepts a user-defined meta-attribute value, such as for representing the name of a model element. In addition, they can be manipulated via operators within VMTL annotations. ​
  
-User-defined variables ​always ​have global ​**scope**: once they have been set, their value can be accessed ​by any annotation or model attribute ​in the transformation specification. Their global scope makes variables suitable for identifying corresponding model elements located in different patterns.+User-defined variables have **global ​scope** ​within a rule application: once declared, their value can be accessed ​in all patterns included ​in the applied rule. Their global scope makes variables suitable for identifying corresponding model elements located in different patterns.
  
 VMTL defines a naming convention for user-defined variables: all variable names are prefixed by the ''​$''​ character. VMTL defines a naming convention for user-defined variables: all variable names are prefixed by the ''​$''​ character.
Line 68: Line 68:
 |''​create''​ | Creates the annotated pattern model element in the target model. \\ \\ If a model element not included in the ''​Find''​ pattern of a rule is included in the rule's ''​Produce''​ pattern, the element is implicitly created in the target model. In such cases, using the ''​create''​ clause is optional.|Produce,​ Update | ''​create''​ | |''​create''​ | Creates the annotated pattern model element in the target model. \\ \\ If a model element not included in the ''​Find''​ pattern of a rule is included in the rule's ''​Produce''​ pattern, the element is implicitly created in the target model. In such cases, using the ''​create''​ clause is optional.|Produce,​ Update | ''​create''​ |
 |''​create singleton''​ | Creates the annotated pattern model element in the target model only if it does not exist in the source model. |Produce, Update | ''​create''​ | |''​create singleton''​ | Creates the annotated pattern model element in the target model only if it does not exist in the source model. |Produce, Update | ''​create''​ |
-|''​delete''​ | Deletes the annotated pattern model element from the source model. \\ \\ If the annotated pattern model element cannot be matched in the source model, this annotation has no effect. \\ \\ If a model element included in the ''​Find''​ pattern of a rule is not included in the rules'​s ''​Produce''​ pattern, the element is implicitly deleted in the target model. In such cases, using the ''​delete''​ clause is optional. | Produce, Update | ''​delete''​ |+|''​delete''​ | Deletes the annotated pattern model element from the source model. \\ \\ If a model element included in the ''​Find''​ pattern of a rule is not included in the rules'​s ''​Produce''​ pattern, the element is implicitly deleted in the target model. In such cases, using the ''​delete''​ clause is optional. | Produce, Update | ''​delete''​ |
 |''​either''​| Exactly one of the annotated model elements must be matched in the source model. | Find, Forbid, Require | ''​either''​ | |''​either''​| Exactly one of the annotated model elements must be matched in the source model. | Find, Forbid, Require | ''​either''​ |
 |''​indirect''​| The annotated model element, which must represent a relation, can be matched to a chain of relations of the same type (i.e. its transitive closure) in the source model. | Find, Forbid, Require | ''​indirect''​ | |''​indirect''​| The annotated model element, which must represent a relation, can be matched to a chain of relations of the same type (i.e. its transitive closure) in the source model. | Find, Forbid, Require | ''​indirect''​ |
vmtl/annotations.txt ยท Last modified: 2015/09/22 15:02 by rvac