Add a string version of to_lbt_string().
* src/ltlvisit/lbt.cc, src/ltlvisit/lbt.hh (to_lbt_string): New string version.
This commit is contained in:
parent
902dadb898
commit
0fed46b796
2 changed files with 21 additions and 0 deletions
|
|
@ -205,5 +205,13 @@ namespace spot
|
|||
f->accept(v);
|
||||
return os;
|
||||
}
|
||||
|
||||
std::string
|
||||
to_lbt_string(const formula* f)
|
||||
{
|
||||
std::ostringstream os;
|
||||
to_lbt_string(f, os);
|
||||
return os.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <ltlast/formula.hh>
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -44,6 +45,18 @@ namespace spot
|
|||
/// \param os The stream where it should be output.
|
||||
std::ostream&
|
||||
to_lbt_string(const formula* f, std::ostream& os);
|
||||
|
||||
/// \brief Output an LTL formula as a string in LBT's format.
|
||||
///
|
||||
/// The formula must be an LTL formula (ELTL and PSL operators
|
||||
/// are not supported). The M and W operator will be output
|
||||
/// as-is, because this is accepted by LBTT, however if you
|
||||
/// plan to use the output with other tools, you should probably
|
||||
/// rewrite these two operators using unabbreviate_wm().
|
||||
///
|
||||
/// \param f The formula to translate.
|
||||
std::string
|
||||
to_lbt_string(const formula* f);
|
||||
/// @}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue