Commit 6cd0912e authored by Alfons Laarman's avatar Alfons Laarman

Add verbosity option

parent 7fd3cc89
......@@ -59,7 +59,8 @@ struct Compile {
}
void compileDve( std::string in, bool ltsmin, bool ltsmin_ltl,
bool textbook ) {
bool textbook,
bool verbose ) {
if (textbook)
die( "Textbook LTL semantics not yet implemented." );
if (ltsmin && ltsmin_ltl)
......@@ -71,6 +72,7 @@ struct Compile {
std::string outfile = str::basename( in ) + ".cpp";
std::ofstream out( outfile.c_str() );
compiler.setOutput( out );
compiler.setVerbose( verbose );
compiler.print_generator();
if (ltsmin) {
......@@ -82,7 +84,7 @@ struct Compile {
void compileMurphi( std::string in );
void main() {
void main(bool verbose) {
if ( !opts.hasNext() )
die_help( "FATAL: No input file specified." );
std::string input = opts.next();
......@@ -91,7 +93,7 @@ struct Compile {
die( "FATAL: cannot open input file " + input + " for reading" );
if ( str::endsWith( input, ".dve" ) ) {
compileDve( input, o_ltsmin->boolValue(), o_ltsmin_ltl->boolValue(),
o_textbook->boolValue() );
o_textbook->boolValue(), verbose );
#ifdef HAVE_MURPHI
} else if ( str::endsWith( input, ".m" ) ) {
compileMurphi( input );
......
......@@ -455,7 +455,7 @@ struct Main {
void noMC() {
if ( opts.foundCommand() == compile.cmd_compile )
compile.main();
compile.main(o_verbose->boolValue());
if ( opts.foundCommand() == combine.cmd_combine )
combine.main();
}
......
This diff is collapsed.
......@@ -76,6 +76,7 @@ struct dve_compiler: public dve_explicit_system_t
string m_line;
ostream *m_output;
bool m_verbose;
int m_indent;
void indent() { ++m_indent; }
......@@ -213,6 +214,9 @@ struct dve_compiler: public dve_explicit_system_t
void setOutput( std::ostream &o ) {
m_output = &o;
}
void setVerbose( bool v ) {
m_verbose = v;
}
void yield_state();
void new_output_state();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment