next up previous contents
Next: Attribute Editor Up: Editing Previous: Editing Rules   Contents

Adding Attributes to a Graph Object

Attributes of graph objects have three components: the attribute type, its name and its value. Taking Java objects as attributes, the corresponding Java class defines the attribute type. The object itself is the attribute value.
Attribute values in a host graph have to be constant values (like integer numbers for example). The right-hand side of a graph rule can contain Java expressions which are instantiated by Java objects, at runtime.
The left-hand side or a NAC of a rule may contain constants or variables as attribute values, but no expressions like for example a = x + 1. A NAC may contain the variables declared on the left-hand side or a new variable declared as an input parameter. Variables are usually implicitly declared by just using them as attribute values. In this way they also get a type, i.e. the type of the current attribute instance. The scope of a variable is its rule, i.e. each variable is rule-globally defined. In a rule's right-hand side, Java expressions are allowed. They may contain the variables declared on the left-hand side or a new variable declared as an input parameter. Multiple usage of the same variable is allowed and required different attribute values to be equal.



Subsections
next up previous contents
Next: Attribute Editor Up: Editing Previous: Editing Rules   Contents
Olga Runge 2006-08-16