The AGG Menu Guide

   Content

Main Menus

   File

   This menu describes how to manipulate graph grammars.
New GraGra
Create a new graph grammar.
Open
Load a graph grammar.
Save
Save the selected graph grammar in its current file.
Save As
Save the selected graph grammar in a specified file.
Open (Base)
Load a base graph grammar (A graph grammar without layout informations).
Save As (Base)
Save the base graph grammar of the selected grammar.
Export
GXL
Convert the selected grammar to GXL, an XML-based file exchange format for graphs.
GTXL
Convert the selected grammar to GTXL, an XML-based file exchange format for graphs and graph transformation systems.
Import
GGX
Import grammar components (type graph, graph, rule) in AGG own format.
GXL
Import a graph in  GXL  format.
OMONDO
Import an OMONDO XMI (.ecore) class diagram.
Close GraGra
Close the selected grammar.
AGG View to JPEG
Convert and save the view of AGG application to JPEG (.jpg) image.
Quit
Exit this application.

Please note: It is also possible to use pop-up menus of GraGra | Type Graph | Graph | Rule | NAC | PAC | Atomic Constraint | Constraint to obtain their functionalities. Such a pop-up menu will appear after pressing the right mouse button when the cursor points to the corresponding element of the grammar tree.
back to Content

   Edit

   This menu describes how to manipulate graph objects.
Undo Edit
Undo an appropriate edit.
Redo Edit
Redo the last undone edit.
Discards All Edits
Empty the undo manager.
Attributes
An attribute editor is opened for the picked (by pressing right mouse button) or selected graph object.
This editor allows:
- to define attributes and set their values,
- to define variables and conditions of the attribute context ( only for the rule objects),
- to add a new attribute handler.
Please note: If you use a variable for the value of an attribute, the variable is added to the attribute context automatically. Renaming or deleting this variable does not change the attribute context. You ought to delete non-used variables from the context explicitly, otherwise an error may happen during match completion or transformation.
Delete
Delete all selected graph object(s) and all dangling edges.
Copy
Duplicate selected graph object(s).
Using Copy icon allows to get a copy of the selected graph objects into the same graph (panel) or into a graph (panel) that is visible at the same time.
For that aim:
- select graph objects,
- click on Copy icon,
- click on the background of the graph panel to place the copy.
Using Copy in combination with Paste you can also get a copy of the selected graph objects into another graph (panel) that is not currently visible.
Paste
To place selected and copied graph object(s) into another graph.
For that aim:
- select graph objects,
- click on Copy icon,
- choose the target graph,
- click on Paste icon,
- click on the background of the graph (panel) to place the copy.
Select Nodes of Type
Select all nodes of the current node type.
Select Edges of Type
Select all edges of the current edge type.
Select All
Select all graph objects.
Deselect All
Deselect all selected objects.
Straighten Edges
All selected edges are straightened.
When no selection is done before, all edges are straightened and also new created parallel edges will be straightened, too. To disable this feature, please select an edge and call this menu item for selected edge again.
Identic Rule
An identical rule morphism is created by copying the left graph of the rule to the right side. The previous contents of the right side is deleted. The object mapping is indicated by the same number.
Identic NAC
An identical NAC morphism is created by copying the left graph of the rule to a NAC graph. The previous contents of the NAC graph is deleted. The object mapping is indicated by the same number.
Identic PAC
An identical PAC morphism is created by copying the left graph of the rule to a PAC graph. The previous contents of the PAC graph is deleted. The object mapping is indicated by the same number.
Identic General AC
An identical General (Nested) AC morphism is created by copying the left graph of the rule to an AC graph. The previous contents of the AC graph is deleted. The object mapping is indicated by the same number.

Please note: It is also possible to use similar pop-up menus. The node or edge pop-up menu appears after pressing the right mouse button when the cursor points to a node or the band point of an edge.
back to Content

   Mode

   This menu allows to set the mode of actions of the AGG grammar editor.
Draw
A node is created by clicking the left button on the background. Nodes are filled with foreground color. An edge between two nodes is created by clicking on the source and then on the target nodes using the left mouse button. An edge can contain one band only. The band can be inserted when creating an edge by clicking at the source, then at the background, and then at the target or by grabbing an edge with the (middle) mouse button at the point near the middle of the edge and dragging it to the desired point.
Select
Objects are selected by pointing with any mouse button at the objects to be selected. Selected nodes and edges turn to green. One click on the selected object deselects it. Selected objects can be moved, duplicated, deleted, and selected edges with a band can be straightened.
Move
A single node / edge is moved by dragging the mouse button: press the mouse button when the cursor points to a node / edge, move the pointer to the right position and release the button. When a node is moved, incident edges are moved accordingly. Moving leads to the parallel translation of the selected objects.
Attributes
An attribute editor is opened for the picked object.
Map
Toggle mode for interactive creation of the Rule | NAC | PAC | Match morphism. To add a mapping, first click on an object on the left hand side of the rule, then click on an object you want to map it to on the right hand side or in a NAC or in the host graph. If two objects are type, structure, and attribute compatible, they are labeled by the same number.
Unmap
To delete a mapping, click on a mapped object on the left hand side of the rule; the Rule | NAC | PAC | Match mapping is deleted. If you click on a mapped object on the right hand side of the rule, only the rule mapping is deleted. If you click on an mapped object on the NAC side, the NAC morphism will be deleted. If you click on an mapped object on the graph side, only the match morphism will be deleted.
Image_view
When selected and an image is defined for a node type, this image will be shown at the node position.

Please note: It is also possible to use similar pop-up menu by pressing the right mouse button on the background of a graph panel.
back to Content

   Transform

   This menu allows to perform an in-place graph transformation. Additionally, in AGG implemented graph transformation algorithms are presented here in very short form.
Start

By default, the rules given by a graph grammar are applied non-deterministically. Rules to be applied and their matches are chosen randomly.
Algorithm:
rule_set;
applicable= true;
while( applicable ) {
   rules= cloneRuleSet( rule_set );
   applied= false;
   while( not applied & rules not empty ) {
      rule= getRandomlyFromRuleSet( rules );
      applied= apply( rule);
      if( not applied )
      removeRuleFromRuleSet( rule, rules );
   }
   applicable= applied;
}


Next possible kind of graph transformation is transformation by rule layers (layered). A layer can be set for a single rule or a set of rules. The layers fix the order of how rules are applied. The interpretation process starts with smallest layer. Once the highest layer has been finished the transformation stops.
Algorithm:
layer_rule_set;
layer= getStartLayer( layer_rule_set );
while( layer exists ) {
   rules= getRulesForLayer( layer_rule_set, layer );
   applyRandomlyAsLongAsPossible( rules );
   layer= getNextLayer( layer_rule_set );
}


Next possible kind is graph transformation by rule priorities. Priority can be set for a single rule or a set of rules. The rule with the highest priority is always applied first.
Algorithm:
priority_rule_set;
priorityFirst= getFirstPriority( priority_rule_set );
rulesFirst= getRulesForPriority( priority_rule_set, priorityFirst );
applicable= true;
while( applicable ) {
   applicable= applyRandomlyAsLongAsPossible( rulesFirst );
   applied= false;
   priority= getNextPriority( priority_rule_set );
   while( not applied & priority exists ) {
      rules= getRulesForPriority( rule_set, priority );
      applied= applyRandomlyOneRule( rules );
      priority= getNextPriority( priority_rule_set );
   }
   if( applied )
      applicable= true;
}


Finally, in some ways deterministically transformation is graph transformation by rule sequences. A transformation rule sequence is a control structure which defines an ordered set of rule subsequences and rule iterations.
Algorithm:
seq_rule_set;
subseq= getStartSubsequence ( seq_rule_se );
while( subseq exists ) {
   rules= getRulesForSubsequence( seq_rule_set, subseq );
   subseq_iters= getSubsequenceIterations( seq_rule_set, subseq );
   sc= 1;
   while( sc <= subseq_iters ) {
      while( rules not empty ) {
         rule= getRuleFromRuleSet( rules );
         rule_iters= getRuleIterations( seq_rule_set, subseq, rule );
         rc= 1;
         while( rc <= rule_iters ) {
            apply( rule );
            rc++;
         }
      }
      sc++;
   }
   subseq= getNextSubsequence( seq_rule_set );
}


See also Transformation options for all these kinds.
At the end, the host graph is modified and shows the result of the rule applications.
Stop
Stop the running transformation which is started with Start.
Match
Toggle mode for interactive creation of the match morphism. To add a mapping, first click on an object of the left hand side of the rule, then click on the object you want to map to in the host graph. All match completions are computed automatically by subsequently calling Next Completion.
Next Completion
Find the next match of the current rule into the host graph. If you have specified a partial match before, you can compute all its completions by subsequently calling this command.
Step
Perform an in-place graph transformation step: apply a rule on the host graph. If a match is defined before, this match is used. Otherwise, a new match is computed. The host graph is modified and shows the result of the step.
Undo Step
Undo transformation step. This operation is available after running transformation has finished.
back to Content

   Parser

   The AGG graph parser is able to check, if a given graph belongs to a certain graph language determined by a graph grammar.
Open
Open a user dialog to initialize the parser and change to parser GUI.
Start
Start the parsing process: parsing of a non-layered or layered graph grammar based on critical pair analysis.
Stop
Stop the parsing process.
back
Return to main AGG GUI.
back to Content

   Analyzer

   Critical Pair Analysis

   Critical Pair Analysis (CPA) allows to compute all potentially conflicting rule pairs.
Reset
Set the current selected grammar to be a grammar of the CPA GUI.
Unlock
Allow edit operations on the grammar that was used for critical pair analysis.
Please note: It is necessary to reset the grammar for critical pair analysis, after the grammar was unlocked.
Set Rules
Define the own rule subsets to be checked. A dialog containing all rules of the current grammar makes possible to select two different rule subsets to be checked.
Generate
Conflicts
Change to the CPA GUI, if it is not already done, and generate parallel conflicts of rule pairs.
Dependencies
Change to the CPA GUI, if it is not already done, and generate sequential dependencies of rule pairs.
After that you can see results by selecting rule pairs.
You can also load already saved critical pairs to see results or to generate them newly using other options.
Please note: It is not possible to edit the grammar after returning to main GUI. Use Unlock to make the grammar editable. Unlock is enabled after the generation has finished or stopped.
Stop
Stop generation of critical pairs.
Check Consistency
All generated overlapping graphs are checked against graph consistency constraints. The number of critical pairs might decrease due to constraints.
Empty
Empty currently selected container of critical pairs.
Debug
Change to the CPA GUI where it is possible to generate critical pairs step by step. After a rule pair is selected, the critical pair analysis starts for this pair only.
Save
Save critical pairs.
Combining Debug and Save allows to save subsets of critical pairs.
Load
In This Window
Load critical pairs in main window.
In New Window
Load critical pairs in a new window.
Show
Conflicts
Show conflicts table.
Dependencies
Show dependencies table.
CPA Graph
Show CPA relations graph which contains computed conflict and dependency pairs.
Check Host Graph
Check which of the critical rule pairs are applicable to the host graph. Only parallel conflicts can be checked.
back
Return to main AGG GUI.
back to Content

   Applicability of Rule Sequences

   In AGG  there is a possibility to check whether a rule sequence is applicable on a graph or not. We need to check some certain applicability (resp. non-applicability) criteria. Applicability (resp. non-applicability) criteria are sufficient but not necessary for the applicability (resp. non-applicability) of a rule sequence to a graph. These criteria can be checked in a static way, since they are based mainly on the dependency or independency of rules. Moreover, the non-satisfaction of one of the criteria gives a hint to the reason for a rule sequence to be applicable or not. More info here .
Additionally, our Technical Report Sufficient Criteria for Applicability and Non-Applicability of Rule Sequences  written by L.Lambers, H.Ehrig and G.Taentzer  gives a detailed explanation to this matter. You will find this report in the example folder Pizza  which is a part of the AGG  Examples.
Validate
A user dialog allows to check and save rule sequences. It also provides a short help description of criteria for the applicability (resp. for the non-applicability) of a rule sequence and explains how to interpret the results. The results of this check will be shown in separated tables.
Load
Load a file (.srx) which contains rule sequences with its results of the applicability (resp. non-applicability) criteria. This file contains the corresponding graph grammar which will be loaded in the AGG  editor, too.
back to Content

   Consistency Check

   Consistency conditions describe basic properties of graphs as e.g. the existence or uniqueness of certain elements, independent of particular rules. A graph grammar is consistent if the start graph satisfies consistency conditions and the rules preserve this property.
Check Atomics
Check if the atomic graphical constraints are valid. An atomic graphical constraint is valid, if it is a total injective morphism.
Check Constraints
Check if the start graph satisfies all consistency conditions. Using Rule pop-up menu makes possible to create or delete the rule individual post application conditions. After deleting or changing atomic graphical constraints or consistency conditions, the rule individual post application conditions must be created newly.
back to Content

   Termination of LGTS
In AGG  termination criteria are implemented for layered graph transformation systems. These criteria are defined for typed graph transformation with injective rules, injective matches and injective negative application conditions (NACs).
Moreover we define layered graph grammars with deletion and nondeletion layers. Termination criteria are expressed by deletion and nondeletion layer conditions.
The deletion layer conditions ensure that the last creation of an element with a certain label (type) should precede the first deletion of an element with the same label. On the other hands, nondeletion layer conditions ensure that if an element of a certain label occurs in the LHS of a rule then all elements of the same label were already created in previous layers.

A graph grammar is called   layered graph grammar   ( LGG )  if for each rule   r   we have a rule layer   rl (r) = k   and for each label   l   a creation layer   cl (l)   and a deletion layer   dl (l) ,  and a deletion layer and a nondeletion layer satisfying the following conditions for all rules:

(1) Deletion Layer Conditions
------------------------------------------
If   k   is a deletion layer, then
1. each rule r decreases the number of graph items, or
2. each rule r decreases the number of graph items of one special type.

(2) Deletion Layer Conditions
------------------------------------------
If   k   is a deletion layer
1. r   is deleting at least one item
2. 0 <= cl (l) <= dl (l) <= n   for all   l
3. if   r   deletes   l    then   dl (l) <= rl (r)
4. if   r   creates   l    then   cl (l) > rl (r)

(3) Nondeletion Layer Conditions
-------------------------------------------------
If   k   is a nondele
tion layer
1. r   is nondeleting,   i.e.   r : L -> R   is total and injective
2. r   has NAC   n : L -> N   with   n' : N -> R   injective   s.t.   n'   o n = r
3. if   l   occurs in   L    then   cl (l) <= rl (r)
4. if   r   creates   l    then   cl (l) > rl (r)

The termination criteria (2) and (3) are defined for typed graph transformation with injective rules, injective matches and injective negative application conditions (NACs).
The deletion layer conditions  (2)  ensure that the last creation of an element of a certain type should precede the first deletion of an element of the same type.
On the other hand,   nondeletion layer conditions  (3)  ensure that if an element of a certain type occurs in the LHS of a rule then all elements of the same type were already created in this or a previous layer.
A  layered graph grammar  with deletion and nondeletion layers terminates, if for each layer the deletion or nondeletion layer conditions defined above are satisfied.
The rule layers can be set or generated, the creation and deletion type layers will be generated automatically.
back to Content

   Preferences

Options... for graph matching and transformation, graph layouter, graph parser, critical pair analysis

   General   ( Preferences > Options...)

Following options should be used to direct the matching process.
Match completion strategy
CSP (Constraint Satisfaction Problem) is used as solution algorithm for the graph matching.
CSP w/o BJ A simplified variant of CSP
Match conditions
injective / non-injective
dangling condition
identification condition
( note: dangling and identification conditions realize Double Pushout Approach)
NACs
A Negative Application Condition of a rule prohibits a pattern in a graph when applying a rule.
PACs
A Positive Application Condition for a rule demands a pattern in a graph for its application. Using PACs leads to a more compact and concise rule notation.
The following options can be used for each kind of graph transformation. (See Transformation options)
Consistency check during transformation
It allows to decide how graph consistency constraints should influence the transformation process:
consistent transformations only
stop after inconsistent transformation
consistent at the end
In case of layered graph transformation the consistency check applied for each layer.
Rule applicability on the host graph
If this option is set, then after each transformation step each rule will check whether it is applicable in the context of the altered state of the host graph. Visually, the name of a non-applicable rule is gray-colored in the grammar tree view. It is also possible to check the rule applicability by using menu item Check Rule Applicability of the GraGra pop-up menu. Using Dismiss Rule Applicability menu item allows to undo this check and redisplay the rule names.

Graph display settings

show after step
If selected, the altered host graph is shown after each graph transformation step during the interpretation process, otherwise, the altered host graph is only shown after transformation finished.
wait after step means that the transformation process is paused after each succesful step. The user may make closer examination of the altered host graph. Entering any key allows to continue the graph transformation.
select new objects after step means that the new created nodes and edges are selected after each step with aim to improve the visualization of the graph transformation.
back to Content

   Transformation   ( Preferences > Options...)
Current AGG application provides four algorithms for graph transformation:
non-deterministically (NT) (by default)
Rules to be applied and their matches are chosen randomly. The chosen rule is applied as long as possible.
by rule priorities (PT)
Each rule or a group of rules get a priority number. The smallest priority is the highest. The rule(s) with highest priority is always applied first as long as possible and then the rule(s) with the next priority, and so on.
by rule layers (layered) (LT)
Each rule or a group of rules get a layer number. The rules with smallest layer are applied first as long as possible and then the rules with the next layer, and so on.
by rule sequences (ST)
Each rule or a group of rules can build a rule sequence respectively a rule subsequence of a sequence.
A transformation rule sequence is a control structure which defines the order and how often to apply the rules.
To create a rule sequence please use the pop-up menu GraGra -> New -> Rule Sequence. A new RuleSequence item will appear in the GraGra tree view. You can rename it by double click at the tree item and retyping the text. By selecting the tree item a dialog opens which shows the rule set of the current gragra and allows to define a rule sequence.
(See also Rule Sequence pop-up menu)
Transformation by rule sequences is a possibility in AGG to apply rules quasi deterministically, because a transformation rule sequence is a control structure which defines an ordered set of rule subsequences and rule iterations.
(See also Transform menu)

Following options can be used for layered graph transformation:

show layer before transform
A rule layer setting dialog is shown before transformation starts. It allows to change the rule layer.
loop over layers
This allows to continue graph transformation by starting on the smallest layer again as long as at least one rule is still applicable.
reset graph before loop
This option allows to continue graph transformation by starting next loop over layers at the initial state of the first host graph.
stop current layer and wait
The graph transformation will pause and wait on the current layer. Entering any key allows to continue the graph transformation. Thereafter, rules of the next layer are applied.
break transformation on current layer
If this option is selected and Stop transformation is aktivated the only transformation on the current layer is broken. The transformation process continues with rules of the next layer.
break layered transformation
If this option is selected and Stop transformation is aktivated the whole transformation process will stop.

back to Content

   Layouter   ( Preferences > Options...)

   A new graph layout algorithm "Evolutionary Layout of Graph Transformation Sequences" for transformed graphs is integrated into AGG.
The options for the graph layouter include:
perform during graph transformation
If selected, the new layout algorithm is used to layout transformed graphs.
write to directory
If selected, each graph of the graph transformation sequence is converted to JPEG image (.jpg) and written to a user defined directory. The directory can be chosen by a file chooser dialog before.
write to (.log) file
If selected, the layout metrics are written into a grammar_name.log file in the user defined derectory.
use layout pattern
If selected, a set of layout patterns is available which allows to direct the graph layouter. This option is only enabled when the option perform during graph transformation is selected.

General layout pattern include:
iteration count of layout process
It is used to set the count of layouting iterations to run.
initial temperature of cooling
It is used to set initial temperature for initial layout.
preferred edge length
It defines the preferred length for all edges of transformed graphs.
span of node cluster
It is used to set the distance between a node and its neighbour nodes which are connected by outgoing edges.
Please note: The done changes are accepted after RETURN key is pressed.

Edge Type Tattern include pattern for X and Y-axis and preferred length.

Node Type Tattern allows still to fix the current position of nodes of the selected type.

Table of Graph Layout Pattern shows all user defined pattern for node and edge types.

Please note: If the option use layout pattern is not selected, the only default layout pattern of this algorithm is used.
Of course, this graph layout algorithm can only try to approximate the current layout of a graph to a graph layout defined by the layout pattern. Increasing iteration count of the layout process and initial temperature of cooling may help to achieve a better approximation but would increase the cost in time.
back to Content

   Parser   ( Preferences > Options...)

The options for parsing include:
Parser display option
It is used to configure the visualization of the parsing process. Algorithm for parser
AGG offers three different variants of a parsing algorithm being based on backtracking. The parser builds up a derivation tree of possible reductions of the host graph. The leaves of this tree are either dead ends, i.e. leave graphs where no rule can be applied anymore but non-isomorphic to the stop graph or the stop graph. In this case, the parsing was successful.
Critical Pair Analysis
This parser exploits critical pair analysis for rules what allows to make parsing of graphs more efficient: decisions between conflicting rule applications are delayed as far as possible. This means that non-conflicting rules are applied first to reduce the graph as much as possible. Afterwards, the conflicting rules are applied, first in non-critical situations and when this is not possible, in critical once. In general, this optimization reduces the derivation tree constructed, but does not change the worst case complexity.
Semi optimized backtracking
This is a simplified parser being based on critical pairs. This means that non-conflicting rules are applied first to reduce the graph as much as possible. Afterwards, the conflicting rules are applied in any situation.
Backtracking without optimization
This is the simple backtracking parser with exponential time complexity.
layered
Please note: The rule layers defined before are used for critical pair analysis and parsing. The rule layers are identical with the layers for the graph transformation.
back to Content

   Critical Pairs   ( Preferences > Options...)
The options for critical pair analysis include:
Select the kind of critical pairs to compute
conflicts
The implemented algorithm detects parallel conflicts between rule applications.
These conflicts are of the kind:
  • the first rule deletes objects which the second rule needs
  • the first rule produces objects which the second rule does not allow
  • the first rule changes attributes which the second rule uses

trigger dependency
The implemented algorithm detects sequential trigger dependencies between rule applications.
These dependencies are of the kind:
  • the first rule produces objects which the second rule needs
  • the first rule deletes objects which the second rule does not allow
  • the first rule changes attributes so that they can be used by the second rule

trigger & switch dependencies
The implemented algorithm detects sequential trigger and switch dependencies between rule applications.
These dependencies are similar to trigger dependency. Additionally, it checks whether two rules are in deliver-delete (resp. forbid-produce) dependency. That means the second rule deletes (produces) something what the first rule delivers (forbids), so that the first rule is irreversible after the second is applied.
layered
Please note: The rule layers defined for the layered graph transformation 'are used for critical pair analysis and parsing, too. The rule layers are identical with the rule layers of the graph transformation.
complete
If selected, complete generation (searching all possible matches) of critical pairs will be done, if not selected, searching up to first critical match.
consistent
If selected, all overlapping graphs generated during computation of critical pairs will be checked against graph consistency constraints. The number of critical pairs migth decrease due to constraints.
Please note: Because a critical graph is a minimal graph of a conflicting situation, it is not always possible to check all graph consistency constraints, especially constraints (formulae) with negation of atomic graph constraints. Also attribute conditions and constant values of the attributes could not be evaluated for each graph. This option is deselected by default.
strong
If selected, extended attribute checking will take place. That means, the first rule changes an attribute value of a graph object, but the second rule uses this attribute value as constant value or as a target value of an input parameter or as a target value of a variable which is part of an attribute condition. The number of critical pairs may decrease therefore.
ignore pairs with same rules
If selected, critical pairs of rule pairs with same rules are ignored during computation. Otherwise, they are computed, too.
ignore pairs with same rules and same matches
If selected, critical pairs of rule pairs with same rules and same matches are ignored during computation. Otherwise, they are computed, too.
essential
An essential critical pair exists for each conflict reason. It expresses the conflict caused by exactly this conflict reason in a minimal context. Essential critical pairs is a subset of critical pairs.

Display Settings
They allow to set the number of displayed critical pairs and initial window size of overlapping graphs.
back to Content

   Preferences
Defaults for graphical visualization support

   Font

Set text font: Plain or Bold.
   Font Size
Set size of the current text font.
   Zoom
Set zooming size of graphics.
   Show Attributes
Allows to set visibility of the attributes of nodes and edges for graphs, rules and type graph separately.
   Keep Types On Top
Allows to keep the type palette to be visible during additing types and graphs.
back to Content

Pop-up Menus

   GraGra
New
Type Graph
Create a new type graph for the selected grammar.
Graph
Create a new host graph for the selected grammar.
Rule
Create a new rule for the selected grammar.
Rule Scheme
Crate a new rule scheme for the selected grammar.
A rule scheme is used to generate an amalgamated rule with aim to perform amalgamated graph transformation.
Atomic Constraint
Create a new atomic graphical consistency constraint (GCC) for the grammar.
Constraint
Create a new consistency condition (CC) (boolean formula) for a grammar. Constraints are build up over the GCCs of a grammar. Each GCC corresponds to a variable inside of boolean formula. After the host graph is checked, each variable will get value TRUE or FALSE and formulae can be evaluated. A host graph satisfies consistency conditions, if the result value of each formula is TRUE.
To edit a constraint, please use its pop-up menu.
Rule Sequence
Create a new rule sequence for the selected grammar with aim to check applicability of this rule sequence, but also to use it for graph transformation.
(See also Rule Sequence pop-up menu)
Add Copy of Current Host Graph
Make a copy of the current host graph and add it to the grammar.

Layering
Set Rule Layer
A table with rules appears to set the layer of each rule. These layers will be used during layered graph transformation.
Select Rule Layer for Constraint
A table with consistency conditions (formulae) appears to set the layer(s) of each formula. These layers will be used during layered graph transformation. A consistency condition must be satisfied on its layer only.
Set Trigger Rule for Layer
For each layer one rule may be set as trigger for this layer. The trigger rule is applied as first rule and only once. All other rules are applied as long as possible. If the trigger rule is not applicable, the corresponding layer is not executed at all.
Sort Rules by Layer
The rules will be sorted according layers.
Sort Constraints by Layer
The constraints will be sorted according layers.
Disable Rule Layer
All rules of the selected layer will be disabled.

Priority
Set Rule Priority
A table of rules appears to set priority of each rule. These priorities will be used during graph transformation by rule priorities.
Select Rule Priority for Constraint
A table with consistency conditions (formulae) appears to select priority for each formula. These priorities will be used during graph transformation by rule priorities. A consistency condition has to be satisfied for the selected priority only.
Sort Rules by Priority
The rules will be sorted according priorities.
Sort Constraints by Priority
The constraints will be sorted according priorities.

Check Rule Applicability
Check each rule whether it is applicable in the context of the current state of the host graph. Visually, the name of a non-applicable rule is gray-colored in the grammar tree view.

Dismiss Rule Applicability
Dismiss the rule applicability check and redisplay the rule names.

Consistency
Check Atomics
Check if atomic graphical consistency constraints are valid. An GCC is valid, if it is a total injective morphism.
Check Constraints
Check if the work graph satisfies the consistency conditions.
Create Post Application Conditions
Transform global consistency conditions into post-application conditions for each rule. A so-constructed rule is applicable to a consistent graph if and only if the derived graph is consistent, too.

Close
Close this grammar.

Save
Save this grammar.

Save As
Save this grammar into the specified file.

Export
JPEG
Convert the host graph of the selected grammar to an JPEG (.jpg) image.
GXL
Convert the selected grammar to GXL, an XML-based file exchange format for graphs.
GTXL
Convert the selected grammar to GTXL, an XML-based file exchange format for graphs and graph transformation systems.
COLOR GRAPH
Convert the currently selected host graph of the current grammar to Coloring Problems Graph Format. This format is a flexible format suitable for many types of graph problems. The output file will end with (.col).
This output file can be used as input file for tools which provide algorithms and heuristics for graph problems, i.e., Greedy Coloring algorithm
( see   http://www.cs.ualberta.ca/~joe/Coloring/index.html#Graph.Colorers
and   http://www.cs.ualberta.ca/~joe/Coloring/Colorsrc/manual.html#greedy
for format description of (.col) see paper Clique and Coloring Problems Graph Format ).
The Greedy algorithm, also known as the sequential algorithm. The Greedy takes each vertex in turn in some predefined order and tries to color the vertex with one of the colors used so far. In other words, it tries to add the vertex to one of the existing color classes. If it is not possible to color it with any existing color, then a new color class is created and the vertex is assigned the color of that class.
The output file of Greedy Coloring ends with (.col.res) and can be imported by AGG.

Import
GGX
Import grammar components   in AGG own format.
GXL
Import a graph  in GXL format.
OMONDO
Import an  OMONDO XMI (.ecore)  class diagram.
COLOR GRAPH
Try to integrate results of tools for Coloring Problems into nodes of the currently selected host graph of the current grammar. The input file must end with (.col.res).
( See   http://www.cs.ualberta.ca/~joe/Coloring/index.html#Graph.Colorers
and   http://www.cs.ualberta.ca/~joe/Coloring/Colorsrc/manual.html#greedy
for format description of (.col.res) see paper Clique and Coloring Problems Graph Format ).
The color values of the import file will be used for values of color attribute of nodes of the current host graph. The color attribute should be of type int or String.

Reset Graph
PLEASE NOTE: This is an item of the Graph Pop-up menu now.
The currently selected host graph of a grammar will be rewritten by a copy of the (first) host graph. This graph copy is done after a grammar is loaded in AGG.

Reload
Currently selected grammar is loaded again.

Textual Comments
A simple text editor allows to put some comments to the specified grammar.
back to Content

   Type Graph
This menu describes the behavior of the type graph check and how the type graph is used.
disabled
The type graph is ignored, thus all graphs can contain objects with types defined in the type set of the grammar. Multiplicities are also ignored.
enabled
The type graph is basically used. Thus, all graphs may only contain objects of types defined in the type graph. The type multiplicities are not checked.
enabled with max
The type graph is basically used. Thus, all graphs can only contain objects with types defined in the type graph. Multiplicities in all graphs should satisfy the defined maximum constraints.
enabled with min and max
The type graph is used. Thus, all graphs can only be typed above node and edge types defined in the type graph. All graphs of a grammar must satisfy maximum constraints of type multiplicity and the host graph must satisfy the minimum constraints in addition.
Delete
The type graph is destroyed. Afterwards, all graphs are typed above types defined in the type set of the grammar.
Textual Comments
A simple text editor allows to put some comments to the specified type graph.

If the type graph check is set, the type graph is used during all graph changes.

Editing Type Graph

A type graph is created by using menu item New > Type Graph of the  gragra  pop-up menu. After selecting its entry in the tree view an empty graph is loaded in the graph editor. Editing type graph is similar to the editing a host graph of a grammar, also the attributes of nodes and edges can be set by default values.
The  multiplicity  of a node resp. edge type can be set in a multiplicity dialog which appears after selecting item Multiplicity from the context pop-up menu of a node resp. edge.
The node type multiplicity defines how many nodes can be created in a host graph.
The edge type multiplicity includes source and target multiplicity. The source multiplicity defines how many nodes of the source node type can be connected by this edge type to a node of the target node type. The target multiplicity defines how many nodes of the target node type can be connected by this edge type to a node of the source node type.

A type graph can be enriched with inheritance relations between nodes. Each node type may have more then one direct ancestor (parent) from which it inherits the attributes and edges. A parent node can be set by choosing item Set Parent of the context pop-up menu and clicking the left button on the appropriate node. An inheritance edge is added to show the defined relation. A parent node can be unset using item Unset Parent and clicking the left button on the parent node.
Additionally, a parent node type can be declared as an abstract type by selecting item Abstract of the context pop-up menu. It is allowed to use an abstract node type for nodes of rules and graph constraints, but it should not be used for creating nodes of a host graph.
Please note:
The multiplicity of a parent node type does also effect the number of the instances of a child type in a host graph. Since all instances of the child types are instances of a parent type, the sum is limited by the multiplicity of this parent type.
Similiar for the inherited edges - the overall number of incoming / outgoing edges is limited by the multiplicity of the edge type incoming to / outgoing from the parent node type.

Furthermore, using item Hide Objects of Type makes possible to hide all instances of this type in a host graph. The appropriated type object in the type graph is gray colored now. Use Show Objects of Type to get its instances to be visible again.

back to Content

   Graph
This pop-up menu describes operations of a host graph.
Reset
The pointed host graph is reset to the start graph of its grammar.
Delete
The pointed host graph is deleted. The last host graph cannot be deleted anymore.
Textual Comments
A simple text editor allows to put some comments to the pointed host graph.

back to Content

   Rule
This pop-up menu describes all possible operations of a rule.
New General Application Condition
Create a General Application Condition for rule application. A GAC determines a pattern in a graph to apply a rule. General application conditions are closed under boolean formula. The negation of a GAC is equivalent to a NAC, the positive expression - to a PAC of a rule.
Moreover, a general rule application condition can be refined by one or more general application conditions. The nested structure of a GAC allows to increase the expressiveness of local changes of graph transformations.
Set Formula above General Application Conditions
Allow to define a boolean formula above GACs.
A formula will be represented by a binary tree graph. It can be edited by using the background and node pop-up menus of the graph. To hold the graph more compact some simplifications are used. (Exmpl.: ac is equivalent to EXISTS(ac, true), !ac is equivalent to NOT EXISTS(ac, true))
An empty graph means that all condition nodes are connected by AND operator.
New NAC
Create a NAC (Negative Application Condition) for rule application. A NAC forbids a pattern in a graph to apply a rule.
New PAC
Create a PAC (Positive Application Condition) for rule application. On the contrary to a NAC, a PAC demands a pattern in a graph to apply a rule. Using PACs leads to a more compact and concise rule notation.
Create Post Conditions
Post application conditions of a rule are generated using consistency conditions such that a graph grammar ensures consistency during rule application. Please note: Post application conditions are not supported for graph grammars with node type inheritance.
Delete Post Conditions
Delete Post application conditions of a rule.
Set Layer
Set rule layer that is used during layered graph transformation.
Set Priority
Set rule priority that is used during graph transformation by rule priority.
Parallel Matching
Set so-called "parallel" matching mode for rule application. That means, a rule is applied "simultaneously" on all valid "parallel" matches found in the current state of the host graph. Only after all possible "parallel" rule applications are done the structural changes of the host graph will take effect on finding next valid "parallel" matches.
Please note, at the time this new feature is in experimental phase. One should be careful when using it.
Move
Moving rule to another position inside of rule set of its grammar.
Copy
Add a rule copy to the same grammar.
To copy a rule from another grammar is possible by using Import > GGX of the menu File or GraGra pop-up menu.
Make Inverse Rule
Revert an injective rule: left graph will be the RHS, right graph - the LHS, the objects to delete are now to be created, the objects to create are now to be deleted. Application conditions (NACs, PACs, General (Nested) ACs and attribute conditions) will be converted when it is possible. (A warning massage dialog shows conditions failed.) The attribute expressions inside the RHS of the current rule will be replaced by a variable inside the LHS of the new rule. The successful reverted rule is added to the rule set.
Make Minimal Rule
The minimal rule is extracted from a given rule. A minimal rule comprises the effects of a given rule in a minimal context. The application conditions (NACs, PACs, General ACs) are not taken in account.
Delete
Delete this rule.
disabled
Disable this rule. A disabled rule is not taken in account during graph transformation.
animated
This option can be used with positive effect for a rule which deletes and then creates an outgoing edge from the same source node to an other target node. The source and target nodes should be preserved by this rule. Moreover, it is needed that the type of the source node is declared to be animated, too. This can be done in the Node Type Editor which is a part of the AGG Type Editor.
Wait Before Apply Rule
The transformation process is paused before to apply this rule. The user may make closer examination of the match. Entering any key allows to continue the graph transformation.
Textual Comments
A simple text editor allows to put some comments to the specified rule.
back to Content

   Rule Scheme
This pop-up menu describes all possible operations of a rule scheme. A rule scheme is a group of rules consisting of exactly one kernel rule and 0..* multi rules. The kernel rule is automatically included into each multi rule. Therefore a multi rule is an extension on the kernel rule. It normally contains the optional elements.
New Multi Rule
Create a new multi rule as extention on the kernel rule. The nodes and edges of the kernel rule are connected to its copies inside of a multi rule. Moreover, the objects of the kernel rule cannot be changed or deleted from a multi rule. This is only allowed for the kernel rule. If the kernel rule was modified, all the multi rules will automatically follow.
When running transformation AGG is trying to match a rule scheme. It will try to find the "largest" amalgamation (combination) of the multi rules such that it matches in the host graph. Such a combination can include just one of the multi rules, or just the kernel rule. If AGG can't find any matching combination, the rule scheme doesn't match.
parallel Match of Kernel Rule
If selected, AGG tries to use "parallel" matching for the kernel rule and to create amalgamation based on all found kernel matches which are conflict free. Otherwise, only first found kernel match is used for amalgamation.
conflict free Match of Multi Rule
If selected, only use-delete conflict free matches of multi rules are used for amalgamation. Otherwise, all found multi matches free are taken in account.
disjoint Match of Multi Rule
If selected, only disjoint matches of multi rules are used for amalgamation. Otherwise, also jointly (conflict free) multi matches are allowed.
apply at least One Multi Rule
If selected, at least one multi rule must be applicable. Otherwise the rule scheme doesn't match.
Create Amalgamated Rule
AGG will apply the rule scheme to the current host graph and then add the amalgamated (unmodifiable) rule that already has a match at the host graph. This will fail if AGG doesn't find any combination that matches. Please note, that the match of the kernel rule can be also set manuelly. It will be taken in account during amalgamation process. After the transformation step done, the amalgamated rule is destroyed.
The possibility to create an amalgamated rule manuelly is only useful for the testing purpose.
Make Inverse Rule Scheme
Revert a rule scheme: its kernel rule and multi rules will be reverted. The rules must be injective. Application conditions (NACs, PACs, General (Nested) ACs and attribute conditions) will be converted when it is possible. (A warning massage dialog shows conditions failed.) The attribute expressions inside the RHS of the rules will be replaced by a variable inside the LHS on the new rules. The successful reverted rule scheme is added to the rule set.

All other items of the Rule Scheme pop-up menu are like items of the Rule pop-up menu.
back to Content

   Rule Sequence
Show / Edit
The Rule Sequence dialog shows the rule set of the current gragra and allows to define a rule sequence.
     Next three items deal with construction of concurrent rules built from a plain rule sequence. A plain rule sequence contains several rules only. Each rule can be applied once. The user can make such a plain rule sequence in the Rule Sequence dialog by creating only one subsequence and adding the rules into.
A concurrent construction is performed from a plain rule sequence by iterative procedure. The first two rules build the first concurrent rule. This concurrent rule and the next rule in the sequence build the next concurrent rule and so on. The last concurrent rule is the resulting rule. The application conditions (NACs, PACs, attribute conditions) of each rule of the sequence are converted to the appropriate conditions of the resulting rule. NOTE: The General (Nested) Application Conditions are not shifted (not jet implemented). Thus a concurrent construction summarizes all changes of the corresponding rule sequence into a single rule.
Make (max) Concurrent Rule jointly by Dependency
Construct a concurrent rule from the current plain rule sequence. For each two rules, the intersection of the RHS of the first and the LHS of the second rule is defined by the maximal dependency (an overlapping over nodes and edges).
Make Concurrent Rule(s) jointly by Dependency
Construct a concurrent rule from the current plain rule sequence. For each two rules, the intersection of the RHS of the first and the LHS of the second rule is defined by dependency (an overlapping over nodes and edges). In case of several overlappings, several concurrent rules can be generated.
Make Concurrent Rule jointly by Object Flow
Construct a concurrent rule from the current plain rule sequence. For each two rules, the intersection of the RHS of the first and the LHS of the second rule is specified by user defined object flow. An object flow can be set in an Object Flow dialog which is available from the Rule Sequence dialog .
Make Parallel Rule by disjoint Union
Construct a parallel rule from the current plain rule sequence. The new rule is built by the disjoint union of the corresponding graphs and morphisms of all rules. The application conditions (NACs, PACs, attribute conditions) of each rule are shifted to the resulting parallel rule.
Delete
Delete the currently selected rule sequence.
Graph Transformation by validated Rule Sequence
If selected, the graph transformation will be controlled by the currently selected rule sequence. This sequence should be valid after it is checked by Applicability of Rule Sequences check before.
Graph Transformation by defined Object Flow
If selected, the graph transformation will be performed due to object flow of the currently selected rule sequence. An object flow can be defined in an Object Flow dialog which is available from the Rule Sequence dialog . The object flow is used to set the match (partially or total) of each rule.
back to Content

   Edit Mode & Operations
The most items of this context pop-up menu are already described in Edit and Mode menus. Some additional items are explained here.
Magic Edge Draw Support
Magic Edge supports creation of an edge by foreseeing the type of its target node. Magic Edge has got different appearance. It shows whether an outgoing edge of a (source) node can be created (smiling green or quiet blue face) or not (sad red face). If the target node is not chosen by a user explicitly, it can be created automatically. This is the case when currently selected node type is an appropriate type for the target node of this edge. When a type graph is defined and enabled, the type of a target node is defined, too. If the only one target node type is defined, the target node can be created automatically. If there are several types for the target node, then the currently selected node type is taken into account. When a type graph does not exist or disabled, any edge types between two nodes are allowed. Furthermore, the target node can be created automatically, too. Magic Edge Draw Support is optional and can be disabled. It is enabled by default.
Additionally, during editing graphs the name of the currently selected node type is shown by the tool tip text. For the currently selected edge type edge:name is used.
Synchron Move of Mapped Objects
This action effects the rule editor only and allows synchronized movement of mapped nodes and edges of a rule with the aim to improve the readability of rules. Synchron Move of Mapped Objects is optional and can be enabled. It is disabled by default.
Static Node Position
This action effects the process of graph layouting. When it is selected, the positions of all already existing nodes remain unchanged during graph layouting. So only newly created nodes are placed freely. This feature is useful during "step by step" graph transformation. After each transformation step a newly created node can be moved to an adequate position and it remains there for the next steps.
Furthermore, in combination with general transformation option wait after step (and maybe also with select new objects after step) this setting can be useful also during graph transformation in interpreting mode (started by "Transform -> Start").
Layout Graph
The graph layouter behind this is a simplified form of the evolutionary layout algorithm for graph transformation sequence. When the current graph contains overlappings of nodes this layouter can help to resolve these overlappings.
Export JPEG
Convert the current graph to an JPEG image and save it into fileName.jpg.
back to Content

   Operations of Node and Edge
This context pop-up menu contains graph object specific operations which are valid only for the graph object the menu had been opened for. Some items (Attributes, Copy, Delete, Straighten, Select, Select All, Map, Unmap) are already described in menu Edit, another items are explained here.
Graph Layout > Static Position
This operation is enabled for a node only and can influence layout of the transformed graphs. In this case, the graph layouter should be enabled by selecting option perform during graph transformation of the Layouter options. Setting static position allows to stop mobility of the corresponding node. If the corresponding node belongs to a type graph, the positions of all instances of this node type become static. The position of these nodes stay constant during graph evolution over time.
Add Identic To > Rule RHS | NAC | PAC | General AC
This operation is enabled for the current graph object inside of the LHS of a rule. The corresponding identic object is an object of the RHS | NAC | PAC | General AC graph of a rule. As result of this operation, an identic object is created and mapped to its source object.
Multiplicity
This operation is enabled, if the current graph is a type graph. (See Editing Type Graph)
Set Parent
This operation is available for a type graph and a node only and gives a possibility to enrich the type graph with an inheritance relation between nodes. (See Editing Type Graph)
Unset Parent
This operation is available for a type graph and a node only and allows to remove an inheritance relation between nodes. (See Editing Type Graph)
Abstract
This operation is available for a type graph and a node only. An abstract node type may be used in rules, but it is not allowed to create an instance node of an abstract type inside of the host graph of a grammar. (See Editing Type Graph)
Textual Comments
This operation is available for nodes and edges of a type graph. A simple text editor allows to put some comments for the specified type node or type edge.
back to Content

   Type Editor

   Node Type Editor

This editor evailables to set the node type properties: name, color, shape, filled.
Additionally, three more features of a node type can be set:
   Image (.jpg, .gif) - it will be shown during graph transformation
   animated - it means some kind of node animation during graph transformation. To get an animation effect of a node of an animated node type an appropriate rule should be declared animated, too. Please note, this rule feature (see Rule Pop-up Menu) can be used with positive effect when a rule deletes and creates an outgoing edge from the same node to an other node. These source and target nodes should be preserved by this rule.
   Comment - a short description of a node type.

   Edge Type editor

This editor evailables to set the edge type properties: name, color, line style, bold.
Additionally, Comment - a short description of an edge type can be added.

back to Content