have a debug flag
[IRC.git] / Robust / src / Analysis / SSJava / BuildLattice.java
index f8b5e14ab09b3c4c911d1043c1381d0cb4311f65..754db0887ee07c6c214dbf7cc2c84c3c845b2b49 100644 (file)
@@ -64,17 +64,20 @@ public class BuildLattice {
 
     // /////////////////////////////////////////////////////////////////////////////////////
     // lattice generation for the native approach
-    BasisSet naiveBasisSet = naiveGraph.computeBasisSet(nodeSetWithCompositeLocation);
-    // debug_print(inputGraph);
 
-    Family naiveFamily = generateFamily(naiveBasisSet);
-    Map<Set<Integer>, Set<Set<Integer>>> naive_mapImSucc =
-        coveringGraph(naiveBasisSet, naiveFamily);
+    if (infer.state.SSJAVA_INFER_NAIVE_WRITEDOTS) {
+      BasisSet naiveBasisSet = naiveGraph.computeBasisSet(nodeSetWithCompositeLocation);
+
+      Family naiveFamily = generateFamily(naiveBasisSet);
+      Map<Set<Integer>, Set<Set<Integer>>> naive_mapImSucc =
+          coveringGraph(naiveBasisSet, naiveFamily);
+
+      SSJavaLattice<String> naive_lattice =
+          buildLattice(desc, naiveBasisSet, naiveGraph, null, naive_mapImSucc);
+      LocationInference.numLocationsNaive += naive_lattice.getKeySet().size();
+      infer.addNaiveLattice(desc, naive_lattice);
+    }
 
-    SSJavaLattice<String> naive_lattice =
-        buildLattice(desc, naiveBasisSet, naiveGraph, null, naive_mapImSucc);
-    LocationInference.numLocationsNaive += naive_lattice.getKeySet().size();
-    infer.addNaiveLattice(desc, naive_lattice);
     // /////////////////////////////////////////////////////////////////////////////////////
 
     // lattice generation for the proposed approach