diff --git a/include/vlog/concepts.h b/include/vlog/concepts.h index 47852511..7cf79dc2 100644 --- a/include/vlog/concepts.h +++ b/include/vlog/concepts.h @@ -398,7 +398,7 @@ class Rule { return heads[0]; } - Literal getHead(uint8_t pos) const { + Literal getHead(unsigned pos) const { return heads[pos]; } @@ -416,8 +416,8 @@ class Rule { return body; } - uint8_t getNIDBPredicates() const { - uint8_t i = 0; + unsigned getNIDBPredicates() const { + unsigned i = 0; for (std::vector::const_iterator itr = body.begin(); itr != body.end(); ++itr) { if (itr->getPredicate().getType() == IDB) { @@ -427,8 +427,8 @@ class Rule { return i; } - uint8_t getNIDBNotMagicPredicates() const { - uint8_t i = 0; + unsigned getNIDBNotMagicPredicates() const { + unsigned i = 0; for (std::vector::const_iterator itr = body.begin(); itr != body.end(); ++itr) { if (itr->getPredicate().getType() == IDB && !itr->getPredicate().isMagic()) { @@ -438,8 +438,8 @@ class Rule { return i; } - uint8_t getNEDBPredicates() const { - uint8_t i = 0; + unsigned getNEDBPredicates() const { + unsigned i = 0; for (std::vector::const_iterator itr = body.begin(); itr != body.end(); ++itr) { if (itr->getPredicate().getType() == EDB) { @@ -449,8 +449,8 @@ class Rule { return i; } - uint8_t numberOfNegatedLiteralsInBody() { - uint8_t result = 0; + unsigned numberOfNegatedLiteralsInBody() { + unsigned result = 0; for (std::vector::const_iterator itr = getBody().begin(); itr != getBody().end(); ++itr) { if (itr->isNegated()){ diff --git a/include/vlog/fctable.h b/include/vlog/fctable.h index ac6e225c..ff35caeb 100644 --- a/include/vlog/fctable.h +++ b/include/vlog/fctable.h @@ -25,15 +25,15 @@ struct FCBlock { std::shared_ptr table; Literal query; - uint8_t posQueryInRule; const RuleExecutionDetails *rule; - const uint8_t ruleExecOrder; + unsigned posQueryInRule; + const unsigned ruleExecOrder; bool isCompleted; FCBlock(size_t iteration, std::shared_ptr table, - Literal query, uint8_t posQueryInRule, const RuleExecutionDetails *rule, - const uint8_t ruleExecOrder, bool isCompleted) : iteration(iteration), + Literal query, unsigned posQueryInRule, const RuleExecutionDetails *rule, + const unsigned ruleExecOrder, bool isCompleted) : iteration(iteration), table(table), query(query), posQueryInRule(posQueryInRule), rule(rule), ruleExecOrder(ruleExecOrder), isCompleted(isCompleted) { @@ -153,8 +153,8 @@ class FCTable { void addBlock(FCBlock block); bool add(std::shared_ptr t, const Literal &literal, - const uint8_t posLiteralInRule, const RuleExecutionDetails *detailsRule, - const uint8_t ruleExecOrder, + const unsigned posLiteralInRule, const RuleExecutionDetails *detailsRule, + const unsigned ruleExecOrder, const size_t iteration, const bool isCompleted, int nthreads); int nBlocks() { diff --git a/src/vlog/forward/fctable.cpp b/src/vlog/forward/fctable.cpp index 79e32686..921a53a9 100644 --- a/src/vlog/forward/fctable.cpp +++ b/src/vlog/forward/fctable.cpp @@ -220,7 +220,7 @@ std::shared_ptr FCTable::filter(const Literal &literal, uint8_t nVarsToCopy = 0; uint8_t posVarsToCopy[256]; - for (int i = 0; i < (uint8_t) literal.getTupleSize(); ++i) { + for (int i = 0; i < literal.getTupleSize(); ++i) { VTerm t = literal.getTermAtPos(i); if (!t.isVariable()) { posConstantsToFilter[nConstantsToFilter] = i; @@ -363,9 +363,9 @@ std::shared_ptr FCTable::retainFrom( bool FCTable::add(std::shared_ptr t, const Literal &literal, - const uint8_t posLiteralInRule, + const unsigned posLiteralInRule, const RuleExecutionDetails *rule, - const uint8_t ruleExecOrder, + const unsigned ruleExecOrder, const size_t iteration, const bool isCompleted, int nthreads) { assert(t->getRowSize() == this->getSizeRow());