Skip to content

Commit a82f832

Browse files
authored
[circt-bmc] Add option to print solver output & assertions (#7974)
1 parent d53c2d0 commit a82f832

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/circt-bmc/circt-bmc.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ static cl::opt<bool>
8686
cl::desc("Run the verifier after each transformation pass"),
8787
cl::init(true), cl::cat(mainCategory));
8888

89+
static cl::opt<bool> printSolverOutput(
90+
"print-solver-output",
91+
cl::desc("Print the output (counterexample or proof) produced by the "
92+
"solver on each invocation and the assertion set that they "
93+
"prove/disprove."),
94+
cl::init(false), cl::cat(mainCategory));
95+
8996
static cl::opt<bool>
9097
verbosePassExecutions("verbose-pass-executions",
9198
cl::desc("Log executions of toplevel module passes"),
@@ -173,6 +180,7 @@ static LogicalResult executeBMC(MLIRContext &context) {
173180

174181
if (outputFormat != OutputMLIR && outputFormat != OutputSMTLIB) {
175182
LowerSMTToZ3LLVMOptions options;
183+
options.debug = printSolverOutput;
176184
pm.addPass(createLowerSMTToZ3LLVM(options));
177185
pm.addPass(createCSEPass());
178186
pm.addPass(createSimpleCanonicalizerPass());

0 commit comments

Comments
 (0)