Mercurial > code > home > repos > homeauto
changeset 1695:5c2565e63297
take out some misduided fixes
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 22:55:32 -0700 |
parents | 73abfd4cf5d0 |
children | cdf706cf5f82 |
files | service/mqtt_to_rdf/inference.py |
diffstat | 1 files changed, 1 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/service/mqtt_to_rdf/inference.py Mon Sep 27 11:22:09 2021 -0700 +++ b/service/mqtt_to_rdf/inference.py Mon Sep 27 22:55:32 2021 -0700 @@ -200,20 +200,6 @@ finally: debug(ringlog, self.slog, f'{INDENT*7} ChunkLooper{self._shortId} restarts: pastEnd={self.pastEnd()}') - def prevMayHaveChanged(self): - pass - # self._advanceWithFunctions() - # This is a total patch for a test failure. This should be generalized - # to a Looper that can keep itself correct when prev changes. - # if self.pastEnd(): - # self.restart() - # else: - # self.advance() - # if self._currentIsFromFunc: - # self._advanceWithFunctions() - # if self.pastEnd(): - # self.restart() - @dataclass class Lhs: @@ -225,6 +211,7 @@ def __repr__(self): return f"Lhs({self.graph!r})" + def findCandidateBindings(self, knownTrue: ChunkedGraph, stats, slog: Optional[StructuredLog], ruleStatementsIterationLimit) -> Iterator['BoundLhs']: """distinct bindings that fit the LHS of a rule, using statements from @@ -362,17 +349,12 @@ def _advanceTheStack(self, looperRings: List[ChunkLooper]) -> bool: - def freshenRight(i): - for ring in looperRings[i + 1:]: - ring.prevMayHaveChanged() - carry = True # last elem always must advance for i, ring in reversed(list(enumerate(looperRings))): # unlike normal odometer, advancing any earlier ring could invalidate later ones if carry: odolog.debug(f'{INDENT*4} advanceAll [ring={i}] {ring} carry/advance') ring.advance() - freshenRight(i) carry = False if ring.pastEnd(): if ring is looperRings[0]: @@ -381,7 +363,6 @@ return True odolog.debug(f'{INDENT*5} advanceAll [ring={i}] {ring} restart') ring.restart() - freshenRight(i) carry = True return False