Implement 11 rewritings for []->.

* src/ltlvisit/simplify.cc: Here.
* doc/tl/tl.tex: Document then.
* src/ltlast/bunop.hh (as_KleenStar): New helper function.
* src/ltltest/reduccmp.test: Add more tests.
* src/ltltest/reduc.cc: Also display the resulting formula
without reduce_size_stricly.
This commit is contained in:
Alexandre Duret-Lutz 2012-04-26 17:13:56 +02:00
parent 6eb830c8ae
commit 6f46345c3a
5 changed files with 291 additions and 8 deletions

View file

@ -186,6 +186,19 @@ namespace spot
return is_bunop(f, bunop::Star);
}
/// \brief Cast \a f into a bunop if it is a Star[0..].
///
/// Return 0 otherwise.
inline
bunop*
is_KleenStar(const formula* f)
{
if (bunop* b = is_Star(f))
if (b->min() == 0 && b->max() == bunop::unbounded)
return b;
return 0;
}
}
}
#endif // SPOT_LTLAST_BUNOP_HH