org.eclipse.emf.henshin.model.util
Class HenshinModelCleaner

java.lang.Object
  extended by org.eclipse.emf.henshin.model.util.HenshinModelCleaner

public class HenshinModelCleaner
extends Object

Utilities methods for cleaning Henshin models.


Constructor Summary
HenshinModelCleaner()
           
 
Method Summary
static Formula cleanFormula(Formula formula)
          Recursively clean a formula.
static void cleanGraph(Graph graph)
          Clean a graph.
static void cleanMappingList(MappingList mappings, Graph... graphs)
          Clean a mapping list.
static void cleanModule(Module module)
          Clean a module.
static void cleanNestedCondition(NestedCondition condition)
          Clean a nested condition.
static void cleanParameterMappings(Unit unit)
          Clean the parameter mappings of a unit.
static void cleanRule(Rule rule)
          Clean a rule.
static Unit cleanUnit(Unit unit)
          Clean a transformation unit.
static void completeMultiRules(Module module)
          Complete all multi-rules in a module.
static void completeMultiRules(Rule rule)
          Complete a multi-rule and all its directly and indirectly contained multi-rules.
static void synchronizeRuleParameters(Rule rule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HenshinModelCleaner

public HenshinModelCleaner()
Method Detail

cleanModule

public static void cleanModule(Module module)
Clean a module. This cleans all rules and transformation units inside of the module.

Parameters:
module - Module to be cleaned.

cleanUnit

public static Unit cleanUnit(Unit unit)
Clean a transformation unit.

Parameters:
unit - Unit to be cleaned.

cleanRule

public static void cleanRule(Rule rule)
Clean a rule. This cleans all graphs and multi-rules in the rule including their mappings, formulas etc.

Parameters:
rule - Rule to be cleaned.

cleanGraph

public static void cleanGraph(Graph graph)
Clean a graph. This cleans the contents of the graph and its formula. It removes invalid nodes and edges and tries to simplify the formula is that is possible.

Parameters:
graph - Graph to be cleaned.

cleanFormula

public static Formula cleanFormula(Formula formula)
Recursively clean a formula. Cleans all nested conditions and tries to simplify the formula.

Parameters:
formula - Formula to be cleaned.
Returns:
The cleaned formula (can be null).

cleanNestedCondition

public static void cleanNestedCondition(NestedCondition condition)
Clean a nested condition. This clean the conclusion graph and the mappings.

Parameters:
condition - Nested condition to be cleaned.

cleanMappingList

public static void cleanMappingList(MappingList mappings,
                                    Graph... graphs)
Clean a mapping list. Removes invalid mappings.

Parameters:
mappings - Mapping list to be cleaned.
signatures - Signatures of the functions that the mapping list stands for.

cleanParameterMappings

public static void cleanParameterMappings(Unit unit)
Clean the parameter mappings of a unit. This removes all invalid parameter mappings.

Parameters:
unit - The unit to be cleaned.

completeMultiRules

public static void completeMultiRules(Module module)
Complete all multi-rules in a module. This invokes completeMultiRules(Rule) on all rules directly or indirectly contained by the argument module.

Parameters:
module - A module.

completeMultiRules

public static void completeMultiRules(Rule rule)
Complete a multi-rule and all its directly and indirectly contained multi-rules. This method can be used to ensure that the multi-mappings are complete.

Parameters:
rule - Rule to be completed.

synchronizeRuleParameters

public static void synchronizeRuleParameters(Rule rule)