void DLDag :: removeQuery ( void ) { for ( size_t i = size()-1; i >= finalDagSize; --i ) { DLVertex* v = Heap[i]; switch ( v->Type() ) { case dtData: static_cast<TDataEntry*>(v->getConcept())->setBP(bpINVALID); break; case dtConcept: static_cast<TConcept*>(v->getConcept())->clear(); break; default: break; } delete v; } Heap.resize(finalDagSize); }
void modelCacheIan :: processConcept ( const DLVertex& cur, bool pos, bool det ) { switch ( cur.Type() ) { case dtTop: // sanity checks case dtDataType: // data entries can not be cached case dtDataValue: case dtDataExpr: fpp_unreachable(); break; case dtNConcept: // add concepts to Concepts case dtPConcept: case dtNSingleton: case dtPSingleton: (det ? getDConcepts(pos) : getNConcepts(pos)).insert(static_cast<const ClassifiableEntry*>(cur.getConcept())->index()); break; case dtIrr: // for \neg \ER.Self: add R to AR-set case dtForall: // add AR.C roles to forallRoles case dtLE: // for <= n R: add R to forallRoles if ( unlikely ( cur.getRole()->isTop() ) ) // force clash to every other edge (pos ? forallRoles : existsRoles).completeSet(); else if ( pos ) // no need to deal with existentials here: they would be created through edges { if ( cur.getRole()->isSimple() ) forallRoles.insert(cur.getRole()->index()); else processAutomaton(cur); } break; default: // all other -- nothing to do break; } }