Don't flush the stream on each new line, when writing automata.
* src/tgbaalgos/neverclaim.cc, src/tgbaalgos/dotty.cc, src/tgbaalgos/save.cc: Prefer '\n' over std::endl to speedup I/O. * src/ltltest/genltl.cc (syntax): Use '\n' too, although it won't make a big difference.
This commit is contained in:
parent
ba3108f98d
commit
9c4adf1eb4
5 changed files with 54 additions and 52 deletions
|
|
@ -47,9 +47,9 @@ namespace spot
|
|||
void
|
||||
start()
|
||||
{
|
||||
os_ << "digraph G {" << std::endl;
|
||||
os_ << " 0 [label=\"\", style=invis, height=0]" << std::endl;
|
||||
os_ << " 0 -> 1" << std::endl;
|
||||
os_ << ("digraph G {\n"
|
||||
" 0 [label=\"\", style=invis, height=0]\n"
|
||||
" 0 -> 1\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -86,7 +86,7 @@ namespace spot
|
|||
<< dd_->state_decl(automata_, s, n, si,
|
||||
escape_str(automata_->format_state(s)),
|
||||
accepting)
|
||||
<< std::endl;
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -111,7 +111,7 @@ namespace spot
|
|||
os_ << " " << in << " -> " << out << " "
|
||||
<< dd_->link_decl(automata_, in_s, in, out_s, out, si,
|
||||
escape_str(label))
|
||||
<< std::endl;
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace spot
|
|||
to_string(f_, os_);
|
||||
os_ << " */";
|
||||
}
|
||||
os_ << std::endl;
|
||||
os_ << '\n';
|
||||
init_ = automata_->get_init_state();
|
||||
}
|
||||
|
||||
|
|
@ -65,12 +65,9 @@ namespace spot
|
|||
end()
|
||||
{
|
||||
if (fi_needed_)
|
||||
os_ << " fi;" << std::endl;
|
||||
os_ << " fi;\n";
|
||||
if (accept_all_ != -1)
|
||||
{
|
||||
os_ << "accept_all:" << std::endl;
|
||||
os_ << " skip" << std::endl;
|
||||
}
|
||||
os_ << "accept_all:\n skip\n";
|
||||
os_ << "}" << std::endl;
|
||||
init_->destroy();
|
||||
}
|
||||
|
|
@ -144,13 +141,12 @@ namespace spot
|
|||
if (it->done())
|
||||
{
|
||||
if (fi_needed_ != 0)
|
||||
os_ << " fi;" << std::endl;
|
||||
os_ << " fi;\n";
|
||||
os_ << get_state_label(s, n) << ":";
|
||||
if (comments_)
|
||||
os_ << " /* " << automata_->format_state(s) << " */";
|
||||
os_ << std::endl;
|
||||
os_ << " if" << std::endl;
|
||||
os_ << " :: (0) -> goto " << get_state_label(s, n) << std::endl;
|
||||
os_ << "\n if\n :: (0) -> goto "
|
||||
<< get_state_label(s, n) << '\n';
|
||||
fi_needed_ = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -164,12 +160,11 @@ namespace spot
|
|||
else
|
||||
{
|
||||
if (fi_needed_)
|
||||
os_ << " fi;" << std::endl;
|
||||
os_ << " fi;\n";
|
||||
os_ << get_state_label(s, n) << ":";
|
||||
if (comments_)
|
||||
os_ << " /* " << automata_->format_state(s) << " */";
|
||||
os_ << std::endl;
|
||||
os_ << " if" << std::endl;
|
||||
os_ << "\n if\n";
|
||||
fi_needed_ = true;
|
||||
}
|
||||
current->destroy();
|
||||
|
|
@ -189,7 +184,7 @@ namespace spot
|
|||
to_spin_string(f, os_, true);
|
||||
f->destroy();
|
||||
state* current = si->current_state();
|
||||
os_ << ") -> goto " << get_state_label(current, out) << std::endl;
|
||||
os_ << ") -> goto " << get_state_label(current, out) << '\n';
|
||||
current->destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace spot
|
|||
start()
|
||||
{
|
||||
os_ << "acc =";
|
||||
print_acc(automata_->all_acceptance_conditions()) << ";" << std::endl;
|
||||
print_acc(automata_->all_acceptance_conditions()) << ";\n";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -61,7 +61,7 @@ namespace spot
|
|||
os_ << "\", \"";
|
||||
escape_str(os_, bdd_format_formula(d, si->current_condition()));
|
||||
os_ << "\",";
|
||||
print_acc(si->current_acceptance_conditions()) << ";" << std::endl;
|
||||
print_acc(si->current_acceptance_conditions()) << ";\n";
|
||||
dest->destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue