From 8f8e183d3c0c35aaa27f3a1ed8a7ad91ab96da94 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 5 Feb 2009 00:35:57 +0000 Subject: [PATCH] eliminate null disjoint tags when printing and use proper method for getting the program's main method --- .../src/Analysis/OwnershipAnalysis/AllocationSite.java | 6 +++++- .../Analysis/OwnershipAnalysis/OwnershipAnalysis.java | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java b/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java index 9ccece7b..c53c7285 100644 --- a/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java +++ b/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java @@ -184,6 +184,10 @@ public class AllocationSite { } public String toStringForDOT() { - return "disjoint "+disjointId+"\\n"+toString()+"\\n"+getType(); + if( disjointId != null ) { + return "disjoint "+disjointId+"\\n"+toString()+"\\n"+getType(); + } else { + return toString()+"\\n"+getType(); + } } } diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java index 850445b8..ed7fa219 100644 --- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java +++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java @@ -294,11 +294,10 @@ public class OwnershipAnalysis { } else { // we are not in task mode, just normal Java, so start with // the main method - - // get all classes, get all methods, look for static main, then stop? - - // YOU CAN DEFINE MORE THAN ONE MAIN!!!! + Descriptor d = tu.getMain(); + scheduleAllCallees(d); + /* Iterator classItr = state.getClassSymbolTable().getDescriptorsIterator(); while( classItr.hasNext() ) { ClassDescriptor cd = (ClassDescriptor) classItr.next(); @@ -312,7 +311,7 @@ public class OwnershipAnalysis { } } } - + */ } -- 2.34.1