Changing Verify.getInt() into Verify.getIntFromList().
authorrtrimana <rtrimana@uci.edu>
Wed, 16 Oct 2019 00:59:54 +0000 (17:59 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 16 Oct 2019 00:59:54 +0000 (17:59 -0700)
Extractor/ExtractorScript.py

index 0fa30ba..5f18f9f 100644 (file)
@@ -338,7 +338,13 @@ def ExtractEvents(extractedEvents):
        # Count the number of events
        numOfActualEvents = CountEvents()
        extractedEvents.write("while(true) {\n")
-       extractedEvents.write("\tdef eventNumber = Verify.getInt(0,%d)\n" % (numOfActualEvents - 1))
+       # We use Verify.getIntFromList() instead of Verify.getInt() since we want to manipulate the
+       # choices in the list/set to implement POR
+       #extractedEvents.write("\tdef eventNumber = Verify.getInt(0,%d)\n" % (numOfActualEvents - 1))
+       extractedEvents.write("\tdef eventNumber = Verify.getIntFromList(0,")
+       for x in range (1, numOfActualEvents - 1):
+               extractedEvents.write("%d," % x)
+       extractedEvents.write("%d)\n" % (numOfActualEvents - 1))
        extractedEvents.write("\tswitch(eventNumber) {\n")
        counter = 0
        indexApp1 = 0
@@ -1099,6 +1105,7 @@ def ExtractEvents(extractedEvents):
                extractedEvents.write("\n\t\t\tbreak\n")
                counter = counter + 1
        extractedEvents.write("\t}\n")
+       extractedEvents.write("\tprintln(\"\\nEVENT NUMBER: \" + eventNumber)\n");
        extractedEvents.write("}\n")
        
 def CheckIfOnlyTouchEvents():