Do not comment states in the never claim by default. It takes too
much time when the formula is large, and it is useless when the purpose is model-checking with Spin. * src/tgbaalgos/neverclaim.hh (never_claim_reachable): Add the comments option. * src/tgbaalgos/neverclaim.cc (never_claim_bfs, never_claim_reachable): Honor the comment option. * src/tgba/tests/ltl2tgba.cc (-N): Do not comment states. (-NN) New option to output a commented never claim.
This commit is contained in:
parent
1d8b115b83
commit
8c6a2b33d9
4 changed files with 42 additions and 13 deletions
|
|
@ -37,9 +37,10 @@ namespace spot
|
|||
{
|
||||
public:
|
||||
never_claim_bfs(const tgba_sba_proxy* a, std::ostream& os,
|
||||
const ltl::formula* f)
|
||||
const ltl::formula* f, bool comments)
|
||||
: tgba_reachable_iterator_breadth_first(a),
|
||||
os_(os), f_(f), accept_all_(-1), fi_needed_(false)
|
||||
os_(os), f_(f), accept_all_(-1), fi_needed_(false),
|
||||
comments_(comments)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -126,8 +127,9 @@ namespace spot
|
|||
{
|
||||
if (fi_needed_ != 0)
|
||||
os_ << " fi;" << std::endl;
|
||||
os_ << get_state_label(s, n) << ": ";
|
||||
os_ << "/* " << automata_->format_state(s) << " */";
|
||||
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;
|
||||
|
|
@ -145,8 +147,9 @@ namespace spot
|
|||
{
|
||||
if (fi_needed_)
|
||||
os_ << " fi;" << std::endl;
|
||||
os_ << get_state_label(s, n) << ": ";
|
||||
os_ << "/* " << automata_->format_state(s) << " */";
|
||||
os_ << get_state_label(s, n) << ":";
|
||||
if (comments_)
|
||||
os_ << " /* " << automata_->format_state(s) << " */";
|
||||
os_ << std::endl;
|
||||
os_ << " if" << std::endl;
|
||||
fi_needed_ = true;
|
||||
|
|
@ -179,14 +182,15 @@ namespace spot
|
|||
int accept_all_;
|
||||
bool fi_needed_;
|
||||
state* init_;
|
||||
bool comments_;
|
||||
};
|
||||
} // anonymous
|
||||
|
||||
std::ostream&
|
||||
never_claim_reachable(std::ostream& os, const tgba_sba_proxy* g,
|
||||
const ltl::formula* f)
|
||||
const ltl::formula* f, bool comments)
|
||||
{
|
||||
never_claim_bfs n(g, os, f);
|
||||
never_claim_bfs n(g, os, f, comments);
|
||||
n.run();
|
||||
return os;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue