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
Last revision Both sides next revision
vmtl:annotations [2015/09/22 10:12]
rvac [Clauses]
vmtl:annotations [2015/09/22 14:59]
rvac [Special Variables]
Line 46: Line 46:
 ===== Special Variables ===== ===== Special Variables =====
  
-VMTL defines **special variables** as a method of controlling transformation execution (the ''​injective'',​ ''​priority'',​ and ''​steps''​ variables) and accessing the contents of the source model (the ''​self''​ and ''​type''​ variables). From a syntactic perspective,​ special variables are treated just like regular variables.+VMTL defines **special variables** as a method of controlling transformation execution (the ''​injective'',​ ''​priority'',​ and ''​steps''​ variables) and accessing the contents of the source model (the ''​id'', ​''​self''​and ''​type''​ variables). From a syntactic perspective,​ special variables are treated just like regular variables.
  
 Each special variable has a **scope**, identifying the fragment of the transformation specification to which the value of the variable is applicable. For instance, every VMTL rule has its own priority, which is independent from the priority of other rules. Therefore, the scope of the ''​priority''​ special variable is limited to one rule. Each special variable has a **scope**, identifying the fragment of the transformation specification to which the value of the variable is applicable. For instance, every VMTL rule has its own priority, which is independent from the priority of other rules. Therefore, the scope of the ''​priority''​ special variable is limited to one rule.
  
 ^Variable^Type^Scope^Description^Patterns^Examples^ ^Variable^Type^Scope^Description^Patterns^Examples^
 +|''​id''​ | String | Annotated element | Stores an optional user-defined pattern element identifier in order to facilitate the identification of corresponding elements across patterns. | Find, Produce, Update, Require, Forbid | ''​id := "​1"''​ |
 |''​injective''​ | Boolean | Rule | If the value of this special variable is ''​true'',​ each pattern element can be matched to at most one source model element. Otherwise, each pattern element can be matched to several source model elements. | Find, Produce, Update, Require, Forbid | ''​injective := true'' ​ | |''​injective''​ | Boolean | Rule | If the value of this special variable is ''​true'',​ each pattern element can be matched to at most one source model element. Otherwise, each pattern element can be matched to several source model elements. | Find, Produce, Update, Require, Forbid | ''​injective := true'' ​ |
 | ''​priority''​ | Integer | Rule | Determines the application priority of a VMTL rule. The default value of this special variable is 0, and higher values corresponding to higher execution priorities. | Find, Produce, Update, Require, Forbid | ''​priority := 1''​ | | ''​priority''​ | Integer | Rule | Determines the application priority of a VMTL rule. The default value of this special variable is 0, and higher values corresponding to higher execution priorities. | Find, Produce, Update, Require, Forbid | ''​priority := 1''​ |
vmtl/annotations.txt ยท Last modified: 2015/09/22 15:02 by rvac