Configuration& operator=(Configuration const&) = default;
Configuration(Configuration&&) = default;
- inline auto begin() const { return this->events_.begin(); }
- inline auto end() const { return this->events_.end(); }
- inline const EventSet& get_events() const { return this->events_; }
- inline const EventSet& get_maximal_events() const { return this->max_events_; }
+ auto begin() const { return this->events_.begin(); }
+ auto end() const { return this->events_.end(); }
+ const EventSet& get_events() const { return this->events_; }
+ const EventSet& get_maximal_events() const { return this->max_events_; }
+ UnfoldingEvent* get_latest_event() const { return this->newest_event; }
void add_event(UnfoldingEvent*);
- UnfoldingEvent* get_latest_event() const;
private:
/**
* @brief The most recent event added to the configuration
*/
UnfoldingEvent* newest_event = nullptr;
+
+ /**
+ * @brief The events which make up this configuration
+ */
EventSet events_;
/**
void subtract(const Configuration& other);
EventSet subtracting(UnfoldingEvent* e) const;
EventSet subtracting(const EventSet& e) const;
- EventSet subtracting(const Configuration* e) const;
+ EventSet subtracting(const Configuration& e) const;
void insert(UnfoldingEvent* e);
void form_union(const EventSet&);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/mc/explo/udpor/StateManager.hpp"
+#include "xbt/asserts.h"
namespace simgrid::mc::udpor {
const auto integer_handle = this->current_handle_;
this->state_map_.insert({integer_handle, std::move(state)});
- // TODO: Check for state handle overflow!
this->current_handle_++;
+ xbt_assert(integer_handle <= this->current_handle_, "Too many states were vended out during exploration via UDPOR.\n"
+ "It's suprising you didn't run out of memory elsewhere first...\n"
+ "Please report this as a bug along with the very large program");
+
return integer_handle;
}
// TODO: Implement this
}
+bool UnfoldingEvent::operator==(const UnfoldingEvent&) const
+{
+ // TODO: Implement semantic equality
+ return false;
+}
+
} // namespace simgrid::mc::udpor
inline StateHandle get_state_id() const { return state_id; }
inline void set_state_id(StateHandle sid) { state_id = sid; }
- bool operator==(const UnfoldingEvent&) const
- {
- // TODO: Implement semantic equality
- return false;
- };
+ bool operator==(const UnfoldingEvent&) const;
private:
int id = -1;