relabel: implement relabeling of Boolean subexpressions.
* src/ltlast/multop.cc, src/ltlast/multop.hh (multop::boolean_operands, multop::boolean_count): New methods. * src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh (relabel): Take an optional relabeling_map as parameter. (relabel_bse): New. * src/ltltest/ltlrel.test, src/ltltest/ltlrel.cc: New files. * src/ltltest/Makefile.am: Add them. * src/bin/ltlfilt.cc: Add option --relabel-bool. * src/ltltest/ltlfilt.test: Test it. * NEWS: Mention it. * doc/org/ltlfilt.org: Illustrate it.
This commit is contained in:
parent
2efe52fab0
commit
87b65b9bce
11 changed files with 869 additions and 74 deletions
|
|
@ -138,6 +138,23 @@ namespace spot
|
|||
/// return a new formula <code>a|b|d</code>.
|
||||
const formula* all_but(unsigned n) const;
|
||||
|
||||
/// \brief return the number of Boolean operands in the binop.
|
||||
///
|
||||
/// For instance if \c f <code>a|b|Xc|Gd</code>, this
|
||||
/// returns 2.
|
||||
unsigned boolean_count() const;
|
||||
|
||||
/// \brief return the Boolean part of the binop.
|
||||
///
|
||||
/// For instance if \c f <code>a|b|Xc|Gd</code>, this
|
||||
/// returns <code>a|b</code>. Return 0 if there is no
|
||||
/// Boolean operand.
|
||||
///
|
||||
/// If \a width is not null, it is filled with the number
|
||||
/// of Boolean operands extracted (i.e., the result
|
||||
/// of boolean_count())
|
||||
const formula* boolean_operands(unsigned* width = 0) const;
|
||||
|
||||
/// Get the type of this operator.
|
||||
type op() const;
|
||||
/// Get the type of this operator, as a string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue