eventVarMap[Temp] = variable
#Check and analyze capabilities for physical interaction
- AnalyzeCapabilities(Temp, appName)
+ AnalyzeCapabilities(Temp, appName, F)
Temp = GetToken(F)
-def AnalyzeCapabilities(Temp, appName):
+def AnalyzeCapabilities(Temp, appName, F):
#Illuminance related
if (Temp == "capability.switch" or
Temp == "capability.switchLevel" or
app1Capabilities.append(Temp)
else:
app2Capabilities.append(Temp)
+ if (Temp == "capability"):
+ Temp = GetToken(F) #Get '"'
+ Temp = GetToken(F) #Get 'Music'
+ Temp = Temp + GetToken(F) #Get 'Player'
+ if (Temp == "MusicPlayer"):
+ if (appName == "App1"):
+ app1Capabilities.append("capability.musicPlayer")
+ else:
+ app2Capabilities.append("capability.musicPlayer")
def AnalyzePhysicalInteraction(app1Capab, app2Capab):
#Light
writeLogList = open(jpfLogDir + "logList", "w+")
for item in appPairs:
- # Copy apps into Extractor/App1 and Extractor/App2
+ # Copy apps into Extractor/App1 and Extractor/App2
+ print "==> First app: %s" % item[0]
+ print "==> Second app: %s" % item[1]
os.system("cp " + appDir + item[0] + " Extractor/App1/App1.groovy")
os.system("cp " + appDir + item[1] + " Extractor/App2/App2.groovy")
# Run Runner.py to extract things and create main.groovy, then compile it
print "==> Compiling the apps ...\n"
os.system("make Runner")
- os.system("make main")
+ #os.system("make main")
# Call JPF
print "==> Calling JPF and generate logs ...\n"