Add support for W (weak until) and M (strong release) operators.

* src/ltlast/binop.cc, src/ltlast/binop.cc: Add support for
these new operators.
* src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Parse them.
* src/ltltest/reduccmp.test: Add new tests for W and M.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/contain.cc,
src/ltlvisit/lunabbrev.cc, src/ltlvisit/nenoform.cc,
src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh,
src/ltlvisit/reduce.cc, src/ltlvisite/simpfg.cc,
src/ltlvisit/simpfg.hh, src/ltlvisit/syntimpl.cc,
src/ltlvisit/tostring.cc, src/tgba/formula2bdd.cc,
src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc:
Add support for W and M.
* src/tgbatest/ltl2neverclaim.test: Test never claim output
using LBTT, this is more thorough.  Also we cannot use -N
any more in the spotlbtt.test.
* src/tgbatests/ltl2tgba.cc: Define M and W for ELTL.
* src/tgbatest/ltl2neverclaim.test: Test W and M, and use
-DS instead of -N, because lbtt-translate does not want
to translate these operators for tools that masquerade as Spin.
This commit is contained in:
Alexandre Duret-Lutz 2010-04-07 10:44:07 +02:00
parent 35a57c6dff
commit 0fc0ea3166
25 changed files with 584 additions and 123 deletions

View file

@ -1,4 +1,4 @@
// Copyright (C) 2009 Laboratoire de Recherche et Développement
// Copyright (C) 2009, 2010 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -108,7 +108,13 @@ namespace spot
// Both operand must be purely eventual, unlike in
// the proceedings of Concur'00. (The revision of
// the paper available at
// http://www1.bell-labs.com/project/TMP/ is fixed.)
// http://www.bell-labs.com/project/TMP/ is fixed.)
|| (recurse_ev(f1) && recurse_ev(f2)))
eventual = true;
return;
case binop::W:
universal = recurse_un(f1) && recurse_un(f2);
if ((f2 == constant::true_instance())
|| (recurse_ev(f1) && recurse_ev(f2)))
eventual = true;
return;
@ -118,6 +124,12 @@ namespace spot
|| (recurse_un(f1) && recurse_un(f2)))
universal = true;
return;
case binop::M:
eventual = recurse_ev(f1) && recurse_ev(f2);
if ((f2 == constant::false_instance())
|| (recurse_un(f1) && recurse_un(f2)))
universal = true;
return;
}
/* Unreachable code. */
assert(0);
@ -263,6 +275,7 @@ namespace spot
case binop::Implies:
return;
case binop::U:
case binop::W:
if (syntactic_implication(f, f2))
result_ = true;
return;
@ -285,6 +298,25 @@ namespace spot
&& syntactic_implication(f, f2))
result_ = true;
return;
case binop::M:
if (fb && fb->op() == binop::M)
if (syntactic_implication(fb->first(), f1) &&
syntactic_implication(fb->second(), f2))
{
result_ = true;
return;
}
if (fu && fu->op() == unop::F)
if (f2 == constant::true_instance() &&
syntactic_implication(fu->child(), f1))
{
result_ = true;
return;
}
if (syntactic_implication(f, f1)
&& syntactic_implication(f, f2))
result_ = true;
return;
}
/* Unreachable code. */
assert(0);
@ -480,6 +512,26 @@ namespace spot
&& syntactic_implication(f2, f))
result_ = true;
return;
case binop::W:
/* (a < c) && (c < d) => a W b < c W d */
if (fb && fb->op() == binop::W)
if (syntactic_implication(f1, fb->first()) &&
syntactic_implication(f2, fb->second()))
{
result_ = true;
return;
}
if (fu && fu->op() == unop::G)
if (f2 == constant::false_instance() &&
syntactic_implication(f1, fu->child()))
{
result_ = true;
return;
}
if (syntactic_implication(f1, f)
&& syntactic_implication(f2, f))
result_ = true;
return;
case binop::R:
if (fu && fu->op() == unop::G)
if (f1 == constant::false_instance() &&
@ -491,6 +543,17 @@ namespace spot
if (syntactic_implication(f2, f))
result_ = true;
return;
case binop::M:
if (fu && fu->op() == unop::F)
if (f2 == constant::true_instance() &&
syntactic_implication(f1, fu->child()))
{
result_ = true;
return;
}
if (syntactic_implication(f2, f))
result_ = true;
return;
}
/* Unreachable code. */
assert(0);