generate annotated source code again but it's still not the correct one...
[IRC.git] / Robust / src / Analysis / SSJava / SSJavaAnalysis.java
index e95766fd84714287c23a727f95d82206b1ec8190..46a22966b3fa55f5d5c45a74e5533bf62303d738 100644 (file)
@@ -133,16 +133,19 @@ public class SSJavaAnalysis {
 
   public void doCheck() {
     doMethodAnnotationCheck();
-    computeLinearTypeCheckMethodSet();
-    doLinearTypeCheck();
 
-    init();
+    if (state.SSJAVA && !state.SSJAVAINFER) {
+      computeLinearTypeCheckMethodSet();
+      doLinearTypeCheck();
+      init();
+    }
 
     if (state.SSJAVADEBUG) {
       // debug_printAnnotationRequiredSet();
     }
     if (state.SSJAVAINFER) {
       inference();
+      System.exit(0);
     } else {
       parseLocationAnnotation();
       doFlowDownCheck();
@@ -151,7 +154,7 @@ public class SSJavaAnalysis {
     }
   }
 
-  private void init() {
+  public void init() {
     // perform topological sort over the set of methods accessed by the main
     // event loop
     Set<MethodDescriptor> methodDescriptorsToAnalyze = new HashSet<MethodDescriptor>();
@@ -262,6 +265,10 @@ public class SSJavaAnalysis {
     methodAnnotationChecker = new MethodAnnotationCheck(this, state, tu);
     methodAnnotationChecker.methodAnnoatationCheck();
     methodAnnotationChecker.methodAnnoataionInheritanceCheck();
+    if (state.SSJAVAINFER) {
+      annotationRequireClassSet.add(methodContainingSSJavaLoop.getClassDesc());
+      annotationRequireSet.add(methodContainingSSJavaLoop);
+    }
     state.setAnnotationRequireSet(annotationRequireSet);
   }