}
*/
+ //System.out.println( " mapping "+fm+" into "+mc );
+
+
String debugCaller = "foo";
String debugCallee = "bar";
+ //String debugCaller = "process";
+ //String debugCallee = "createfoo";
if( mc.getDescriptor().getSymbol().equals( debugCaller ) &&
fm.getMethod().getSymbol().equals( debugCallee ) ) {
// if there is a secondary node, compute the rest of the rewrite rules
+
+
+ if( mc.getDescriptor().getSymbol().equals( debugCaller ) &&
+ fm.getMethod().getSymbol().equals( debugCallee ) ) {
+ System.out.println( "*** does param "+paramIndex+ " have a gamma region? "+
+ ogCallee.paramIndex2idSecondary.containsKey( paramIndex ) );
+ }
+
+
if( ogCallee.paramIndex2idSecondary.containsKey( paramIndex ) ) {
// setup H (secondary)
assert hrnSecondary != null;
paramIndex2rewriteH_s.put( paramIndex, toShadowTokens( ogCallee, hrnSecondary.getAlpha() ) );
+
+
+ if( mc.getDescriptor().getSymbol().equals( debugCaller ) &&
+ fm.getMethod().getSymbol().equals( debugCallee ) ) {
+ System.out.println( "H_s["+paramIndex+"] gets "+toShadowTokens( ogCallee, hrnSecondary.getAlpha() ) );
+ System.out.println( "*** H_s="+paramIndex2rewriteH_s );
+ }
+
+
+
+
// setup J (secondary->X)
Iterator<ReferenceEdge> s2xItr = hrnSecondary.iteratorToReferencees();
while( s2xItr.hasNext() ) {
// this heap region is definitely an "r_i" or secondary by virtue of being in r
HeapRegionNode hrn = hrnItr.next();
+
+
+ if( mc.getDescriptor().getSymbol().equals( debugCaller ) &&
+ fm.getMethod().getSymbol().equals( debugCallee ) ) {
+ System.out.println( "*** H_s has rules for rewriting "+hrn+" with respect to param "+index+"? "+
+ paramIndex2rewriteH_s.contains( index )+"***" );
+ System.out.println( "*** H_s="+paramIndex2rewriteH_s );
+ }
+
- if( paramIndex2rewriteH_s.contains( index ) ) {
+ if( paramIndex2rewriteH_s.containsKey( index ) ) {
tokens2states.clear();
tokens2states.put( p_i, new ReachabilitySet().makeCanonical() );
ReferenceEdge edge = (ReferenceEdge) mo.get( 0 );
Integer indexJ = (Integer) mo.get( 1 );
- if( !paramIndex2rewriteJ_p2p.contains( makeMapKey( index,
+ if( !paramIndex2rewriteJ_p2p.containsKey( makeMapKey( index,
indexJ,
edge.getField() ) ) ) {
continue;
ReferenceEdge edge = (ReferenceEdge) mo.get( 0 );
Integer indexJ = (Integer) mo.get( 1 );
- if( !paramIndex2rewriteJ_p2s.contains( makeMapKey( index,
- edge.getField() ) ) ) {
+ if( !paramIndex2rewriteJ_p2s.containsKey( makeMapKey( index,
+ edge.getField() ) ) ) {
continue;
}
ReferenceEdge edge = (ReferenceEdge) mo.get( 0 );
Integer indexJ = (Integer) mo.get( 1 );
- if( !paramIndex2rewriteJ_s2p.contains( index ) ) {
+ if( !paramIndex2rewriteJ_s2p.containsKey( index ) ) {
continue;
}
ReferenceEdge edge = (ReferenceEdge) mo.get( 0 );
Integer indexJ = (Integer) mo.get( 1 );
- if( !paramIndex2rewriteJ_s2s.contains( index ) ) {
+ if( !paramIndex2rewriteJ_s2s.containsKey( index ) ) {
continue;
}
ReferenceEdge edge = (ReferenceEdge) mo.get( 0 );
Integer indexJ = (Integer) mo.get( 1 );
- if( !paramIndex2rewriteK_s.contains( index ) ) {
+ if( !paramIndex2rewriteK_s.containsKey( index ) ) {
continue;
}
// make the edge with src and dst so beta info is
// calculated once, then copy it for each new edge in caller
+
ReferenceEdge edgeNewInCallerTemplate = new ReferenceEdge( null,
null,
edgeCallee.getType(),
writeGraph( "debug9endResolveCall", true, true, true, false, false );
} catch( IOException e ) {}
System.out.println( " "+mc+" done calling "+fm );
+ System.exit( -1 );
}
System.out.println( " End mapping proc" );
}
*/
+ //System.out.println( " End mapping proc" );
}