From: rtrimana Date: Mon, 2 Mar 2020 22:14:55 +0000 (-0800) Subject: Fixing a bug in LocationVar.groovy: to get the string value during analysis we need... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bd5fec66c5798433b7a83f557d95409e5cafce9c;p=smartthings-infrastructure.git Fixing a bug in LocationVar.groovy: to get the string value during analysis we need to explicitly declare this as String, not def; Removing the manual transaction analysis from ExtractorScript.py since we already have this in the JPF ConflictTracker.java analysis. --- diff --git a/Extractor/ExtractorScript.py b/Extractor/ExtractorScript.py index e2aa123..725f267 100644 --- a/Extractor/ExtractorScript.py +++ b/Extractor/ExtractorScript.py @@ -1147,6 +1147,8 @@ def ExtractEvents(extractedEvents): def CheckIfOnlyTouchEvents(): #Check and throw an error if it is all touch events #This is called Direct-Direct interaction and we do not model-check for this case + # TODO: Commenting out this code since we do this in the analysis itself + ''' onlyTouchEvents = True for item in eventList: if item != "nfcTouch" and item != "app" and item != "button": @@ -1157,6 +1159,7 @@ def CheckIfOnlyTouchEvents(): extractError.write("Direct-Direct Interaction detected: we are skipping this pair...\n") extractError.close() raise Exception("\n\nDirect-Direct Interaction detected: we are skipping this pair...\n\n") + ''' #Extract objects to call functions from App1 diff --git a/Location/LocationVar.groovy b/Location/LocationVar.groovy index 3f5e46e..c6b2c8b 100755 --- a/Location/LocationVar.groovy +++ b/Location/LocationVar.groovy @@ -51,7 +51,7 @@ class LocationVar { //By Model Checker def setValue(LinkedHashMap eventDataMap) { if (this.mode != eventDataMap['value']) { - def sentMode = eventDataMap['value'] + String sentMode = eventDataMap['value'] println("The location is changed to $sentMode!") this.mode = sentMode this.locationMode = sentMode