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 1ad102977466a6eb9c3ba7dc72c4ab22348eb2be..53ba8b2f769dda648223d937591ab900749f05d3 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 8c1887355eb7724bf25fd63f72d76c514ef3037f..a599ee628055ba625fe95fe95abf30e899209523 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