package edu.uci.eecs.specCompiler.specExtraction;
import java.io.File;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
private final HashMap<String, HashSet<ConditionalInterface>> interfaceCluster;
private final HashMap<ConditionalInterface, HashSet<ConditionalInterface>> originalHBRelations;
public final HashMap<ConditionalInterface, HashSet<ConditionalInterface>> hbRelations;
+ public final ArrayList<CommutativityRule> commutativityRules;
public final HashMap<String, String> options;
public GlobalConstruct(File file, int beginLineNum,
this.originalHBRelations = new HashMap<ConditionalInterface, HashSet<ConditionalInterface>>();
this.hbRelations = new HashMap<ConditionalInterface, HashSet<ConditionalInterface>>();
this.options = options;
+ this.commutativityRules = new ArrayList<CommutativityRule>();
}
public void addInterface2Cluster(String clusterName,
HashSet<ConditionalInterface> set = originalHBRelations.get(left);
set.add(right);
}
+
+ public void addCommutativityRule(String method1, String method2, String condition) {
+ CommutativityRule rule = new CommutativityRule(method1, method2, condition);
+ if (!commutativityRules.contains(rule)) {
+ commutativityRules.add(rule);
+ }
+ }
private void addUnfoldedHBCondition(ConditionalInterface left,
ConditionalInterface right) {