Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add ExtensionSetCalculator files
authorMaxwell Pirtle <maxwellpirtle@gmail.com>
Mon, 20 Mar 2023 08:15:18 +0000 (09:15 +0100)
committerMaxwell Pirtle <maxwellpirtle@gmail.com>
Wed, 5 Apr 2023 08:37:20 +0000 (10:37 +0200)
MANIFEST.in
src/mc/explo/udpor/ExtensionSetCalculator.cpp [new file with mode: 0644]
src/mc/explo/udpor/ExtensionSetCalculator.hpp [new file with mode: 0644]
tools/cmake/DefinePackages.cmake

index ce4e415..8ddb3a7 100644 (file)
@@ -2188,6 +2188,8 @@ include src/mc/explo/udpor/Configuration_test.cpp
 include src/mc/explo/udpor/EventSet.cpp
 include src/mc/explo/udpor/EventSet.hpp
 include src/mc/explo/udpor/EventSet_test.cpp
+include src/mc/explo/udpor/ExtensionSetCalculator.cpp
+include src/mc/explo/udpor/ExtensionSetCalculator.hpp
 include src/mc/explo/udpor/History.cpp
 include src/mc/explo/udpor/History.hpp
 include src/mc/explo/udpor/History_test.cpp
diff --git a/src/mc/explo/udpor/ExtensionSetCalculator.cpp b/src/mc/explo/udpor/ExtensionSetCalculator.cpp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/mc/explo/udpor/ExtensionSetCalculator.hpp b/src/mc/explo/udpor/ExtensionSetCalculator.hpp
new file mode 100644 (file)
index 0000000..7a71285
--- /dev/null
@@ -0,0 +1,35 @@
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SIMGRID_MC_UDPOR_EVENT_SET_HPP
+#define SIMGRID_MC_UDPOR_EVENT_SET_HPP
+
+#include "src/mc/explo/udpor/udpor_forward.hpp"
+#include "src/mc/transition/Transition.hpp"
+#include "src/mc/transition/TransitionActorJoin.hpp"
+#include "src/mc/transition/TransitionAny.hpp"
+#include "src/mc/transition/TransitionComm.hpp"
+#include "src/mc/transition/TransitionObjectAccess.hpp"
+#include "src/mc/transition/TransitionRandom.hpp"
+#include "src/mc/transition/TransitionSynchro.hpp"
+
+namespace simgrid::mc::udpor {
+
+/**
+ * @brief Computes incrementally the portion of the extension set for a new configuration `C`
+ */
+struct ExtensionSetCalculator final {
+private:
+  static EventSet partially_extend_CommSend(const Configuration&, std::shared_ptr<CommSendTransition>);
+  static EventSet partially_extend_CommReceive(const Configuration&, std::shared_ptr<CommReceiveTransition>);
+  static EventSet partially_extend_CommWait(const Configuration&, std::shared_ptr<CommWaitTransition>);
+  static EventSet partially_extend_CommTest(const Configuration&, std::shared_ptr<CommTestTransition>);
+
+public:
+  static EventSet partially_extend(const Configuration&, const Unfolding&, const std::shared_ptr<Transition> action);
+};
+
+} // namespace simgrid::mc::udpor
+#endif
index 01e6e54..5cd6e8a 100644 (file)
@@ -568,6 +568,8 @@ set(MC_SRC_STATEFUL
   src/mc/explo/udpor/Configuration.cpp
   src/mc/explo/udpor/EventSet.cpp
   src/mc/explo/udpor/EventSet.hpp
+  src/mc/explo/udpor/ExtensionSetCalculator.cpp
+  src/mc/explo/udpor/ExtensionSetCalculator.hpp
   src/mc/explo/udpor/History.cpp
   src/mc/explo/udpor/History.hpp
   src/mc/explo/udpor/maximal_subsets_iterator.cpp