genltl: add a new family from SYNTCOMP'2017

* bin/genltl.cc, spot/gen/formulas.cc, spot/gen/formulas.hh: Implement
  it.
* tests/core/genltl.test: Test it.
* NEWS: Document it.
This commit is contained in:
Maximilien Colange 2017-09-22 10:35:24 +02:00
parent 96974f7c97
commit 1689c08e09
5 changed files with 36 additions and 1 deletions

View file

@ -41,6 +41,18 @@ namespace spot
{
namespace
{
static formula
LTL_GF_equiv(int n, const std::string& a, const std::string& z)
{
std::vector<formula> gfs;
for (int i = 0; i < n; ++i)
gfs.emplace_back(formula::G(formula::F(
formula::ap(a + std::to_string(i+1)))));
return formula::Equiv(formula::And(gfs),
formula::G(formula::F(formula::ap(z))));
}
static formula
ms_example(const char* a, const char* b, int n)
{
@ -1159,6 +1171,8 @@ namespace spot
return eh_pattern(n);
case LTL_FXG_OR:
return FXG_or_n("p", n);
case LTL_GF_EQUIV:
return LTL_GF_equiv(n, "a", "z");
case LTL_GH_Q:
return Q_n("p", n);
case LTL_GH_R:
@ -1239,6 +1253,7 @@ namespace spot
"dac-patterns",
"eh-patterns",
"fxg-or",
"gf-equiv",
"gh-q",
"gh-r",
"go-theta",
@ -1296,6 +1311,7 @@ namespace spot
case LTL_EH_PATTERNS:
return 12;
case LTL_FXG_OR:
case LTL_GF_EQUIV:
case LTL_GH_Q:
case LTL_GH_R:
case LTL_GO_THETA: