back to Content This menu describes how to manipulate graph objects.
New
GraGraCreate 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
XMIImport an OMONDO .ecore diagram. Close GraGra Close the selected grammar. AGG View
to JPEGConvert 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 node of the grammar tree.
back to Content This menu allows to set the mode of actions of the AGG grammar editor.
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 you can get a fast 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 the 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 visible. Paste To place selected and copied graph object(s) into another graph.
For that aim:
- select the graph objects,
- click on Copy icon,
- choose the favoured 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. Identic Rule An isomorphic 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 mapping of the objects is indicated by the same number. Identic NAC An isomorphic NAC morphism is created by copying the left-hand side graph of the rule to a NAC. The previous contents of the NAC is deleted. The mapping of one object to another is indicated by the same number. Identic PAC An isomorphic PAC morphism is created by copying the left-hand side graph of the rule to a PAC. The previous contents of the PAC is deleted. The mapping of the objects 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 This menu allows to perform an in-place graph transformation. Additionally, in AGG implemented graph transformation algorithms are presented here in very short form.
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 of the edge 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. Clicking at a selected object, it is deselected. 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 / 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 labelled 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 / 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 The AGG graph parser is able to check, if a given graph belongs to a certain graph language determined by a graph grammar.
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 is graph 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 );
}
Another 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 deterministical 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
Comp-
letionFind 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
StepUndo transformation step. This operation is available after running transformation has finished.
back to Content Analyzer Critical Pair Analysis (CPA) allows to compute all potentially conflicting rule pairs.
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 GUI.
back to Content 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.
Reset Set the current selected grammar to the grammar of 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.Generate > Conflicts Change to CPA GUI, if it is not already done, and generate parallel conflicts of rule pairs. Dependencies Change to 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 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.
A combination of Debug and Save allows to save subsets of critical pairs.Load > In This
WindowLoad critical pairs in main window. In New
WindowLoad critical pairs in a new window. Show > Conflicts Show conflicts table. Dependencies Show dependencies table. CPA Graph Show a relation graph based on computed conflict and dependency pairs. Check Host Graph Check which of the critical rules are applicable to a concrete input (host) graph. Only parallel conflicts can be checked. back Return to main GUI.
back to Content Termination of LGTS
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 again.
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).back to Content Preferences
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:
The termination criteria (2) and (3) are defined for typed graph transformation with injective rules, injective matches and injective negative application conditions (NACs).
(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 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.
Options... for graph matching and transformation, graph layouter, graph parser, critical pair analysis Generalback to ContentFollowing options should be used to direct the matching process.back to Content Transformation
Match completion strategyCSP (Constraint Satisfaction Problem) is used as solution algorithm for the graph matching.Match conditions
CSP w/o BJ A simplified variant of CSPinjective / non-injectiveThe following options can be used for each kind of graph transformation. (See Transformation options)
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.
Consistency check during transformation
It allows to decide how graph consistency constraints should influence the transformation process:consistent transformations onlyRule applicability on the host graph
stop after inconsistent transformation
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.Current AGG application provides four algorithms for graph transformation:back to Content A new graph layout algorithm "Evolutionary Layout of Graph Transformation Sequences" for transformed graphs is integrated into AGG.
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. A transformation rule sequence is a control structure which defines an ordered set of rule subsequences and rule iterations. The user defined sequences are applied in given order one after the other. The rules of a sequence are applied in given order one after the other, too. How often a rule should be applied is given by its iteration number.
(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.
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.The settings for graph transformation by rule sequences are provided by a separate dialog that appears after the button Define is pressed.
Transformation by rule sequences is a possibility in AGG to apply rules quasi deterministically.
A transformation rule sequence is a control structure which defines an ordered set of rule subsequences and rule iterations.
The dialog allows to define rule subsequences in order to be applied. It combines three tables and a textual view of the defined subsequences where each line shows one rule subsequence.
The first table contains the rules of the currently selected grammar.
The second table shows the rule subsequences.
You can create a new empty subsequence using button New Subsequence. The subsequences are ordered by its position in the table. The order can be changed by pressing and dragging the middle mouse button.
The third table shows the rules of a subsequence. By selecting one or more rules in the first table and clicking on the button Add it can be put into the currently selected subsequence. The rule order of the third table can be changed by pressing and dragging the middle mouse button.
The Iterations field of the second and third tables can be used to set a number of how long a rule subsequence or a single rule shoud be applied. The star ( * ) is allowed, too, and means "as long as possible".
The options for the graph layouter include:back to Content
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.The options for parsing include:back to Content Critical Pairs
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 Analysislayered
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.
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.The options for critical pair analysis include:
Select the kind of critical pairs to compute
conflictslayered
The implemented algorithm detects parallel conflicts between rule applications
dependencies
The implemented algorithm detects sequential dependencies between rule applications
Please note: The rule layers defined before are used for critical pair analysis and parsing. 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.
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.
Display Settings
They allows to set the number of displayed critical pairs and initial window size of overlapping graphs.
back to Content Type Graph
New > Type
GraphCreate 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. Atomic
ConstraintCreate 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. When the host graph is checked, the variables will get value TRUE or FALSE : The host graph satisfies a consistency condition, if the result value of the formula is TRUE. To edit a constraint, please use its 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
LayerA table of rules appears to set a layer of each rule. These layers will be used during layered graph transformation. Select Rule
Layer for
ConstraintA table of consistency condition (formula) layers appears to set a layer of each formula. These layers will be used during layered graph transformation. A consistency condition has to be satisfied on its layer only. Set Trigger
Rule for
LayerFor each layer one rule may be determined as trigger for this layer. The so-called trigger rule is applied as first 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 LayerThe rules will be sorted according the layers. Sort
Constraints
by LayerThe constraints will be sorted according the layers. Disable
Rule LayerAll rules of a selected layer will be disabled. Priority > Set Rule
PriorityA 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
ConstraintA table of consistency conditions (formulae) appears to select priority of 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 PriorityThe rules will be sorted according priorities. Sort
Constraints
by PriorityThe 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
AtomicsCheck if atomic graphical consistency constraints are valid. An GCC is valid, if it is a total injective morphism. Check
ConstraintsCheck if the work graph satisfies the consistency conditions. Create Post
ConditionsTransform global consistency conditions into post-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. Import > GGX Import grammar components in AGG own format. GXL Import a graph in GXL format. OMONDO
XMIImport an OMONDO .ecore diagram. Reset Graph Only host graph of currently selected grammar is loaded again. Reload Currently selected grammar is loaded again. Textual Comments A small text editor allows to put some comments to the specified grammar.
This menu describes the behavior of the type graph check and defines how the type graph is used.back to Content Rule
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 with 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 may are typed above types defined in the type set of the grammar. Textual Comments A small text editor allows to put some comments to the specified type graph. If the type graph check is set, the defined 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 host graph of a grammar, only setting attribute values of nodes and edges is not allowed.
The multiplicity of a node type can be set in the multiplicity dialog which appears after selecting item Multiplicity from the context pop-up menu of nodes. Setting multiplicity of an edge type is similar to a 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. An abstract node type may be used in rules, but it is not allowed to create an instance node of it inside of the host graph of a grammar.
Please note: The multiplicity of the parent type also has an effect to the number of instances of child types in a graph. Since all instances of the child types can be seen as instances of a parent type, the sum of all instances of all child types is limited by the multiplicity of this parent type. Similiar for edges that are inherited from a parent node, the overall number of incoming / outgoing edges is limited by the multiplicity of the edge type connected to the parent node type.
This pop-up menu describes all possible operations of a rule.back to Content Edit Mode & Operations
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 ConditionsPost 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 ConditionsDelete 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 using Import > GGX of the menu File or gragra pop-up menu.Delete Delete this rule. disabled Disable this rule. Such disabled rule is not taken in account during graph transformation. Textual Comments A small text editor allows to put some comments to the specified rule.
The most items of this context pop-up menu are already described in Edit and Mode menus. Some additional items are explained here.back to Content Operations of Node and Edge
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.
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.back to Content
Graph Layout >
Static
PositionThis 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
PACThis operation is enabled, if the current graph object is an object of the LHS of a rule. A corresponding identic object can be an object in the RHS of a rule or in the target graph of a NAC or in the target graph of a PAC of a rule. As result, an identic object is created and mapped to the 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 a type graph. A small text editor allows to put some comments to the specified node or edge type.