1.2.1. GTASM Machine Definition

[Tip]Description

A GTASM machine (transformation) is the basic unit of execution. It consists of ASM rules, ASM functions, graph transformation rules and graph transformation patterns.

[Important]Syntax

GTASMDefAST ::= OptAnnotationsAST machine TypeNameAST { MachineContentsAST }
MachineContentsAST ::= MachineContentAST
	                   | MachineContentsAST MachineContentAST
	                  
MachineContentAST ::= GraphPatternDefAST	                  
	                  | GTRuleDefAST
	                  | AsmFunctionDefAST
	                  | AsmRuleDefAST
			

A GTASM transformation is identified by its local name; the fully qualified name of a machine is composed of the namespace defined in the container VTCL file and this name.

A GTASM transformation contains two types of components: abstract state machine (ASM) related components and graph transformation (GT) related components.

An ASM related component can be the definition of an ASM rule or the definition of an ASM function. The control flow of a GTASM machine is defined by ASM rules (starting from main).

A graph transformation related component can be the definition of a graph transformation rule or a graph pattern definition; the set of these compose the model query and manipulation part of the GTASM transformation.

[Note]Semantics

The entry point of the control flow is a special rule called main just similarly to the C or Java languages.

Example 2.2. Hello World Machine

namespace hello;			
machine helloWorld {
 rule main () = println("Hello world!");
}			
			


Defined in:  VTCL File