// that UDPOR has marked as no longer being important)
// For now, there appear to be no "obvious" issues (although
// UDPOR's behavior is often far from obvious...)
- this->unfolding.remove(clean_up_set);
+ this->unfolding.mark_finished(clean_up_set);
}
RecordTrace UdporChecker::get_record_trace()
namespace simgrid::mc::udpor {
-void Unfolding::remove(const EventSet& events)
+void Unfolding::mark_finished(const EventSet& events)
{
for (const auto e : events) {
- remove(e);
+ mark_finished(e);
}
}
-void Unfolding::remove(const UnfoldingEvent* e)
+void Unfolding::mark_finished(const UnfoldingEvent* e)
{
if (e == nullptr) {
throw std::invalid_argument("Expected a non-null pointer to an event, but received NULL");
size_t size() const { return this->event_handles.size(); }
bool empty() const { return this->event_handles.empty(); }
- void remove(const UnfoldingEvent* e);
- void remove(const EventSet& events);
+ /**
+ * @brief Moves an event from UDPOR's global set `U` to
+ * the global set `G`
+ */
+ void mark_finished(const UnfoldingEvent* e);
+
+ /**
+ * @brief Moves all events in a set from UDPOR's global
+ * set `U` to the global set `G`
+ */
+ void mark_finished(const EventSet& events);
/// @brief Adds a new event `e` to the Unfolding if that
/// event is not equivalent to any of those already contained
REQUIRE(unfolding.empty());
}
-TEST_CASE("simgrid::mc::udpor::Unfolding: Inserting and removing events with an unfolding")
+TEST_CASE("simgrid::mc::udpor::Unfolding: Inserting and marking events with an unfolding")
{
Unfolding unfolding;
auto e1 = std::make_unique<UnfoldingEvent>(
REQUIRE(unfolding.size() == 2);
REQUIRE_FALSE(unfolding.empty());
- unfolding.remove(e1_handle);
- REQUIRE(unfolding.size() == 1);
+ unfolding.mark_finished(e1_handle);
+ REQUIRE(unfolding.size() == 2);
REQUIRE_FALSE(unfolding.empty());
- unfolding.remove(e2_handle);
- REQUIRE(unfolding.size() == 0);
- REQUIRE(unfolding.empty());
+ unfolding.mark_finished(e2_handle);
+ REQUIRE(unfolding.size() == 2);
+ REQUIRE_FALSE(unfolding.empty());
}
TEST_CASE("simgrid::mc::udpor::Unfolding: Checking all immediate conflicts restricted to an unfolding") {}
\ No newline at end of file