def setID(self): self.uuid = str(uuid.uuid4()) ObjDatabaseValueTracker.set_QAStateUUID_mostRecentBeingComputed( self.uuid) # In a lot of ways, this is # not ideal to set like this, since multiple states could and will exist in use at any particular time # (for example of a pair of such states: prior state and state being computed) return
def recordBoxStats(listOfBoxes, phaseLabel): requires(isinstance(phaseLabel, str)) requires(len(phaseLabel) > 0) requires(isinstance(listOfBoxes, list)) requires(all([isProperBox(x) for x in listOfBoxes])) labelForThisPhaseInQuestionAnswering = "Question_DomainOfVariablesInResponce:" + phaseLabel #V~~VV~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V~V # Below is largely copied from descriptionState.py # TODO: add this sort of code as a funtion in the utils to call upon.... #========================================================================= generalSummaryFunctionsAndLabelsForThem = [\ ( (lambda A : np.prod(np.diff(A, axis=1)) ), "bvolume"), \ ( (lambda A : np.min(np.diff(A, axis=1)) ), "bminSideLength"), \ ( (lambda A : np.max(np.diff(A, axis=1)) ), "bmaxSideLength"), \ ( (lambda A : np.sum(np.diff(A, axis=1)) ), "bsumSideLengths"), \ ] for thisFunctAndLabel in generalSummaryFunctionsAndLabelsForThem: theseValues = [thisFunctAndLabel[0](x) for x in listOfBoxes] resultValue = distributionStatics(theseValues) specificLabel = labelForThisPhaseInQuestionAnswering + ":" + thisFunctAndLabel[ 1] for thisKey in resultValue: commandToExecute = \ "INSERT INTO QAStateValues ( QAStateUUID , fieldName, fieldValue) VALUES ('" + \ ObjDatabaseValueTracker.get_QAStateUUID_mostRecentBeingComputed() + "', '" + (specificLabel + ":" + thisKey) + "', ? );" objDatabaseInterface.interfaceBleed_insertValuesForBlob(\ commandToExecute, [resultValue[thisKey]] ) objDatabaseInterface.commit() #^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^_^ return
def recordStateShown(stateToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires(isinstance(stateToRecord, DescriptionState)) executeDatabaseCommandList([ "UPDATE questionInstance_QAState_relation SET dateAndTimeAnswerShown = CURRENT_TIMESTAMP WHERE " + \ " answerIndex = " + str(indexIntoQA) + " and " + \ " questionInstanceUUID = '" + str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "';" ]) return
def recordOperatorComputationFinished(operatorToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires(isinstance(operatorToRecord, DescriptionOperator)) executeDatabaseCommandList([ "UPDATE questionInstance_QAOperator_relation SET dateAndTimeComputationFinished = CURRENT_TIMESTAMP WHERE " + \ " startingAnswerIndex = " + str(indexIntoQA) + " and " + \ " questionInstanceUUID = '" + str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "';" ]) return
def recordOperatorGeneral(operatorToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires(isinstance(operatorToRecord, DescriptionOperator)) executeDatabaseCommandList([ "INSERT INTO questionInstance_QAOperator_relation (questionInstanceUUID, startingAnswerIndex, QAOperatorUUID)" +\ "VALUES ('" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "', " + \ str(indexIntoQA) + ", '" + \ str(operatorToRecord.getID()) + "');" ]) return
def recordOpSelectorManagerComputationFinished(selectorManagerToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires( isinstance(type(selectorManagerToRecord), SelectorManagerBase) or isinstance(selectorManagerToRecord, SelectorManagerBase)) executeDatabaseCommandList([ "UPDATE questionInstance_OpSelectorManager_relation SET dateAndTimeComputationFinished = CURRENT_TIMESTAMP WHERE " + \ " startingAnswerIndex = " + str(indexIntoQA) + " and " + \ " questionInstanceUUID = '" + str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "';" ]) return
def preloop(self): availableDomains = getAvailableDomains(); userResponce = promptToSelectFromList([x.getName() for x in availableDomains], "the domain to use"); integerDomainSelection = userResponce[1]; s = z3.Solver(); self.domainInformation = availableDomains[integerDomainSelection](s); print("Enter path to the neural-net weights to use. Spaces in the path name will be ignored.", flush=True); thisLineMissingNewLine = readInLineAllowingForPathCompletion(); pathToWeights = os.path.realpath(thisLineMissingNewLine.replace(" ", "")); assert(isinstance(pathToWeights, str)); assert("\n" not in pathToWeights); if(not os.path.isfile(pathToWeights)): raise Exception("Path not found: " + str(pathToWeights)); # userUUID is NULL for now, and the time started is set by default. The end-time will be set later.... randomSeeds = {"randomSeedForNumpy" : config.randomSeedForNumpy, "randomSeedForPython3LibRandom": config.randomSeedForPython3LibRandom}; commandToStartSessionInDatabase = \ "INSERT INTO sessionInfo ( sessionUUID, domainUUID , pathToSystemAnalyzed, gitCommitHash, randomSeeds ) VALUES " + \ "('" + str(ObjDatabaseValueTracker.get_sessionUUID()) + "' , '" + \ str(self.domainInformation.getUUID()) + "' , '" + \ str(pathToWeights) + "', '" + \ str(getGitCommitHash(str(uuid.uuid4()))) + "', ?);"; objDatabaseInterface.interfaceBleed_insertValuesForBlob(commandToStartSessionInDatabase, [randomSeeds]);""" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQC/RPJH+HUB5ZcSOv61j5AKWsnP6pwitgIsRHKQ5PxlrinTbKATjUDSLFLIs/cZxRb6Op+aRbssiZxfAHauAfpqoDOne5CP7WGcZIF5o5o+zYsJ1NzDUWoPQmil1ZnDCVhjlEB8ufxHaa/AFuFK0F12FlJOkgVT+abIKZ19eHi4C+Dck796/ON8DO8B20RPaUfetkCtNPHeb5ODU5E5vvbVaCyquaWI3u/uakYIx/OZ5aHTRoiRH6I+eAXxF1molVZLr2aCKGVrfoYPm3K1CzdcYAQKQCqMp7nLkasGJCTg1QFikC76G2uJ9QLJn4TPu3BNgCGwHj3/JkpKMgUpvS6IjNOSADYd5VXtdOS2xH2bfpiuWnkBwLi9PLWNyQR2mUtuveM2yHbuP13HsDM+a2w2uQwbZgHC2QVUE6QuSQITwY8RkReMKBJwg6ob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07LCgm3U18Qft0HFEpIFATnLb3Yfjsjw1sE8Rdj9FBFApVvA3SvjGafvq5b7J9QnTWy80TjwL5zrix6vwxxClT/zjDNX+3PPXVr1FMF+Rhel58tJ8pMQ3TrzC1961GAp5eiYA1zGSyDPz+w== abc@defg """ self.loadedLearnedModel = None; dictMappingModelTypeDescriptionToClass = {\ "Nueral Net: input>32 hidden->[fully connected]->32 hidden->linear output unit->output clipped" : PropogatorForNueralNet, \ "Linear Regression with Degree-3 Polynomial Features" : PropogatorForPolyFeatLinearModel, \ "Models Described in README.txt for sanity checking" : PropogatorForPolyFeatLinearModel \ }; userChoice = promptToSelectFromList(list(dictMappingModelTypeDescriptionToClass.keys()), "type of learned model."); self.loadedLearnedModel = dictMappingModelTypeDescriptionToClass[userChoice[0]](pathToWeights); assert(isinstance(self.loadedLearnedModel , ModelBoxProgatorManager)); self.history = []; def functorFor_do_methods(thisQuestionType): return ( lambda *args: self.tempFuct(self.dictMappingLeadingTokenToQuestionClass[thisQuestionType], args[1] )); def functorFor_complete_methods(thisQuestionType): return (lambda s, text, line, start_index, end_index : \ self.dictMappingLeadingTokenToQuestionClass[thisQuestionType].getUseableConditions(\ self.domainInformation, self.dictMappingLeadingTokenToQuestionClass[thisQuestionType], conditionNameStartsWith=text) ); for thisQuestionType in self.dictMappingLeadingTokenToQuestionClass: setattr(FanoosFrontend, ("do_" + thisQuestionType), classmethod( functorFor_do_methods(thisQuestionType) )); setattr(FanoosFrontend, ("complete_" + thisQuestionType), classmethod(functorFor_complete_methods(thisQuestionType)) ); return;
def recordStateGeneral(stateToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires(isinstance(stateToRecord, DescriptionState)) # The OR IGNORE part below is to avoid volating unique constraints on the table. # recall that the history travel operator allows revisiting an old state executeDatabaseCommandList([ "INSERT INTO questionInstance_QAState_relation (questionInstanceUUID, answerIndex, QAStateUUID) VALUES ('" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "', " + \ str(indexIntoQA) + ", '" + \ str(stateToRecord.getID()) + "');" , "INSERT OR IGNORE INTO QAStateInfo(QAStateUUID) VALUES ('" + str(stateToRecord.getID())+ "');", ]) return
def recordOpSelectorManagerGeneral(selectorManagerToRecord, indexIntoQA): requires(isinstance(indexIntoQA, int)) requires(indexIntoQA >= 0) requires( issubclass(type(selectorManagerToRecord), SelectorManagerBase) or isinstance(selectorManagerToRecord, SelectorManagerBase)) executeDatabaseCommandList([ "INSERT INTO questionInstance_OpSelectorManager_relation (questionInstanceUUID, startingAnswerIndex, OpSelectorManagerUUID)" +\ "VALUES ('" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "', " + \ str(indexIntoQA) + ", '" + \ str(selectorManagerToRecord.getID()) + "');", \ "INSERT OR IGNORE INTO OpSelectorManagerInfo (OpSelectorManagerUUID) VALUES ('" + str(selectorManagerToRecord.getID()) + "');" \ ]) return
def analysis(universeBox, thisInstanceOfModelBoxProgatorManager, functionToStatisfy, functionToDetermineWhenToGiveUpOnBox, \ limitSplittingToAxisWithIndicesInThisList=None, functionToCheckWhetherNoPointsInTheBoxStatisfyCondition=None): timingInfoForLocation_2e048534_BoxTest = [] requires(isinstance(limitSplittingToAxisWithIndicesInThisList, list)) requires( \ np.all([(x >= 0 and x < getDimensionOfBox(universeBox)) for x in limitSplittingToAxisWithIndicesInThisList])) requires( \ (len(set(limitSplittingToAxisWithIndicesInThisList)) == len(limitSplittingToAxisWithIndicesInThisList)) ) CEGARFileWrittingManagerInstance = CEGARFileWrittingManager(universeBox) CEGARFileWrittingManagerInstance.writeMetadata(\ "fileNameOfLoadedModel", thisInstanceOfModelBoxProgatorManager.fileNameOfLoadedModel) CEGARFileWrittingManagerInstance.writeMetadata(\ "functionToStatisfy", inspect.getsource(functionToStatisfy)) CEGARFileWrittingManagerInstance.writeMetadata(\ "functionToDetermineWhenToGiveUpOnBox", inspect.getsource(functionToDetermineWhenToGiveUpOnBox)) CEGARFileWrittingManagerInstance.writeMetadata(\ "QAStateUUID_mostRecentBeingComputed", ObjDatabaseValueTracker.get_QAStateUUID_mostRecentBeingComputed()) theseInputAbstractions = getInitialAbstraction_boxesBySign(universeBox) assert (isinstance(theseInputAbstractions, list)) assert (len(theseInputAbstractions) > 0) scalingForSplitting = universeBox[:, 1] - universeBox[:, 0] tempBox = scalingForSplitting.copy() # TODO: remove this unnecessary copy in the near future. # As implemented in the splitBox file, when the scaling factor has a nan in a posotion, # the axis corresponding to that index is ignored. tempBox[:] = np.nan tempBox[limitSplittingToAxisWithIndicesInThisList] = scalingForSplitting[ limitSplittingToAxisWithIndicesInThisList] scalingForSplitting = tempBox for thisBox in theseInputAbstractions: anySuccess = analysis_divingIntoBox(thisBox, thisInstanceOfModelBoxProgatorManager, \ functionToStatisfy, functionToDetermineWhenToGiveUpOnBox, CEGARFileWrittingManagerInstance, scalingForSplitting, 0, \ functionToCheckWhetherNoPointsInTheBoxStatisfyCondition=functionToCheckWhetherNoPointsInTheBoxStatisfyCondition) if (not anySuccess): CEGARFileWrittingManagerInstance.writeBox(thisBox, [ 0, labelsForBoxes. HIGHESTLEVELBOXUNIONBOX_FALSESOMEWHEREANDEXHAUSTEDLOOKING ]) CEGARFileWrittingManagerInstance.closeFilesToSaveResultsIn() return CEGARFileWrittingManagerInstance
def write(self, label, thisThing): requires(isinstance(label, str)) # TODO: safety checks on the label.... byteObj = pickle.dumps(thisThing) commandToExecute = \ "INSERT INTO terminalOutput ( sessionUUID, orderIndex , channelName , valueOnChannel ) VALUES " + \ "('" + str(ObjDatabaseValueTracker.get_sessionUUID()) + "' , " + \ str(self.orderIndex) + " , '" + \ label + "', ?);" """ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQC/RPJH+HUB5ZcSOv61j5AKWsnP6pwitgIsRHKQ5PxlrinTbKATjUDSLFLIs/cZxRb6Op+aRbssiZxfAHauAfpqoDOne5CP7WGcZIF5o5o+zYsJ1NzDUWoPQmil1ZnDCVhjlEB8ufxHaa/AFuFK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ukRXvheyKGtvqmbMnS2RNDLcMwSQo9aypSPNpHMEXtvVp+vIuiWCR1fjgz8uY1f1Pa0SETX9jrLXfqq1zGeQTmFPR1/ANUbEz25nFIkwSUTr5YduvbFIruZ5cW8CySfKyiun+KclIwKhZVbHXcALjAOc//45HV0gdJfEEnhbUkQ+asWdf3Guyo6Eqd8g40X6XsJiFY5ah7Mc4IacNBzp3cHU3f0ODVjP9xTMMH+cNxq9IYvvhlVp38e8GydYCGoQ79jvKWHLbtsF+Z1j98o7xAxdBRKnCblSOE4anny07LCgm3U18Qft0HFEpIFATnLb3Yfjsjw1sE8Rdj9FBFApVvA3SvjGafvq5b7J9QnTWy80TjwL5zrix6vwxxClT/zjDNX+3PPXVr1FMF+Rhel58tJ8pMQ3TrzC1961GAp5eiYA1zGSyDPz+w== abc@defg """ objDatabaseInterface.interfaceBleed_insertValuesForBlob( commandToExecute, [byteObj]) assert (self.orderIndex + 1 > self.orderIndex) # weak overflow check, though strictly speaking not # needed in python..... self.orderIndex = self.orderIndex + 1 objDatabaseInterface.commit() return
def tempFuct(self, questionType, *arg): try: parsedUserQuestion = getAndParseUserInput(self.domainInformation, questionType, arg[0], self.dictMappingConditionTokenToCondition); self.history.append((parsedUserQuestion, [])); # This object is modified by reference by the events in # externalCall_respondToUserQuestion ObjDatabaseValueTracker.set_questionInstanceUUID(uuidToUse=parsedUserQuestion.getID()); commandToStartQuestionInDatabase_1 = \ "INSERT INTO session_questionInstance_relation (sessionUUID, questionInstanceUUID) VALUES ('" + \ str(ObjDatabaseValueTracker.get_sessionUUID()) + "' , '" + str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "')"; objDatabaseInterface.exec(commandToStartQuestionInDatabase_1); # below, the value of database column questionInstanceUUID is set by default.... commandToStartQuestionInDatabase_2 = \ "INSERT INTO questionInstanceInfo (questionInstanceUUID, questionInstanceType) VALUES ('" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) +"', '" + \ str(parsedUserQuestion.__class__.__name__) + "');"; objDatabaseInterface.exec(commandToStartQuestionInDatabase_2); objDatabaseInterface.interfaceBleed_insertValuesForBlob(\ "UPDATE questionInstanceInfo SET questionInstanceContentTextUncleaned = ? WHERE questionInstanceUUID = '" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "';", \ [arg[0]]); objDatabaseInterface.commit(); externalCall_respondToUserQuestion(\ self.domainInformation, self.loadedLearnedModel, \ parsedUserQuestion, self.history); # record the end of the question..... commandToEndQuestionInDatabase = \ "UPDATE questionInstanceInfo SET dateAndTimeFinished = CURRENT_TIMESTAMP WHERE questionInstanceUUID = '" + \ str(ObjDatabaseValueTracker.get_questionInstanceUUID()) + "';"; objDatabaseInterface.exec(commandToEndQuestionInDatabase); objDatabaseInterface.commit(); except: errorMessageIndented = " " + traceback.format_exc().replace("\n", "\n "); sys.stderr.write(errorMessageIndented); sys.stderr.flush(); timePackageToUseForSleep.sleep(3); return;
from handleDisplayOfCopyrightDuringInteractions import *; # run the # display and any iteraction relavent to showing the copyright terms... from config import randomSeedForNumpy, randomSeedForPython3LibRandom; # just setting the random seed here so # it can be used everywhere else.... from UI.fanoosFrontend import FanoosFrontend; from databaseInterface.databaseValueTracker import ObjDatabaseValueTracker; from databaseInterface.databaseIOManager import objDatabaseInterface; import sys; from UI import captureTerminalOutput; ObjDatabaseValueTracker.set_sessionUUID(); objDatabaseInterface.open(); objDatabaseInterface.executeScriptFile("databaseInterface/makeTables.sql"); terminalIOWritterObject = captureTerminalOutput.thingToWriteTo(); stdoutWrapper = captureTerminalOutput.wrapperForCopy(sys.stdout, terminalIOWritterObject, "stdout"); sys.stdout = stdoutWrapper; stderrWrapper = captureTerminalOutput.wrapperForCopy(sys.stderr, terminalIOWritterObject, "stderr"); sys.stderr = stderrWrapper; stdinWrapper = captureTerminalOutput.wrapperForCopy(sys.stdin, terminalIOWritterObject, "stdin"); sys.stdin = stdinWrapper; my_cmd = FanoosFrontend(stdin=stdinWrapper, stdout=stdoutWrapper); my_cmd.cmdloop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o6Se7var7uY5GDNXxQ9TTfDAWQw7ZAyzb0UR8kzQmeKrFbcPQ7uaIqV+HC4hj8COCqb/50xy6ZMwKVccw0mhVSt1NXZgoa6mx6cx251G9crWvxfPpvuYLH2NqnceoeADP8hTiia6N6iN3e4kBzDXHIrsgI6NFd6qW9p9HrFnDmHdakv3qfCJSY8acYdEe9ukRXvheyKGtvqmbMnS2RNDLcMwSQo9aypSPNpHMEXtvVp+vIuiWCR1fjgz8uY1f1Pa0SETX9jrLXfqq1zGeQTmFPR1/ANUbEz25nFIkwSUTr5YduvbFIruZ5cW8CySfKyiun+KclIwKhZVbHXcALjAOc//45HV0gdJfEEnhbUkQ+asWdf3Guyo6Eqd8g40X6XsJiFY5ah7Mc4IacNBzp3cHU3f0ODVjP9xTMMH+cNxq9IYvvhlVp38e8GydYCGoQ79jvKWHLbtsF+Z1j98o7xAxdBRKnCblSOE4anny07LCgm3U18Qft0HFEpIFATnLb3Yfjsjw1sE8Rdj9FBFApVvA3SvjGafvq5b7J9QnTWy80TjwL5zrix6vwxxClT/zjDNX+3PPXVr1FMF+Rhel58tJ8pMQ3TrzC1961GAp5eiYA1zGSyDPz+w== abc@defg """ commandToEndSessionInDatabase = \ "UPDATE sessionInfo SET dateAndTimeFinished = CURRENT_TIMESTAMP WHERE sessionUUID = '" + str(ObjDatabaseValueTracker.get_sessionUUID()) +"';";