Skip to content

ebmc: --smt-netlist and --dot-netlist now honor --outfile #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* SystemVerilog: streaming concatenation {<<{...}} and {>>{...}}
* SystemVerilog: set membership operator
* SystemVerilog: named sequences
* ebmc: --smt-netlist and --dot-netlist now honor --outfile

# EBMC 5.3

Expand Down
24 changes: 16 additions & 8 deletions src/ebmc/ebmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Author: Daniel Kroening, [email protected]
#include "ic3_engine.h"
#include "liveness_to_safety.h"
#include "neural_liveness.h"
#include "output_file.h"
#include "property_checker.h"
#include "random_traces.h"
#include "ranking_function.h"
Expand Down Expand Up @@ -274,9 +275,12 @@ int ebmc_parse_optionst::doit()
netlistt netlist;
if(ebmc_base.make_netlist(netlist))
return 1;
std::cout << "digraph netlist {\n";
netlist.output_dot(std::cout);
std::cout << "}\n";
auto filename =
cmdline.isset("outfile") ? cmdline.get_value("outfile") : "-";
output_filet outfile{filename};
outfile.stream() << "digraph netlist {\n";
netlist.output_dot(outfile.stream());
outfile.stream() << "}\n";
return 0;
}

Expand All @@ -285,11 +289,15 @@ int ebmc_parse_optionst::doit()
netlistt netlist;
if(ebmc_base.make_netlist(netlist))
return 1;
std::cout << "-- Generated by EBMC " << EBMC_VERSION << '\n';
std::cout << "-- Generated from "
<< ebmc_base.transition_system.main_symbol->name << '\n';
std::cout << '\n';
netlist.output_smv(std::cout);
auto filename =
cmdline.isset("outfile") ? cmdline.get_value("outfile") : "-";
output_filet outfile{filename};
outfile.stream() << "-- Generated by EBMC " << EBMC_VERSION << '\n';
outfile.stream() << "-- Generated from "
<< ebmc_base.transition_system.main_symbol->name
<< '\n';
outfile.stream() << '\n';
netlist.output_smv(outfile.stream());
return 0;
}

Expand Down
Loading