introduce op::strong_X
This was prompted by reports by Andrew Wells and Yong Li. * NEWS, doc/tl/tl.tex: Document the changes. * THANKS: Add Andrew. * bin/ltlfilt.cc: Match --ltl before --from-ltlf if needed. * spot/parsetl/parsedecl.hh, spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Parse X[!]. * spot/tl/formula.cc, spot/tl/formula.hh: Declare the new operator. * spot/tl/ltlf.cc: Adjust to handle op::X and op::strong_X correctly. * spot/tl/dot.cc, spot/tl/mark.cc, spot/tl/mutation.cc, spot/tl/print.cc, spot/tl/simplify.cc, spot/tl/snf.cc, spot/tl/unabbrev.cc, spot/twa/formula2bdd.cc, spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2tgba_fm.cc, tests/core/ltlgrind.test, tests/core/rand.test, tests/core/sugar.test, tests/python/randltl.ipynb: Adjust. * tests/core/ltlfilt.test, tests/core/sugar.test, tests/core/utf8.test: More tests.
This commit is contained in:
parent
b91ba58bbe
commit
be389c5c25
26 changed files with 434 additions and 134 deletions
|
|
@ -57,8 +57,22 @@
|
|||
#include <cstddef>
|
||||
#include <limits>
|
||||
|
||||
// The strong_X operator was introduced in Spot 2.8.2 to fix an issue
|
||||
// with from_ltlf(). As adding a new operator is a backward
|
||||
// incompatibility, causing new warnings from the compiler.
|
||||
#if defined(SPOT_BUILD) or defined(SPOT_USES_STRONG_X)
|
||||
// Use #if SPOT_HAS_STRONG_X in code that need to be backward
|
||||
// compatible with older Spot versions.
|
||||
# define SPOT_HAS_STRONG_X 1
|
||||
// You me #define SPOT_WANT_STRONG_X yourself before including
|
||||
// this file to force the use of STRONG_X
|
||||
# define SPOT_WANT_STRONG_X 1
|
||||
#endif
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
||||
|
||||
/// \ingroup tl_essentials
|
||||
/// \brief Operator types
|
||||
enum class op: uint8_t
|
||||
|
|
@ -98,6 +112,9 @@ namespace spot
|
|||
Star, ///< Star
|
||||
FStar, ///< Fustion Star
|
||||
first_match, ///< first_match(sere)
|
||||
#ifdef SPOT_WANT_STRONG_X
|
||||
strong_X, ///< strong Next
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef SWIG
|
||||
|
|
@ -899,6 +916,22 @@ namespace spot
|
|||
return nested_unop_range(op::X, op::Or /* unused */, level, level, f);
|
||||
}
|
||||
|
||||
#if SPOT_WANT_STRONG_X
|
||||
/// \brief Construct a strong_X
|
||||
/// @{
|
||||
SPOT_DEF_UNOP(strong_X);
|
||||
/// @}
|
||||
|
||||
/// \brief Construct a strong_X[n]
|
||||
///
|
||||
/// strong_X[3]f = strong_X strong_X strong_X f
|
||||
static formula strong_X(unsigned level, const formula& f)
|
||||
{
|
||||
return nested_unop_range(op::strong_X, op::Or /* unused */,
|
||||
level, level, f);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// \brief Construct an F
|
||||
/// @{
|
||||
SPOT_DEF_UNOP(F);
|
||||
|
|
@ -1662,6 +1695,9 @@ namespace spot
|
|||
return *this;
|
||||
case op::Not:
|
||||
case op::X:
|
||||
#if SPOT_HAS_STRONG_X
|
||||
case op::strong_X:
|
||||
#endif
|
||||
case op::F:
|
||||
case op::G:
|
||||
case op::Closure:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue