Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.yml #60

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Update main.yml #60

wants to merge 10 commits into from

Conversation

daniel86
Copy link
Owner

@daniel86 daniel86 commented Sep 9, 2024

No description provided.

Copy link

github-actions bot commented Sep 9, 2024

Make output - ⚠️ Warnings( 156 ) ❌ Errors( 0 )

std::atomic<bool> hasTerminateRequest_;
void run();
friend class ThreadPool;
};

!Line: 78  warning: ‘knowrob::ThreadPool::Worker::hasTerminateRequest_’ will be initialized after [-Wreorder]

std::atomic<bool> isTerminated_;
std::atomic<bool> hasTerminateRequest_;
void run();
friend class ThreadPool;

!Line: 77  warning:   ‘std::atomic<bool> knowrob::ThreadPool::Worker::isTerminated_’ [-Wreorder]

knowrob//src/ThreadPool.cpp

Lines 101 to 106 in d42c439

ThreadPool::Worker::Worker(ThreadPool *threadPool)
: hasTerminateRequest_(false),
isTerminated_(false),
threadPool_(threadPool),
thread_(&Worker::run, this) {
}

!Line: 101  warning:   when initialized here [-Wreorder]

std::atomic<bool> isTerminated_;
std::atomic<bool> hasTerminateRequest_;
void run();
friend class ThreadPool;

!Line: 77  warning: ‘knowrob::ThreadPool::Worker::isTerminated_’ will be initialized after [-Wreorder]

ThreadPool *threadPool_;
std::thread thread_;
std::atomic<bool> isTerminated_;
std::atomic<bool> hasTerminateRequest_;

!Line: 74  warning:   ‘knowrob::ThreadPool* knowrob::ThreadPool::Worker::threadPool_’ [-Wreorder]

std::atomic<bool> hasStopRequest_;
std::mutex mutex_;
std::condition_variable finishedCV_;
ExceptionHandler exceptionHandler_;
void runInternal();

!Line: 129  warning: ‘knowrob::ThreadPool::Runner::hasStopRequest_’ will be initialized after [-Wreorder]

std::atomic<bool> isRunning_;
std::atomic<bool> hasStopRequest_;
std::mutex mutex_;
std::condition_variable finishedCV_;
ExceptionHandler exceptionHandler_;

!Line: 128  warning:   ‘std::atomic<bool> knowrob::ThreadPool::Runner::isRunning_’ [-Wreorder]

knowrob//src/ThreadPool.cpp

Lines 167 to 172 in d42c439

ThreadPool::Runner::Runner()
: isTerminated_(false),
hasStopRequest_(false),
isRunning_(false),
exceptionHandler_(nullptr) {}

!Line: 167  warning:   when initialized here [-Wreorder]

std::optional<XSDType> xsdType_;
static bool isBlank(std::string_view str) {
return str.empty() || str[0] == '_';
}
};

!Line: 335  warning: ‘knowrob::FramedTriple::xsdType_’ will be initialized after [-Wreorder]

bool isUncertain_;
std::optional<double> begin_;
std::optional<double> end_;
std::optional<double> confidence_;
std::optional<XSDType> xsdType_;

!Line: 331  warning:   ‘bool knowrob::FramedTriple::isUncertain_’ [-Wreorder]

explicit FramedTriple()
: xsdType_(std::nullopt), isUncertain_(false), isOccasional_(false) {}
explicit FramedTriple(XSDType xsdType)
: xsdType_(xsdType), isUncertain_(false), isOccasional_(false) {}

!Line: 22  warning:   when initialized here [-Wreorder]

bool isUncertain_;
std::optional<double> begin_;
std::optional<double> end_;
std::optional<double> confidence_;
std::optional<XSDType> xsdType_;

!Line: 331  warning: ‘knowrob::FramedTriple::isUncertain_’ will be initialized after [-Wreorder]

bool isOccasional_;
bool isUncertain_;
std::optional<double> begin_;
std::optional<double> end_;
std::optional<double> confidence_;
std::optional<XSDType> xsdType_;

!Line: 330  warning:   ‘bool knowrob::FramedTriple::isOccasional_’ [-Wreorder]

explicit FramedTriple(XSDType xsdType)
: xsdType_(xsdType), isUncertain_(false), isOccasional_(false) {}
virtual ~FramedTriple() = default;
/**

!Line: 25  warning:   when initialized here [-Wreorder]

FramedTriplePatternPtr pattern_;
};
} // knowrob
#endif //KNOWROB_GRAPH_PATTERN_H

!Line: 33  warning: ‘knowrob::GraphPattern::pattern_’ will be initialized after [-Wreorder]

: pattern_(std::move(pattern)), GraphTerm(GraphTermType::Pattern) {}
explicit GraphPattern(const TermPtr &subject, const TermPtr &predicate, const TermPtr &object)
: pattern_(std::make_shared<FramedTriplePattern>(subject, predicate, object)),
GraphTerm(GraphTermType::Pattern) {}

!Line: 19  warning:   base ‘knowrob::GraphTerm’ [-Wreorder]

explicit GraphPattern(FramedTriplePatternPtr pattern)
: pattern_(std::move(pattern)), GraphTerm(GraphTermType::Pattern) {}
explicit GraphPattern(const TermPtr &subject, const TermPtr &predicate, const TermPtr &object)
: pattern_(std::make_shared<FramedTriplePattern>(subject, predicate, object)),
GraphTerm(GraphTermType::Pattern) {}

!Line: 18  warning:   when initialized here [-Wreorder]

GraphTerm(GraphTermType::Pattern) {}
/**
* @return the triple pattern.
*/
const auto &value() const { return pattern_; }

!Line: 23  warning:   base ‘knowrob::GraphTerm’ [-Wreorder]

explicit GraphPattern(const TermPtr &subject, const TermPtr &predicate, const TermPtr &object)
: pattern_(std::make_shared<FramedTriplePattern>(subject, predicate, object)),
GraphTerm(GraphTermType::Pattern) {}
/**
* @return the triple pattern.

!Line: 21  warning:   when initialized here [-Wreorder]

std::shared_ptr<QueryableStorage> queryable_;
std::vector<std::shared_ptr<NamedBackend>> backends_;
bool isRemoval_;
bool commitProtected(const TripleContainerPtr &triple, const StoragePtr &backend);

!Line: 72  warning: ‘knowrob::transaction::Transaction::queryable_’ will be initialized after [-Wreorder]

std::shared_ptr<Vocabulary> vocabulary_;
std::shared_ptr<QueryableStorage> queryable_;
std::vector<std::shared_ptr<NamedBackend>> backends_;
bool isRemoval_;
bool commitProtected(const TripleContainerPtr &triple, const StoragePtr &backend);

!Line: 71  warning:   ‘std::shared_ptr<knowrob::Vocabulary> knowrob::transaction::Transaction::vocabulary_’ [-Wreorder]

Transaction(const std::shared_ptr<QueryableStorage> &queryable,
const std::shared_ptr<Vocabulary> &vocabulary,
bool isRemoval)
: queryable_(queryable),
vocabulary_(vocabulary),
isRemoval_(isRemoval) {}

!Line: 25  warning:   when initialized here [-Wreorder]

URI uri_;
};
// alias
using DataSourcePtr = std::shared_ptr<DataSource>;
}

!Line: 102  warning: ‘knowrob::DataSource::uri_’ will be initialized after [-Wreorder]

std::string format_;
URI uri_;
};
// alias
using DataSourcePtr = std::shared_ptr<DataSource>;

!Line: 101  warning:   ‘std::string knowrob::DataSource::format_’ [-Wreorder]

DataSource::DataSource(URI uri, std::string_view format, DataSourceType dataSourceType)
: dataSourceType_(dataSourceType),
uri_(std::move(uri)),
format_(format) {
}

!Line: 30  warning:   when initialized here [-Wreorder]

boost::optional<std::string> protocol_;
boost::optional<std::string> host_;
boost::optional<int> port_;
void updateURI();
};

!Line: 36  warning: ‘knowrob::URI::protocol_’ will be initialized after [-Wreorder]

std::string path_;
boost::optional<std::string> protocol_;
boost::optional<std::string> host_;
boost::optional<int> port_;
void updateURI();

!Line: 35  warning:   ‘std::string knowrob::URI::path_’ [-Wreorder]

knowrob//src/URI.cpp

Lines 22 to 27 in d42c439

URI::URI(std::string path, std::string protocol, std::string host, int port)
: protocol_(std::move(protocol)),
path_(std::move(path)),
host_(std::move(host)),
port_(port) {
updateURI();

!Line: 22  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<Term>() {
using namespace boost::python;

!Line: 78  warning: ‘knowrob::py::TermWrap::self’ will be initialized after [-Wreorder]

explicit TermWrap(PyObject *p, TermType termType) : self(p), Term(termType) {}
const std::set<std::string_view> &
variables() const override { return knowrob::py::call_method<std::set<std::string_view> &>(self, "variables"); }
private:

!Line: 72  warning:   base ‘knowrob::Term’ [-Wreorder]

explicit TermWrap(PyObject *p, TermType termType) : self(p), Term(termType) {}
const std::set<std::string_view> &
variables() const override { return knowrob::py::call_method<std::set<std::string_view> &>(self, "variables"); }
private:

!Line: 72  warning:   when initialized here [-Wreorder]

auto jt = mapping_.insert(pair).first;
} else {
// variable has already an instantiation, need to unify
TermPtr t0 = it->second.second;
TermPtr t1 = pair.second.second;

!Line: 135  warning: variable ‘jt’ set but not used [-Wunused-but-set-variable]

bool Bottom::isEqual(const Formula &other) const {
return true; // isEqual is only called if other also has type "Bottom"
}
namespace knowrob::py {
template<>

!Line: 25  warning: unused parameter ‘other’ [-Wunused-parameter]

bool Top::isEqual(const Formula &other) const {
return true; // isEqual is only called of other also has type "Bottom"
}
void Top::write(std::ostream &os) const {
os << "\u22A4";

!Line: 20  warning: unused parameter ‘other’ [-Wunused-parameter]

static GraphSelectorPtr DefaultGraphSelector() {
static auto defaultSelector = std::make_shared<const GraphSelector>();
return defaultSelector;
}
}

!Line: 81  warning: ‘knowrob::GraphSelectorPtr knowrob::DefaultGraphSelector()’ defined but not used [-Wunused-function]

QueryContextPtr ctx_;
/**
* Pushes tokens into the output stream of a stage.
*/
class Pusher : public TokenStream {

!Line: 65  warning: ‘knowrob::QueryStage::ctx_’ will be initialized after [-Wreorder]

std::atomic<bool> isQueryOpened_;
std::atomic<bool> isAwaitingInput_;
std::atomic<bool> hasStopRequest_;
std::atomic<bool> hasPositiveAnswer_;
std::weak_ptr<QueryStage> selfWeakRef_;

!Line: 53  warning:   ‘std::atomic<bool> knowrob::QueryStage::isQueryOpened_’ [-Wreorder]

QueryStage::QueryStage(QueryContextPtr ctx)
: TokenBroadcaster(),
ctx_(std::move(ctx)),
isQueryOpened_(true),
isAwaitingInput_(true),
hasPositiveAnswer_(false),

!Line: 18  warning:   when initialized here [-Wreorder]

std::atomic<bool> hasPositiveAnswer_;
std::weak_ptr<QueryStage> selfWeakRef_;
using ActiveQuery = std::pair<TokenBufferPtr, std::shared_ptr<TokenStream>>;
using ActiveQueryIter = std::list<ActiveQuery>::iterator;
std::list<ActiveQuery> activeQueries_;

!Line: 56  warning: ‘knowrob::QueryStage::hasPositiveAnswer_’ will be initialized after [-Wreorder]

std::atomic<bool> hasStopRequest_;
std::atomic<bool> hasPositiveAnswer_;
std::weak_ptr<QueryStage> selfWeakRef_;
using ActiveQuery = std::pair<TokenBufferPtr, std::shared_ptr<TokenStream>>;
using ActiveQueryIter = std::list<ActiveQuery>::iterator;

!Line: 55  warning:   ‘std::atomic<bool> knowrob::QueryStage::hasStopRequest_’ [-Wreorder]

PyObject *self;
};
template<>
void createType<Reasoner>() {
using namespace boost::python;

!Line: 61  warning: ‘knowrob::py::ReasonerWrap::self’ will be initialized after [-Wreorder]

explicit ReasonerWrap(PyObject *p) : self(p), Reasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 54  warning:   base ‘knowrob::Reasoner’ [-Wreorder]

explicit ReasonerWrap(PyObject *p) : self(p), Reasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 54  warning:   when initialized here [-Wreorder]

const PluginLanguage language_;
};
}
#endif //KNOWROB_NAMED_PLUGIN_H_

!Line: 58  warning: ‘knowrob::NamedPlugin<knowrob::Reasoner>::language_’ will be initialized after [-Wreorder]

const std::shared_ptr<T> plugin_;
const PluginLanguage language_;
};
}
#endif //KNOWROB_NAMED_PLUGIN_H_

!Line: 57  warning:   ‘const std::shared_ptr<knowrob::Reasoner> knowrob::NamedPlugin<knowrob::Reasoner>::plugin_’ [-Wreorder]

NamedPlugin(std::string_view name, PluginLanguage language, const std::shared_ptr<T> &plugin)
: name_(name), language_(language), plugin_(plugin) {}
/**
* @return the plugin instance
*/

!Line: 32  warning:   when initialized here [-Wreorder]

char *(*get_name_)();
};
}
#endif //KNOWROB_PLUGIN_LIBRARY_H_

!Line: 85  warning: ‘knowrob::PluginLibrary<knowrob::Reasoner>::get_name_’ will be initialized after [-Wreorder]

const std::string dllPath_;
std::string name_;
// handle of opened library
void *handle_;
// a factory function used to create new instances of a backend.

!Line: 76  warning:   ‘const string knowrob::PluginLibrary<knowrob::Reasoner>::dllPath_’ [-Wreorder]

explicit PluginLibrary(std::string_view dllPath)
: handle_(nullptr),
create_(nullptr),
get_name_(nullptr),
dllPath_(dllPath) {
}

!Line: 24  warning:   when initialized here [-Wreorder]

TermPtr PropertyTree::get(std::string_view key, const TermPtr &defaultValue) {
return get_value_recursive(*ptree_, std::string(key));
}
TermPtr PropertyTree::get_value_recursive(const boost::property_tree::ptree &node, const std::string &path) {
if (path.empty()) {

!Line: 57  warning: unused parameter ‘defaultValue’ [-Wunused-parameter]

bool PrologEngine::consult(const std::filesystem::path &uri, const char *module, bool doTransformQuery) {
static auto consult_f = "consult";
auto path = PrologEngine::getPrologPath(uri);
return PrologEngine::eval([&]() {
PrologTerm plTerm(consult_f, path.native());

!Line: 244  warning: unused parameter ‘doTransformQuery’ [-Wunused-parameter]

static const auto triple_f = "triple";
// create runner that evaluates the goal in a thread with a Prolog engine.
// Note that this is needed because the current thread might not have
// a Prolog engine associated with it.
auto runner = std::make_shared<ThreadPool::LambdaRunner>(

!Line: 208  warning: unused variable ‘triple_f’ [-Wunused-variable]

if(sols.size()==1) EXPECT_EQ(*sols[0], sol); }
#define EXPECT_NO_SOLUTION(phi) EXPECT_EQ(lookupAll(phi).size(),0)
TEST_F(PrologReasonerTests, simple_conjunction) {
auto p1 = QueryParser::parsePredicate("atom_concat(a,b,AB)");

!Line: 125  warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]

char *graph;
if (mongolog) {
return mongolog->knowledgeGraph()->isReadOnly();
}
return false;
}

!Line: 112  warning: unused variable ‘graph’ [-Wunused-variable]

const std::string contextMessage_;
};
}
#endif //KNOWROB_MONGO_EXCEPTION_H

!Line: 18  warning: ‘knowrob::mongo::MongoException::contextMessage_’ will be initialized after [-Wreorder]

const std::string bsonMessage_;
const std::string contextMessage_;
};
}
#endif //KNOWROB_MONGO_EXCEPTION_H

!Line: 17  warning:   ‘const string knowrob::mongo::MongoException::bsonMessage_’ [-Wreorder]

MongoException(const char *msg, const bson_error_t &err)
: contextMessage_(msg),
bsonMessage_(err.message),
StorageError("[mongo] {}: {}.", msg, err.message) {}
const std::string bsonMessage_;
const std::string contextMessage_;

!Line: 13  warning:   when initialized here [-Wreorder]

const std::string bsonMessage_;
const std::string contextMessage_;
};
}
#endif //KNOWROB_MONGO_EXCEPTION_H

!Line: 17  warning: ‘knowrob::mongo::MongoException::bsonMessage_’ will be initialized after [-Wreorder]

StorageError("[mongo] {}: {}.", msg, err.message) {}
const std::string bsonMessage_;
const std::string contextMessage_;
};
}

!Line: 16  warning:   base ‘knowrob::StorageError’ [-Wreorder]

static bool bson_visit_utf8([[maybe_unused]] const bson_iter_t *iter, [[maybe_unused]] const char *key, size_t v_utf8_len, const char *v_utf8, void *data) {
return APPEND_BSON_PL_PAIR(data,key,v_utf8,"string");
}
static bool bson_visit_date_time([[maybe_unused]] const bson_iter_t *iter, const char *key, int64_t msec_since_epoch, void *data) {
double sec_since_epoch = ((double)msec_since_epoch)/1000.0;

!Line: 44  warning: unused parameter ‘v_utf8_len’ [-Wunused-parameter]

PyObject *self;
};
template<>
void createType<QueryableStorage>() {
using namespace boost::python;

!Line: 458  warning: ‘knowrob::py::QueryableStorageWrap::self’ will be initialized after [-Wreorder]

: self(p), QueryableStorage(features) {}
// virtual
void foreach(const TripleVisitor &visitor) const override {
call_method<void>(self, "foreach", visitor);
}

!Line: 375  warning:   base ‘knowrob::QueryableStorage’ [-Wreorder]

explicit QueryableStorageWrap(PyObject *p, const StorageFeatures features)
: self(p), QueryableStorage(features) {}
// virtual
void foreach(const TripleVisitor &visitor) const override {
call_method<void>(self, "foreach", visitor);

!Line: 374  warning:   when initialized here [-Wreorder]

const PluginLanguage language_;
};
}
#endif //KNOWROB_NAMED_PLUGIN_H_

!Line: 58  warning: ‘knowrob::NamedPlugin<knowrob::Storage>::language_’ will be initialized after [-Wreorder]

const std::shared_ptr<T> plugin_;
const PluginLanguage language_;
};
}
#endif //KNOWROB_NAMED_PLUGIN_H_

!Line: 57  warning:   ‘const std::shared_ptr<knowrob::Storage> knowrob::NamedPlugin<knowrob::Storage>::plugin_’ [-Wreorder]

char *(*get_name_)();
};
}
#endif //KNOWROB_PLUGIN_LIBRARY_H_

!Line: 85  warning: ‘knowrob::PluginLibrary<knowrob::Storage>::get_name_’ will be initialized after [-Wreorder]

const std::string dllPath_;
std::string name_;
// handle of opened library
void *handle_;
// a factory function used to create new instances of a backend.

!Line: 76  warning:   ‘const string knowrob::PluginLibrary<knowrob::Storage>::dllPath_’ [-Wreorder]

const std::string dbName_;
void remove(const Document &document, mongoc_remove_flags_t flag);
void createIndex_internal(const bson_t &keys);
};

!Line: 164  warning: ‘knowrob::mongo::Collection::dbName_’ will be initialized after [-Wreorder]

mongoc_client_session_t *session_;
mongoc_collection_t *coll_;
mongoc_database_t *db_;
const std::string name_;
const std::string dbName_;

!Line: 160  warning:   ‘mongoc_client_session_t* knowrob::mongo::Collection::session_’ [-Wreorder]

Collection::Collection(
const std::shared_ptr<Connection> &connection,
std::string_view databaseName,
std::string_view collectionName)
: connection_(connection),
name_(collectionName),

!Line: 31  warning:   when initialized here [-Wreorder]

Collection::Collection(const Collection &other)
: connection_(other.connection_),
name_(other.name_),
dbName_(other.dbName_),
session_(nullptr) {
client_ = pop_client(connection_->pool_);

!Line: 44  warning:   when initialized here [-Wreorder]

mongoc_change_stream_t *stream_;
bson_wrapper_ptr next_ptr_;
};
} // knowrob::mongo

!Line: 43  warning: ‘knowrob::mongo::ChangeStream::stream_’ will be initialized after [-Wreorder]

ChangeStreamCallback callback_;
mongoc_change_stream_t *stream_;
bson_wrapper_ptr next_ptr_;
};
} // knowrob::mongo

!Line: 42  warning:   ‘knowrob::mongo::ChangeStreamCallback knowrob::mongo::ChangeStream::callback_’ [-Wreorder]

ChangeStream::ChangeStream(
const std::shared_ptr<Collection> &collection,
const bson_t *query,
ChangeStreamCallback callback)
: collection_(collection),
stream_(nullptr),

!Line: 11  warning:   when initialized here [-Wreorder]

mongoc_cursor_t *cursor_;
bson_t *query_;
bson_t *opts_;
std::string id_;
bool isAggregateQuery_;
int64_t limit_;

!Line: 82  warning: ‘knowrob::mongo::Cursor::cursor_’ will be initialized after [-Wreorder]

std::shared_ptr<Collection> collection_;
mongoc_cursor_t *cursor_;
bson_t *query_;
bson_t *opts_;
std::string id_;
bool isAggregateQuery_;

!Line: 81  warning:   ‘std::shared_ptr<knowrob::mongo::Collection> knowrob::mongo::Cursor::collection_’ [-Wreorder]

Cursor::Cursor(const std::shared_ptr<Collection> &collection)
: cursor_(nullptr),
collection_(collection),
isAggregateQuery_(false),
limit_(0) {
query_ = bson_new();

!Line: 15  warning:   when initialized here [-Wreorder]

bool isRunning_;
std::mutex lock_;
uint32_t watchRate_;
static std::atomic<long> id_counter_;
void startWatchThread();

!Line: 61  warning: ‘knowrob::mongo::QueryWatch::isRunning_’ will be initialized after [-Wreorder]

std::thread *thread_;
bool isRunning_;
std::mutex lock_;
uint32_t watchRate_;
static std::atomic<long> id_counter_;

!Line: 60  warning:   ‘std::thread* knowrob::mongo::QueryWatch::thread_’ [-Wreorder]

QueryWatch::QueryWatch()
: isRunning_(false),
thread_(nullptr),
watchRate_(200) {
}

!Line: 16  warning:   when initialized here [-Wreorder]

const MongoKnowledgeGraph *kg;
};
static void iterate(mongo::TripleCursor &cursor, const TripleVisitor &visitor);
void initializeMongo(const std::shared_ptr<mongo::Collection> &tripleCollection);

!Line: 146  warning: ‘knowrob::MongoKnowledgeGraph::ConnectionRAII::kg’ will be initialized after [-Wreorder]

mongo::TripleStore mongo;
const MongoKnowledgeGraph *kg;
};
static void iterate(mongo::TripleCursor &cursor, const TripleVisitor &visitor);

!Line: 145  warning:   ‘knowrob::mongo::TripleStore knowrob::MongoKnowledgeGraph::ConnectionRAII::mongo’ [-Wreorder]

MongoKnowledgeGraph::ConnectionRAII::ConnectionRAII(const MongoKnowledgeGraph *kg)
: kg(kg), mongo(kg->acquireStore()) {}
MongoKnowledgeGraph::ConnectionRAII::~ConnectionRAII() {
kg->releaseStore(mongo);
}

!Line: 63  warning:   when initialized here [-Wreorder]

BindingsPtr substitution_;
};
// alias
using AnswerYesPtr = std::shared_ptr<const AnswerYes>;

!Line: 104  warning: ‘knowrob::AnswerYes::substitution_’ will be initialized after [-Wreorder]

std::vector<FramedPredicate> positiveGroundings_;
std::vector<FramedPredicate> negativeGroundings_;
BindingsPtr substitution_;
};
// alias

!Line: 102  warning:   ‘std::vector<knowrob::FramedPredicate> knowrob::AnswerYes::positiveGroundings_’ [-Wreorder]

AnswerYes::AnswerYes(const AnswerYes &other)
: Answer(other),
substitution_(std::make_shared<Bindings>(*other.substitution_)),
positiveGroundings_(other.positiveGroundings_),
negativeGroundings_(other.negativeGroundings_) {
setIsPositive(true);

!Line: 28  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<FramedTriple>() {
using namespace boost::python;

!Line: 401  warning: ‘knowrob::py::FramedTripleWrap::self’ will be initialized after [-Wreorder]

explicit FramedTripleWrap(PyObject *p) : self(p), FramedTriple() {}
void setSubject(std::string_view subject) override { call_method<void>(self, "setSubject", subject); }
void setPredicate(std::string_view predicate) override { call_method<void>(self, "setPredicate", predicate); }

!Line: 368  warning:   base ‘knowrob::FramedTriple’ [-Wreorder]

explicit FramedTripleWrap(PyObject *p) : self(p), FramedTriple() {}
void setSubject(std::string_view subject) override { call_method<void>(self, "setSubject", subject); }
void setPredicate(std::string_view predicate) override { call_method<void>(self, "setPredicate", predicate); }

!Line: 368  warning:   when initialized here [-Wreorder]

bool PrologBackend::initializeBackend(const PropertyTree &cfg) {
return initializeBackend();
}
bool PrologBackend::insertOne(const FramedTriple &triple) {
// :- rdf_assert($triple.subject, $triple.predicate, $triple.object, $triple.origin).

!Line: 56  warning: unused parameter ‘cfg’ [-Wunused-parameter]

std::optional<std::string_view> origin_;
};
} // knowrob
#endif //KNOWROB_RAPTOR_CONTAINER_H

!Line: 86  warning: ‘knowrob::RaptorContainer::origin_’ will be initialized after [-Wreorder]

std::size_t actualSize_;
std::optional<std::string_view> origin_;
};
} // knowrob

!Line: 85  warning:   ‘std::size_t knowrob::RaptorContainer::actualSize_’ [-Wreorder]

RaptorContainer::RaptorContainer(uint32_t size, std::string_view origin)
: raptorData_(size),
mappedData_(size),
origin_(origin),
actualSize_(0) {
for (auto &triple: mappedData_) {

!Line: 12  warning:   when initialized here [-Wreorder]

librdf_world *world_;
librdf_model *model_;
librdf_storage *storage_;
// the uris are created within the context of a librdf_world, so
// they cannot be defined statically.

!Line: 186  warning: ‘knowrob::RedlandModel::world_’ will be initialized after [-Wreorder]

librdf_world *ownedWorld_;
librdf_world *world_;
librdf_model *model_;
librdf_storage *storage_;
// the uris are created within the context of a librdf_world, so

!Line: 185  warning:   ‘librdf_world* knowrob::RedlandModel::ownedWorld_’ [-Wreorder]

RedlandModel::RedlandModel()
: SPARQLBackend(SPARQLFlag::NOT_EXISTS_UNSUPPORTED),
world_(nullptr),
ownedWorld_(nullptr),
model_(nullptr),
storage_(nullptr),

!Line: 79  warning:   when initialized here [-Wreorder]

const AtomType atomType_;
using AtomTable = std::map<std::string, std::optional<std::weak_ptr<Atom>>, std::less<>>;
static AtomTable &table();
};

!Line: 62  warning: ‘knowrob::Atom::atomType_’ will be initialized after [-Wreorder]

std::string_view stringForm_;
const AtomType atomType_;
using AtomTable = std::map<std::string, std::optional<std::weak_ptr<Atom>>, std::less<>>;
static AtomTable &table();

!Line: 61  warning:   ‘std::string_view knowrob::Atom::stringForm_’ [-Wreorder]

Atom::Atom(std::string_view stringForm, AtomType atomType)
: Atomic(AtomicType::ATOM),
atomType_(atomType),
stringForm_(stringForm) {
}

!Line: 16  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<Atomic>() {
using namespace boost::python;

!Line: 75  warning: ‘knowrob::py::AtomicWrap::self’ will be initialized after [-Wreorder]

explicit AtomicWrap(PyObject *p, AtomicType atomicType) : self(p), Atomic(atomicType) {}
std::string_view stringForm() const override { return call_method<std::string_view>(self, "stringForm"); }
private:
PyObject *self;

!Line: 70  warning:   base ‘knowrob::Atomic’ [-Wreorder]

explicit AtomicWrap(PyObject *p, AtomicType atomicType) : self(p), Atomic(atomicType) {}
std::string_view stringForm() const override { return call_method<std::string_view>(self, "stringForm"); }
private:
PyObject *self;

!Line: 70  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<Storage>() {
using namespace boost::python;

!Line: 45  warning: ‘knowrob::py::StorageWrap::self’ will be initialized after [-Wreorder]

explicit StorageWrap(PyObject *p) : self(p), Storage() {}
bool initializeBackend(const PropertyTree &config) override {
return call_method<bool>(self, "initializeBackend", config);
}

!Line: 18  warning:   base ‘knowrob::Storage’ [-Wreorder]

explicit StorageWrap(PyObject *p) : self(p), Storage() {}
bool initializeBackend(const PropertyTree &config) override {
return call_method<bool>(self, "initializeBackend", config);
}

!Line: 18  warning:   when initialized here [-Wreorder]

uint32_t varCounter_;
std::map<std::string_view, std::string_view> aliases_;
std::set<std::string_view> variables_;
std::string queryString_;
std::string lastVar_;

!Line: 73  warning: ‘knowrob::SPARQLQuery::varCounter_’ will be initialized after [-Wreorder]

SPARQLFlags flags_;
uint32_t varCounter_;
std::map<std::string_view, std::string_view> aliases_;
std::set<std::string_view> variables_;
std::string queryString_;
std::string lastVar_;

!Line: 72  warning:   ‘knowrob::SPARQLFlags knowrob::SPARQLQuery::flags_’ [-Wreorder]

SPARQLQuery::SPARQLQuery(const FramedTriplePattern &triplePattern, SPARQLFlag flags)
: varCounter_(0), flags_(flags) {
std::stringstream os, os_query;
selectBegin(os_query);
add(os_query, triplePattern);
selectEnd(os_query);

!Line: 15  warning:   when initialized here [-Wreorder]

SPARQLQuery::SPARQLQuery(const std::shared_ptr<GraphQuery> &query, SPARQLFlag flags)
: varCounter_(0), flags_(flags) {
std::stringstream os_query;
add(os_query, query->term());
std::stringstream os;

!Line: 27  warning:   when initialized here [-Wreorder]

const std::vector<FramedTriplePtr> triplesData_;
};
/**
* A batch of framed triples that attempts to take over ownership
* of the triples that are added to it.

!Line: 150  warning: ‘knowrob::ProxyTripleContainer::triplesData_’ will be initialized after [-Wreorder]

const std::vector<FramedTriplePtr> *triples_;
const std::vector<FramedTriplePtr> triplesData_;
};
/**
* A batch of framed triples that attempts to take over ownership

!Line: 149  warning:   ‘const std::vector<knowrob::FramedTriplePtr>* knowrob::ProxyTripleContainer::triples_’ [-Wreorder]

ProxyTripleContainer::ProxyTripleContainer(const std::vector<FramedTriplePtr> &triples)
: triplesData_(triples), triples_(&triplesData_) {
// take the ownership of the triples
for (uint32_t i = 0; i < triples.size(); ++i) {
if (triples[i].owned) {
triplesData_[i].owned = true;

!Line: 15  warning:   when initialized here [-Wreorder]

std::size_t actualSize_;
};
using TripleContainerPtr = std::shared_ptr<TripleContainer>;
using TripleHandler = std::function<void(const TripleContainerPtr &)>;
using TripleVisitor = std::function<void(const FramedTriplePtr &)>;

!Line: 187  warning: ‘knowrob::TripleViewBatch::actualSize_’ will be initialized after [-Wreorder]

std::vector<FramedTriplePtr> data_;
uint32_t batchSize_;
std::size_t actualSize_;
};
using TripleContainerPtr = std::shared_ptr<TripleContainer>;

!Line: 185  warning:   ‘std::vector<knowrob::FramedTriplePtr> knowrob::TripleViewBatch::data_’ [-Wreorder]

TripleViewBatch::TripleViewBatch(uint32_t batchSize)
: batchSize_(batchSize), actualSize_(0), data_(batchSize) {
}
void TripleViewBatch::add(const FramedTriplePtr &triple) {
if (actualSize_ < batchSize_) {

!Line: 38  warning:   when initialized here [-Wreorder]

bool withFullFrame_;
void setNonReified(const std::shared_ptr<GraphTerm> &nonReified);
std::shared_ptr<GraphTerm> reifiedPatternSequence(const FramedTriplePattern &pattern);

!Line: 55  warning: ‘knowrob::ReifiedQuery::withFullFrame_’ will be initialized after [-Wreorder]

uint32_t varCounter_;
bool withFullFrame_;
void setNonReified(const std::shared_ptr<GraphTerm> &nonReified);
std::shared_ptr<GraphTerm> reifiedPatternSequence(const FramedTriplePattern &pattern);

!Line: 54  warning:   ‘uint32_t knowrob::ReifiedQuery::varCounter_’ [-Wreorder]

ReifiedQuery::ReifiedQuery(const std::shared_ptr<GraphQuery> &nonReified, VocabularyPtr vocabulary, bool withFullFrame)
: GraphQuery(nonReified->ctx()),
vocabulary_(std::move(vocabulary)),
withFullFrame_(withFullFrame),
varCounter_(0) {
setNonReified(nonReified->term());

!Line: 16  warning:   when initialized here [-Wreorder]

ReifiedQuery::ReifiedQuery(const FramedTriplePattern &nonReified, VocabularyPtr vocabulary, bool withFullFrame)
: GraphQuery(),
vocabulary_(std::move(vocabulary)),
withFullFrame_(withFullFrame),
varCounter_(0) {
term_ = reifiedPatternSequence(nonReified);

!Line: 24  warning:   when initialized here [-Wreorder]

ReifiedNames reifiedNames;
uint32_t tripleIndex;
};
}
TripleContainer::ConstGenerator ReificationContainer::cgenerator() const {

!Line: 54  warning: ‘knowrob::reification::IterationData::reifiedNames’ will be initialized after [-Wreorder]

TripleContainer::ConstGenerator reifiedGen;
TripleContainer::iterator it;
TripleContainer::iterator end;
ReifiedNames reifiedNames;
uint32_t tripleIndex;
};

!Line: 51  warning:   ‘knowrob::TripleContainer::ConstGenerator knowrob::reification::IterationData::reifiedGen’ [-Wreorder]

IterationData(VocabularyPtr vocabulary, const TripleContainerPtr &originalTriples,
ReifiedNames reifiedNames)
: vocabulary(std::move(vocabulary)),
it(originalTriples->begin()),
end(originalTriples->end()),
reifiedNames(std::move(reifiedNames)),

!Line: 40  warning:   when initialized here [-Wreorder]

static const bool allowConfidenceNullValues = true;
auto &ct = tripleExpression.confidenceTerm();
auto &at = tripleExpression.perspectiveTerm();
auto &u = tripleExpression.isUncertainTerm();
if (!((u.has_grounding() && u.grounded()->asBoolean()) || u.has_variable())) {

!Line: 98  warning: unused variable ‘allowConfidenceNullValues’ [-Wunused-variable]

std::shared_ptr<Vocabulary> &vocabulary,
std::string_view tripleCollectionName,
const std::set<std::string_view> &invalidPropertyAssertions) {
for (auto &invalidProperty: invalidPropertyAssertions) {
// match all assertions where the property appears in the p* field
bson_t query = BSON_INITIALIZER;

!Line: 143  warning: unused parameter ‘vocabulary’ [-Wunused-parameter]

query(positiveQuery, [&](const BindingsPtr &bindings) {
hasSolution = true;
});
if (!hasSolution) {
callback(Bindings::emptyBindings());
}

!Line: 39  warning: unused parameter ‘bindings’ [-Wunused-parameter]

PyObject *self;
};
template<>
void createType<GoalDrivenReasoner>() {
using namespace boost::python;

!Line: 94  warning: ‘knowrob::py::GoalDrivenReasonerWrap::self’ will be initialized after [-Wreorder]

explicit GoalDrivenReasonerWrap(PyObject *p) : self(p), GoalDrivenReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 83  warning:   base ‘knowrob::GoalDrivenReasoner’ [-Wreorder]

explicit GoalDrivenReasonerWrap(PyObject *p) : self(p), GoalDrivenReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 83  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<DataDrivenReasoner>() {
using namespace boost::python;

!Line: 225  warning: ‘knowrob::py::DataDrivenReasonerWrap::self’ will be initialized after [-Wreorder]

explicit DataDrivenReasonerWrap(PyObject *p) : self(p), DataDrivenReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 196  warning:   base ‘knowrob::DataDrivenReasoner’ [-Wreorder]

explicit DataDrivenReasonerWrap(PyObject *p) : self(p), DataDrivenReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 196  warning:   when initialized here [-Wreorder]

std::shared_ptr<SimpleConjunction> formula_;
// Override Query
void write(std::ostream &os) const override { os << *formula_; }
};

!Line: 78  warning: ‘knowrob::Goal::formula_’ will be initialized after [-Wreorder]

std::shared_ptr<const QueryContext> ctx_;
std::shared_ptr<TokenBuffer> answerBuffer_;
std::shared_ptr<TokenStream::Channel> outputChannel_;
std::shared_ptr<SimpleConjunction> formula_;
// Override Query

!Line: 75  warning:   ‘std::shared_ptr<const knowrob::QueryContext> knowrob::Goal::ctx_’ [-Wreorder]

Goal::Goal(SimpleConjunctionPtr formula, const Goal &goal)
: Query(goal.ctx_),
formula_(std::move(formula)),
ctx_(goal.ctx_),
answerBuffer_(goal.answerBuffer_),
outputChannel_(goal.outputChannel_) {}

!Line: 50  warning:   when initialized here [-Wreorder]

Goal::Goal(SimpleConjunctionPtr formula, QueryContextPtr ctx)
: Query(ctx),
formula_(std::move(formula)),
ctx_(std::move(ctx)),
answerBuffer_(std::make_shared<TokenBuffer>()),
outputChannel_(TokenStream::Channel::create(answerBuffer_)) {}

!Line: 57  warning:   when initialized here [-Wreorder]

Goal::Goal(const FirstOrderLiteralPtr &literal, QueryContextPtr ctx)
: Query(ctx),
formula_(std::make_shared<SimpleConjunction>(literal)),
ctx_(std::move(ctx)),
answerBuffer_(std::make_shared<TokenBuffer>()),
outputChannel_(TokenStream::Channel::create(answerBuffer_)) {}

!Line: 64  warning:   when initialized here [-Wreorder]

PyObject *self;
};
template<>
void createType<RDFGoalReasoner>() {
using namespace boost::python;

!Line: 40  warning: ‘knowrob::py::RDFGoalReasonerWrap::self’ will be initialized after [-Wreorder]

explicit RDFGoalReasonerWrap(PyObject *p) : self(p), RDFGoalReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 29  warning:   base ‘knowrob::RDFGoalReasoner’ [-Wreorder]

explicit RDFGoalReasonerWrap(PyObject *p) : self(p), RDFGoalReasoner() {}
bool initializeReasoner(const PropertyTree &config) override {
return call_method<bool>(self, "initializeReasoner", config);
}

!Line: 29  warning:   when initialized here [-Wreorder]

QueryableBackendPtr backend_;
void run();
};
using ObserverManagerPtr = std::shared_ptr<ObserverManager>;

!Line: 74  warning: ‘knowrob::ObserverManager::backend_’ will be initialized after [-Wreorder]

std::unique_ptr<Impl> impl_;
QueryableBackendPtr backend_;
void run();
};

!Line: 73  warning:   ‘std::unique_ptr<knowrob::ObserverManager::Impl> knowrob::ObserverManager::impl_’ [-Wreorder]

ObserverManager::ObserverManager(const QueryableBackendPtr &backend)
: backend_(backend), impl_(std::make_unique<Impl>()) {
impl_->thread_ = std::thread(&ObserverManager::run, this);
}
ObserverManager::~ObserverManager() {

!Line: 40  warning:   when initialized here [-Wreorder]

knowrob//src/terminal.cpp

Lines 120 to 125 in d42c439

int pos_;
};
template<class T>
class TerminalCommand {
public:

!Line: 120  warning: ‘knowrob::QueryHistory::pos_’ will be initialized after [-Wreorder]

knowrob//src/terminal.cpp

Lines 119 to 124 in d42c439

unsigned long maxHistoryItems_;
int pos_;
};
template<class T>
class TerminalCommand {

!Line: 119  warning:   ‘long unsigned int knowrob::QueryHistory::maxHistoryItems_’ [-Wreorder]

explicit QueryHistory()
: selection_(data_.end()),
pos_(-1),
maxHistoryItems_(100) {}
void append(const std::string &queryString) {

!Line: 44  warning:   when initialized here [-Wreorder]

knowrob//src/terminal.cpp

Lines 600 to 605 in d42c439

uint32_t cursor_;
std::string currentQuery_;
std::string historyFile_;
QueryHistory history_;
std::map<std::string, TerminalCommand<TermPtr>, std::less<>> firstOrderCommands_;
std::map<std::string, TerminalCommand<FormulaPtr>> higherOrderCommands_;

!Line: 600  warning: ‘KnowRobTerminal::cursor_’ will be initialized after [-Wreorder]

knowrob//src/terminal.cpp

Lines 599 to 604 in d42c439

int numSolutions_;
uint32_t cursor_;
std::string currentQuery_;
std::string historyFile_;
QueryHistory history_;
std::map<std::string, TerminalCommand<TermPtr>, std::less<>> firstOrderCommands_;

!Line: 599  warning:   ‘int KnowRobTerminal::numSolutions_’ [-Wreorder]

knowrob//src/terminal.cpp

Lines 148 to 153 in d42c439

explicit KnowRobTerminal(const boost::property_tree::ptree &config)
: has_stop_request_(false),
cursor_(0),
numSolutions_(0),
kb_(KnowledgeBase::create(config)),
historyFile_("history.txt") {

!Line: 148  warning:   when initialized here [-Wreorder]

knowrob//src/terminal.cpp

Lines 599 to 604 in d42c439

int numSolutions_;
uint32_t cursor_;
std::string currentQuery_;
std::string historyFile_;
QueryHistory history_;
std::map<std::string, TerminalCommand<TermPtr>, std::less<>> firstOrderCommands_;

!Line: 599  warning: ‘KnowRobTerminal::numSolutions_’ will be initialized after [-Wreorder]

knowrob//src/terminal.cpp

Lines 597 to 602 in d42c439

KnowledgeBasePtr kb_;
std::atomic<bool> has_stop_request_;
int numSolutions_;
uint32_t cursor_;
std::string currentQuery_;
std::string historyFile_;

!Line: 597  warning:   ‘knowrob::KnowledgeBasePtr KnowRobTerminal::kb_’ [-Wreorder]

bool initializeReasoner(const PropertyTree &cfg) override { return true; }
bool evaluate(GoalPtr query) override {
auto &phi = query->formula();
auto &literals = phi->literals();
if(literals.size() != 1) {

!Line: 48  warning: unused parameter ‘cfg’ [-Wunused-parameter]

auto observer = kb_->observe(query, [&counter](const BindingsPtr &bindings) {
counter += 1;
});
FramedTripleCopy newTriple;
newTriple.setSubject(Lea_->stringForm());

!Line: 191  warning: unused parameter ‘bindings’ [-Wunused-parameter]

auto observer = kb_->observe(query, [&counter](const BindingsPtr &bindings) {
counter += 1;
});
FramedTripleCopy newTriple;
newTriple.setSubject(Lea_->stringForm());

!Line: 216  warning: unused parameter ‘bindings’ [-Wunused-parameter]

if(sols.size()==1) EXPECT_EQ(*sols[0], sol); }
#define EXPECT_NO_SOLUTION(phi) EXPECT_EQ(lookupAll(phi).size(),0)
TEST_F(KnowledgeBaseTest, undefinedNamespace) {
EXPECT_THROW(lookupAll("undefined:hasSibling(swrl_test:Fred, X)"), QueryError);

!Line: 177  warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]

static BindingsPtr lookupOne(const FormulaPtr &p) {
auto ctx = std::make_shared<QueryContext>(QUERY_FLAG_ONE_SOLUTION);
auto substitutions = lookup(p, ctx);
if(substitutions.empty()) {
return {};
}

!Line: 150  warning: ‘knowrob::BindingsPtr lookupOne(const FormulaPtr&)’ defined but not used [-Wunused-function]

static std::vector<BindingsPtr> lookupOne(const std::string &queryString) {
auto ctx = std::make_shared<QueryContext>(QUERY_FLAG_ONE_SOLUTION);
return lookup(QueryParser::parse(queryString), ctx);
}
static BindingsPtr lookupOne(const FormulaPtr &p) {

!Line: 145  warning: ‘std::vector<std::shared_ptr<const knowrob::Bindings> > lookupOne(const string&)’ defined but not used [-Wunused-function]

Copy link

github-actions bot commented Sep 9, 2024

Test Results

157 tests  ±0   157 ✅ ±0   1s ⏱️ ±0s
 20 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 6e3fc06. ± Comparison against base commit 77821c7.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant