From c220012cd36640912fb4e21e91fd1db800955287 Mon Sep 17 00:00:00 2001 From: jjenista Date: Tue, 17 Jan 2012 23:24:05 +0000 Subject: [PATCH] predicates are not feasible to flip on and off. The entire splicing mechanism for interprocedural analysis uses predicates of callee elements to match fuse points in the caller context. This is critical because all the caller context heap references and variables out of the callee context can commonly reference different nodes after callee analysis. When you remove predicates and bring the entire callee context into the caller, the current system *correctly* has no fuse points for the callee elements and wouldn't reference them. --- .../src/Analysis/Disjoint/DisjointAnalysis.java | 3 ++- Robust/src/Analysis/Disjoint/ExistPredSet.java | 15 +++++++++++++++ Robust/src/Analysis/Disjoint/ReachGraph.java | 2 +- Robust/src/Benchmarks/oooJava/master-makefile | 6 +++--- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java index baa21e2e..0913d4fb 100644 --- a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java +++ b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java @@ -876,7 +876,8 @@ public class DisjointAnalysis implements HeapAnalysis { } if( !state.DISJOINT_USE_PREDICATES ) { - ReachGraph.DISABLE_PREDICATES = true; + ReachGraph.DISABLE_PREDICATES = true; + ExistPredSet.DISABLE_PREDICATES = true; } if( state.DISJOINT_SUMMARIZE_PER_CLASS ) { diff --git a/Robust/src/Analysis/Disjoint/ExistPredSet.java b/Robust/src/Analysis/Disjoint/ExistPredSet.java index 76cb5182..c45535a9 100644 --- a/Robust/src/Analysis/Disjoint/ExistPredSet.java +++ b/Robust/src/Analysis/Disjoint/ExistPredSet.java @@ -29,6 +29,8 @@ import java.io.*; public class ExistPredSet extends Canonical { + protected static boolean DISABLE_PREDICATES = false; + protected Set preds; public static boolean debug = false; @@ -63,6 +65,19 @@ public class ExistPredSet extends Canonical { Set calleeReachableNodes, Set callerSrcMatches ) { + // jjenista 1/17/2012 + // + // this does not work to disable predicates, in fact the whole + // interprocedural context mapping system is built on predicates + // because edges and nodes that get renamed in the callee context + // have to be spliced back into the caller context, and the + // elements that cross the boundry are fused by matching + // predicates of callee elements to caller elements. + // + //if( DISABLE_PREDICATES ) { + // return ReachGraph.predsTrue; + //} + ExistPredSet predsOut = null; Iterator predItr = preds.iterator(); diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index c077b438..9a327eeb 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -2757,7 +2757,7 @@ public class ReachGraph { AllocSite as = hrnCallee.getAllocSite(); allocSites.add(as); - + Integer hrnIDshadow = as.getShadowIDfromID(hrnCallee.getID() ); HeapRegionNode hrnCaller = id2hrn.get(hrnIDshadow); diff --git a/Robust/src/Benchmarks/oooJava/master-makefile b/Robust/src/Benchmarks/oooJava/master-makefile index 85f3d089..54e60989 100644 --- a/Robust/src/Benchmarks/oooJava/master-makefile +++ b/Robust/src/Benchmarks/oooJava/master-makefile @@ -77,13 +77,13 @@ DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint- # EX: (skip first 10 visits, capture the next 3, then halt) # -disjoint-debug-snap-method Remove 10 3 true -DISJOINTDEBUG= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) \ - -disjoint-summarize-per-class +DISJOINTDEBUG= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) +# -disjoint-disable-predicates \ +# -disjoint-summarize-per-class # -disjoint-write-dots final # -do-definite-reach-analysis \ # -disjoint-disable-global-sweep \ # -disjoint-disable-strong-update \ -# -disjoint-disable-predicates \ # -disjoint-debug-scheduling # -disjoint-debug-callsite Barneshut.Insert Barneshut.run 50 500 true # -disjoint-debug-snap-method ArrayIndexedGraph.createNode 1 100 true \ -- 2.34.1