From ba967f3b5a8c1749ba27555620b879930e8bbe92 Mon Sep 17 00:00:00 2001 From: rtrimana Date: Fri, 26 Jul 2019 16:30:39 -0700 Subject: [PATCH] Completing model-checking automation script to process 2 different lists. --- ModelCheck.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ModelCheck.py b/ModelCheck.py index 82c6adf..6defff6 100644 --- a/ModelCheck.py +++ b/ModelCheck.py @@ -30,6 +30,7 @@ extractAppList.close() # Try to create pairs appPairs = [] +useSecondList = False # Extract the second list if provided (this is for combinations between two lists) if (len(sys.argv) == 6): secondList = sys.argv[5] @@ -38,15 +39,22 @@ if (len(sys.argv) == 6): if '#' not in app: appList2.append(app.strip()) extractAppList.close() + useSecondList = True # Just copy the first list to the second list else: appList2 = appList1 -# Generate the permutations of pairs -for i in range(len(appList1)): - for j in range(i + 1, len(appList2)): - appPairs.append((appList1[i], appList2[j])) - +if useSecondList is False: + # Generate the permutations of pairs + for i in range(len(appList1)): + for j in range(i + 1, len(appList2)): + appPairs.append((appList1[i], appList2[j])) +else: + # Generate pairs from 2 lists + for i in range(len(appList1)): + for j in range(len(appList2)): + appPairs.append((appList1[i], appList2[j])) + # PART 2: print "PHASE 2: Running JPF ...\n" # List down all the log file names -- 2.34.1