# HG changeset patch # User drewp@bigasterisk.com # Date 1631523289 25200 # Node ID ae5ca4ba8954ac2241b3ca291476c0faab9564f9 # Parent 0ba1625037ae4a0dbdf801650d93b886807be9df rm unused computation diff -r 0ba1625037ae -r ae5ca4ba8954 service/mqtt_to_rdf/inference.py --- a/service/mqtt_to_rdf/inference.py Mon Sep 13 01:53:32 2021 -0700 +++ b/service/mqtt_to_rdf/inference.py Mon Sep 13 01:54:49 2021 -0700 @@ -104,14 +104,7 @@ if self._advanceWithPlainMatches(augmentedWorkingSet): return - curBind = self.prev.currentBinding() if self.prev else CandidateBinding({}) - [lhsStmtBound] = curBind.apply([self.lhsStmt], returnBoundStatementsOnly=False) - - fullWorkingSet = self.workingSet + self.parent.graph - boundFullWorkingSet = list(curBind.apply(fullWorkingSet, returnBoundStatementsOnly=False)) - log.debug(f'{fullWorkingSet.__len__()=} {len(boundFullWorkingSet)=}') - - if self._advanceWithFunctions(augmentedWorkingSet, boundFullWorkingSet, lhsStmtBound): + if self._advanceWithFunctions(): return log.debug(f'{INDENT*6} {self} is past end') @@ -137,7 +130,7 @@ return True return False - def _advanceWithFunctions(self, augmentedWorkingSet: Sequence[Triple], boundFullWorkingSet, lhsStmtBound) -> bool: + def _advanceWithFunctions(self) -> bool: pred: Node = self.lhsStmt[1] for functionType in functionsFor(pred): @@ -338,7 +331,6 @@ key = tuple(sorted(bound.binding.binding.items())), b self.rhsBnodeMap.setdefault(key, BNode()) - try: bound.binding.addNewBindings(CandidateBinding({b: self.rhsBnodeMap[key]})) except BindingConflict: