Mercurial > code > home > repos > homeauto
changeset 1639:ae5ca4ba8954
rm unused computation
author | drewp@bigasterisk.com |
---|---|
date | Mon, 13 Sep 2021 01:54:49 -0700 |
parents | 0ba1625037ae |
children | 4bb6f593ebf3 |
files | service/mqtt_to_rdf/inference.py |
diffstat | 1 files changed, 2 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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: