Limiting iteration for now (DFSearch strategy would just go deep unceasingly); Comple...
[smartthings-infrastructure.git] / ModelCheck.py
index 145bd22857eb59633178bc73938c51dfbc580c3e..82c6adffeffe847fe202635448f8659031b161db 100644 (file)
@@ -24,7 +24,8 @@ appList2 = []
 # Extract the first list
 extractAppList = open(firstList, "r")
 for app in extractAppList:
-       appList1.append(app.strip())
+       if '#' not in app:
+               appList1.append(app.strip())
 extractAppList.close()
 
 # Try to create pairs
@@ -34,7 +35,8 @@ if (len(sys.argv) == 6):
        secondList = sys.argv[5]
        extractAppList = open(secondList, "r")
        for app in extractAppList:
-               appList2.append(app.strip())
+               if '#' not in app:
+                       appList2.append(app.strip())
        extractAppList.close()
 # Just copy the first list to the second list
 else:
@@ -47,7 +49,10 @@ for i in range(len(appList1)):
 
 # PART 2: 
 print "PHASE 2: Running JPF ...\n"
+# List down all the log file names
+writeLogList = open(jpfLogDir + "logList", "w+")
 for item in appPairs:
+
        # Copy apps into Extractor/App1 and Extractor/App2      
        os.system("cp " + appDir + item[0] + " Extractor/App1/App1.groovy")
        os.system("cp " + appDir + item[1] + " Extractor/App2/App2.groovy")
@@ -59,4 +64,8 @@ for item in appPairs:
        
        # Call JPF
        print "==> Calling JPF and generate logs ...\n"
-       os.system("cd " + jpfDir + ";./run.sh " + jpfLogDir + item[0] + "--" + item[1] + ".log" + " main.jpf")
+       logName = jpfLogDir + item[0] + "--" + item[1] + ".log"
+       writeLogList.write(logName + "\n")
+       os.system("cd " + jpfDir + ";./run.sh " + logName + " main.jpf")
+       
+writeLogList.close()