Class Unifier

java.lang.Object
ca.mcscert.jpipe.operators.Unifier

public final class Unifier extends Object
Phase 4 post-processor for composition operators.

After CompositionOperator.apply(String, List, Map) returns its command list, this class inspects the element-creation commands, groups equivalent ones according to a named EquivalenceRelation looked up in a UnificationEquivalenceRegistry, and rewrites the command list so that each equivalence class is represented by a single synthesized element whose id is "unified_N" (N = 0-based counter per merged group). All original member ids are aliased to the new id via RegisterAlias commands, and AddSupport commands referencing removed ids are rewritten accordingly.

Controlled by two optional config parameters:

  • unifyBy — name of the equivalence relation to use (default: "sameLabel")
  • unifyExclude — comma-separated list of result-model element ids that must NOT participate in unification (default: empty)

If no merged groups are found the original command list is returned unchanged.