Skip to content

Commit

Permalink
Refactor code tree search structs; change flat term to lazily expandi…
Browse files Browse the repository at this point in the history
…ng version in term code trees
  • Loading branch information
mezpusz committed Apr 10, 2024
1 parent 5a168f8 commit a336557
Show file tree
Hide file tree
Showing 9 changed files with 309 additions and 258 deletions.
3 changes: 2 additions & 1 deletion Indexing/ClauseCodeTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ void ClauseCodeTree::insert(Clause* cl)
cctx.init();

for(unsigned i=0;i<clen;i++) {
cctx.nextLit();
compileTerm(lits[i], code, cctx, true);
}
code.push(CodeOp::getSuccess(cl));
Expand Down Expand Up @@ -185,7 +186,7 @@ void ClauseCodeTree::matchCode(CodeStack& code, CodeOp* startOp, size_t& matched
if(treeOp->isSearchStruct()) {
SearchStruct* ss=treeOp->getSearchStruct();
CodeOp** toPtr;
if(ss->getTargetOpPtr(code[i], toPtr) && *toPtr) {
if(ss->getTargetOpPtr<false>(code[i], toPtr) && *toPtr) {
treeOp=*toPtr;
continue;
}
Expand Down

0 comments on commit a336557

Please sign in to comment.