Skip to content

Commit 13f9305

Browse files
committed
Remove graph printing
1 parent 0c9d51a commit 13f9305

File tree

7 files changed

+1
-34
lines changed

7 files changed

+1
-34
lines changed

genmc-sys/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ mod ffi {
269269
/// If there are more executions, this method prepares for the next execution and returns `true`.
270270
fn isExplorationDone(self: Pin<&mut MiriGenMCShim>) -> bool;
271271

272-
fn printGraph(self: Pin<&mut MiriGenMCShim>);
273272
fn printEstimationResults(self: &MiriGenMCShim, elapsed_time_sec: f64);
274273
}
275274
}

genmc-sys/src_cpp/MiriInterface.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ struct MiriGenMCShim : private GenMCDriver {
113113
return --globalInstructions[tid].event;
114114
}
115115

116-
void printGraph() { GenMCDriver::debugPrintGraph(); }
117-
118116
void printEstimationResults(const double elapsed_time_sec) const
119117
{
120118
// TODO GENMC(CLEANUP): should this happen on the Rust side?

src/bin/miri.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
194194
if genmc_config.do_estimation()
195195
&& miri_genmc::run_genmc_mode(
196196
&config,
197-
genmc_config,
198197
eval_entry_once,
199198
miri_genmc::Mode::Estimation,
200199
)
@@ -205,7 +204,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
205204

206205
let return_code = miri_genmc::run_genmc_mode(
207206
&config,
208-
genmc_config,
209207
eval_entry_once,
210208
miri_genmc::Mode::Verification,
211209
)

src/concurrency/genmc/config.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use super::GenmcParams;
66
#[derive(Debug, Default, Clone)]
77
pub struct GenmcConfig {
88
pub(super) params: GenmcParams,
9-
print_exec_graphs: bool,
109
do_estimation: bool,
1110
}
1211

@@ -16,10 +15,6 @@ impl GenmcConfig {
1615
self.params.log_level_trace = true;
1716
}
1817

19-
pub fn print_exec_graphs(&self) -> bool {
20-
self.print_exec_graphs
21-
}
22-
2318
pub fn do_estimation(&self) -> bool {
2419
self.do_estimation
2520
}
@@ -49,9 +44,6 @@ impl GenmcConfig {
4944
if trimmed_arg == "log-trace" {
5045
// TODO GENMC: maybe expand to allow more control over log level?
5146
genmc_config.set_log_level_trace();
52-
} else if trimmed_arg == "print-graphs" {
53-
// TODO GENMC (DOCUMENTATION)
54-
genmc_config.print_exec_graphs = true;
5547
} else if trimmed_arg == "estimate" {
5648
// TODO GENMC (DOCUMENTATION): naming, off/on by default?
5749
genmc_config.do_estimation = true;

src/concurrency/genmc/dummy.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ impl GenmcCtx {
5151
unreachable!()
5252
}
5353

54-
pub fn print_genmc_graph(&self) {
55-
unreachable!()
56-
}
57-
5854
pub fn is_exploration_done(&self) -> bool {
5955
unreachable!()
6056
}
@@ -272,10 +268,6 @@ impl GenmcConfig {
272268
}
273269
}
274270

275-
pub fn print_exec_graphs(&self) -> bool {
276-
unreachable!()
277-
}
278-
279271
pub fn do_estimation(&self) -> bool {
280272
unreachable!()
281273
}

src/concurrency/genmc/miri_genmc.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::fmt::Display;
22
use std::rc::Rc;
33
use std::time::Instant;
44

5-
use crate::{GenmcConfig, GenmcCtx, MiriConfig};
5+
use crate::{GenmcCtx, MiriConfig};
66

77
#[derive(Clone, Copy, PartialEq, Eq)]
88
pub enum Mode {
@@ -21,7 +21,6 @@ impl Display for Mode {
2121

2222
pub fn run_genmc_mode(
2323
config: &MiriConfig,
24-
genmc_config: &GenmcConfig,
2524
eval_entry: impl Fn(Rc<GenmcCtx>) -> Option<i32>,
2625
mode: Mode,
2726
) -> Option<i32> {
@@ -32,10 +31,6 @@ pub fn run_genmc_mode(
3231
tracing::info!("Miri-GenMC loop {}", rep + 1);
3332
let result = eval_entry(genmc_ctx.clone());
3433

35-
if genmc_config.print_exec_graphs() {
36-
genmc_ctx.print_genmc_graph();
37-
}
38-
3934
// TODO GENMC (ERROR REPORTING): we currently do this here, so we can still print the GenMC graph above
4035
let return_code = result?;
4136

src/concurrency/genmc/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ impl GenmcCtx {
9999
mc.as_ref().getExploredExecutionCount()
100100
}
101101

102-
pub fn print_genmc_graph(&self) {
103-
info!("GenMC: print the Execution graph");
104-
let mut mc = self.handle.borrow_mut();
105-
let pinned_mc = mc.as_mut();
106-
pinned_mc.printGraph();
107-
}
108-
109102
/// This function determines if we should continue exploring executions or if we are done.
110103
///
111104
/// In GenMC mode, the input program should be repeatedly executed until this function returns `true` or an error is found.

0 commit comments

Comments
 (0)