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
vmtl:annotations [2015/09/22 10:12]
rvac [Clauses]
vmtl:annotations [2015/09/22 15:02]
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 0and higher ​values ​corresponding to higher execution ​priorities. | Find, Produce, Update, Require, Forbid | ''​priority := 1''​ |+| ''​priority''​ | Integer | Rule | Determines the application priority of a rule. Only positive values are allowedwith lower values ​implying a higher execution ​priority. The default rule priority is ∞.| Find, Produce, Update, Require, Forbid | ''​priority := 1''​ |
 | ''​self''​ | Element | Annotated element | Represents the annotated model element. | Find, Produce, Update, Require, Forbid | ''​self.visibility := "​public"''​ | | ''​self''​ | Element | Annotated element | Represents the annotated model element. | Find, Produce, Update, Require, Forbid | ''​self.visibility := "​public"''​ |
 | ''​type''​ | String | Annotated element | Provides access to the name of the annotated model element'​s metaclass. Assigning a new value to this special variable modifies the annotated model element'​s metaclass. | Find, Produce, Update, Require, Forbid | ''​type := "​Actor"''​ | | ''​type''​ | String | Annotated element | Provides access to the name of the annotated model element'​s metaclass. Assigning a new value to this special variable modifies the annotated model element'​s metaclass. | Find, Produce, Update, Require, Forbid | ''​type := "​Actor"''​ |
vmtl/annotations.txt · Last modified: 2015/09/22 15:02 by rvac