about summary refs log tree commit diff
path: root/src/tools/miri/genmc-sys/cpp/include
diff options
context:
space:
mode:
authorPatrick-6 <pamu99@gmx.ch>2025-09-08 10:17:14 +0200
committerPatrick-6 <pamu99@gmx.ch>2025-09-18 10:25:41 +0200
commit2c1f1f0e9bb706d9adbb71e0bc33923c4478eb85 (patch)
treea0815ce16d02e9b211c65e9059213d27e64f7d53 /src/tools/miri/genmc-sys/cpp/include
parentfc7eb3c28d2be162dd32951811ce7852bb1a2f6a (diff)
downloadrust-2c1f1f0e9bb706d9adbb71e0bc33923c4478eb85.tar.gz
rust-2c1f1f0e9bb706d9adbb71e0bc33923c4478eb85.zip
Add GenMC estimation mode. Improve error handling and output printing.
Diffstat (limited to 'src/tools/miri/genmc-sys/cpp/include')
-rw-r--r--src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp b/src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp
index 662eb0e173c..444c9375319 100644
--- a/src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp
+++ b/src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp
@@ -31,6 +31,7 @@ enum class LogLevel : std::uint8_t;
 
 struct GenmcScalar;
 struct SchedulingResult;
+struct EstimationResult;
 struct LoadResult;
 struct StoreResult;
 struct ReadModifyWriteResult;
@@ -66,7 +67,7 @@ struct MiriGenmcShim : private GenMCDriver {
     /// `logLevel`, causing a data race. The safest way to use these functions is to call
     /// `set_log_level_raw` once, and only then start creating handles. There should not be any
     /// other (safe) way to create a `MiriGenmcShim`.
-    /* unsafe */ static auto create_handle(const GenmcParams& params)
+    /* unsafe */ static auto create_handle(const GenmcParams& params, bool estimation_mode)
         -> std::unique_ptr<MiriGenmcShim>;
 
     virtual ~MiriGenmcShim() {}
@@ -183,6 +184,11 @@ struct MiriGenmcShim : private GenMCDriver {
         return nullptr;
     }
 
+    /**** Printing and estimation mode functionality. ****/
+
+    /// Get the results of a run in estimation mode.
+    auto get_estimation_results() const -> EstimationResult;
+
   private:
     /** Increment the event index in the given thread by 1 and return the new event. */
     [[nodiscard]] inline auto inc_pos(ThreadId tid) -> Event {