1 /* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_MC_UDPOR_CONFIGURATION_HPP
7 #define SIMGRID_MC_UDPOR_CONFIGURATION_HPP
9 #include "src/mc/explo/udpor/EventSet.hpp"
10 #include "src/mc/explo/udpor/udpor_forward.hpp"
12 namespace simgrid::mc::udpor {
16 Configuration() = default;
17 Configuration(const Configuration&) = default;
18 Configuration& operator=(Configuration const&) = default;
19 Configuration(Configuration&&) = default;
21 inline auto begin() const { return this->events_.begin(); }
22 inline auto end() const { return this->events_.end(); }
23 inline const EventSet& get_events() const { return this->events_; }
24 inline const EventSet& get_maximal_events() const { return this->max_events_; }
26 void add_event(UnfoldingEvent*);
27 UnfoldingEvent* get_latest_event() const;
31 * @brief The most recent event added to the configuration
33 UnfoldingEvent* newest_event = nullptr;
37 * The <-maxmimal events of the configuration. These are
38 * dynamically adjusted as events are added to the configuration
40 * @invariant: Each event that is part of this set is
42 * 1. a <-maxmimal event of the configuration, in the sense that
43 * there is no event in the configuration that is "greater" than it.
44 * In UDPOR terminology, each event does not "cause" another event
46 * 2. contained in the set of events `events_` which comprise
52 void recompute_maxmimal_events(UnfoldingEvent* new_event);
55 } // namespace simgrid::mc::udpor