From fdfc73bb3217c3a9527e09075b52aecdf19de666 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Mon, 1 Apr 2019 14:11:23 +0100 Subject: Remove state contructor with constraints This constructor has been a hack and was wrongly used, use ConstraintManager instead. Allow copy-constructing states only via `ExecutionState::branch()` call. --- lib/Core/ExecutionState.cpp | 3 --- lib/Core/ExecutionState.h | 13 ++++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp index 5e95ca9b..5dfabe9e 100644 --- a/lib/Core/ExecutionState.cpp +++ b/lib/Core/ExecutionState.cpp @@ -82,9 +82,6 @@ ExecutionState::ExecutionState(KFunction *kf) : setID(); } -ExecutionState::ExecutionState(const std::vector> &assumptions) - : constraints(assumptions), ptreeNode(nullptr) {} - ExecutionState::~ExecutionState() { for (const auto &cur_mergehandler: openMergeStack){ cur_mergehandler->removeOpenState(this); diff --git a/lib/Core/ExecutionState.h b/lib/Core/ExecutionState.h index 03cad916..7be69ea7 100644 --- a/lib/Core/ExecutionState.h +++ b/lib/Core/ExecutionState.h @@ -65,6 +65,14 @@ struct StackFrame { /// @brief ExecutionState representing a path under exploration class ExecutionState { +#ifdef KLEE_UNITTEST +public: +#else +private: +#endif + // copy ctor + ExecutionState(const ExecutionState &state); + public: using stack_ty = std::vector; @@ -152,11 +160,6 @@ public: #endif // only to create the initial state explicit ExecutionState(KFunction *kf); - // XXX total hack, just used to make a state so solver can - // use on structure - explicit ExecutionState(const std::vector> &assumptions); - // copy ctor - ExecutionState(const ExecutionState &state); // no copy assignment, use copy constructor ExecutionState &operator=(const ExecutionState &) = delete; // no move ctor -- cgit 1.4.1