X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=ModelCheck.py;h=b47a095aa3c53ca3e7c5027962063146984fbdb0;hb=b8d2107a7b906dd2784ab745c2c2d9e2d52a67cc;hp=601323e0f9012dd5251d395a412c42a05a8238d6;hpb=01bc90033a262dfb036f903975105398ba90b673;p=smartthings-infrastructure.git diff --git a/ModelCheck.py b/ModelCheck.py index 601323e..b47a095 100644 --- a/ModelCheck.py +++ b/ModelCheck.py @@ -52,8 +52,11 @@ if useSecondList is False: else: # Generate pairs from 2 lists for i in range(len(appList1)): - for j in range(len(appList2)): - appPairs.append((appList1[i], appList2[j])) + for j in range(len(appList2)): + # Skip if both are the same + if appList1[i] == appList2[j]: + continue + appPairs.append((appList1[i], appList2[j])) # PART 2: print "PHASE 2: Running JPF ...\n" @@ -63,7 +66,7 @@ for item in appPairs: # Copy apps into Extractor/App1 and Extractor/App2 print "==> First app: %s" % item[0] - print "==> Second app: %s" % item[1] + print "==> Second app: %s" % item[1] os.system("cp " + appDir + item[0] + " Extractor/App1/App1.groovy") os.system("cp " + appDir + item[1] + " Extractor/App2/App2.groovy") @@ -76,6 +79,6 @@ for item in appPairs: print "==> Calling JPF and generate logs ...\n" logName = jpfLogDir + item[0] + "--" + item[1] + ".log" writeLogList.write(logName + "\n") - os.system("cd " + jpfDir + ";./run.sh " + logName + " main.jpf") + #os.system("cd " + jpfDir + ";./run.sh " + logName + " main.jpf") writeLogList.close()