Fixing a bug in ExtractorScript.py: missing a check if there is no event for App1.
authorrtrimana <rtrimana@uci.edu>
Fri, 9 Aug 2019 06:44:49 +0000 (23:44 -0700)
committerrtrimana <rtrimana@uci.edu>
Fri, 9 Aug 2019 06:44:49 +0000 (23:44 -0700)
Extractor/ExtractorScript.py
run.sh

index 1ad1029..53ba8b2 100644 (file)
@@ -334,8 +334,12 @@ def ExtractEvents(extractedEvents):
        #print "DEBUG: App1: %d" % indexApp1
        #print "DEBUG: App2: %d" % indexApp2
        #print "DEBUG: eventList: %d" % len(eventList)
+       #print eventAppList
        #print eventList
-       isApp1 = True
+       if indexApp2Start > 0:
+               isApp1 = True
+       else:
+               isApp1 = False
        while counter < numOfActualEvents:
                # Interleave events from App1 and App2
                if isApp1 is True:
@@ -646,7 +650,6 @@ def ExtractEvents(extractedEvents):
                                extractedEvents.write(line)
                        event.close()
                elif eventList[i] == "switch":
-                        
                        #Check which capability
                        variable = eventVarMap[eventList[i]]
                        if eventList[i] not in eventVarCounterMap.keys():
diff --git a/run.sh b/run.sh
index 8c18873..a599ee6 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -2,12 +2,13 @@
 
 # Device conflict
 #python ModelCheck.py ../jpf-core/ ../logs/valves/ ../smartapps/ appLists/device-interaction/valvesAppList appLists/device-interaction/valvesAppList2
+python ModelCheck.py ../jpf-core/ ../logs/switches/ ../smartapps/ appLists/device-interaction/switchesAppList appLists/device-interaction/switchesAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/acfanheaterSwitches/ ../smartapps/ appLists/device-interaction/acfanheaterSwitchesAppList appLists/device-interaction/acfanheaterSwitchesAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/cameraSwitches/ ../smartapps/ appLists/device-interaction/cameraSwitchesAppList appLists/device-interaction/cameraSwitchesAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/ventfanSwitches/ ../smartapps/ appLists/device-interaction/ventfanSwitchesAppList appLists/device-interaction/ventfanSwitchesAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/speeches/ ../smartapps/ appLists/device-interaction/speechesAppList appLists/device-interaction/speechesAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/nonHueLights/ ../smartapps/ appLists/device-interaction/nonHueLightsAppList appLists/device-interaction/nonHueLightsAppList2
-#python ModelCheck.py ../jpf-core/ ../logs/hueLights/ ../smartapps/ appLists/device-interaction/hueLightsAppList
+#python ModelCheck.py ../jpf-core/ ../logs/hueLights/ ../smartapps/ appLists/device-interaction/hueLightsAppList appLists/device-interaction/hueLightsAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/thermostats/ ../smartapps/ appLists/device-interaction/thermostatsAppList appLists/device-interaction/thermostatsAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/alarms/ ../smartapps/ appLists/device-interaction/alarmsAppList appLists/device-interaction/alarmsAppList2
 #python ModelCheck.py ../jpf-core/ ../logs/locks/ ../smartapps/ appLists/device-interaction/locksAppList appLists/device-interaction/locksAppList2
@@ -22,4 +23,4 @@
 #python ModelCheck.py ../jpf-core/ ../logs/ ../smartapps/ appLists/physical-interaction/watersensorAppList appLists/physical-interaction/watervalveAppList
 
 # Global variable conflict
-python ModelCheck.py ../jpf-core/ ../logs/globalStateVariables/ ../smartapps/ appLists/global-state-variable-interaction/globalstatevariableAppList appLists/global-state-variable-interaction/globalstatevariableAppList2
+#python ModelCheck.py ../jpf-core/ ../logs/globalStateVariables/ ../smartapps/ appLists/global-state-variable-interaction/globalstatevariableAppList appLists/global-state-variable-interaction/globalstatevariableAppList2