* src/ltltest/reduc.cc (main): More cases to test.
* src/ltlvisit/basicreduce.cc (basic_reduce_visitor::visit): Simplify the formula again after FX->XF and GX->XG permutations. This is so that formulae like GFXXa become GFa and not just GFXa. * src/ltlvisit/contain.cc (reduce_tau03_visitor): Fix a typo in the rules for i|j or i&j, resulting in missing simplifications.
This commit is contained in:
parent
b1c820af4d
commit
78d37fa126
4 changed files with 46 additions and 12 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
2007-04-19 Alexandre Duret-Lutz <adl@gnu.org>
|
2007-04-19 Alexandre Duret-Lutz <adl@gnu.org>
|
||||||
|
|
||||||
|
* src/ltltest/reduc.cc (main): More cases to test.
|
||||||
|
* src/ltlvisit/basicreduce.cc (basic_reduce_visitor::visit):
|
||||||
|
Simplify the formula again after FX->XF and GX->XG permutations.
|
||||||
|
This is so that formulae like GFXXa become GFa and not just GFXa.
|
||||||
|
* src/ltlvisit/contain.cc (reduce_tau03_visitor): Fix a typo
|
||||||
|
in the rules for i|j or i&j, resulting in missing simplifications.
|
||||||
|
|
||||||
* src/ltlvisit/contain.cc (reduce_tau03_visitor): Simplify the
|
* src/ltlvisit/contain.cc (reduce_tau03_visitor): Simplify the
|
||||||
rules for "a U b" and "a R b", an implication check is enough.
|
rules for "a U b" and "a R b", an implication check is enough.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004, 2006, 2007 Laboratoire d'Informatique de Paris
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
// et Marie Curie.
|
// Université Pierre et Marie Curie.
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -83,6 +83,28 @@ main(int argc, char** argv)
|
||||||
case 9:
|
case 9:
|
||||||
o = spot::ltl::Reduce_All;
|
o = spot::ltl::Reduce_All;
|
||||||
break;
|
break;
|
||||||
|
case 10:
|
||||||
|
o = (spot::ltl::Reduce_Basics
|
||||||
|
| spot::ltl::Reduce_Containment_Checks_Stronger);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
o = (spot::ltl::Reduce_Syntactic_Implications
|
||||||
|
| spot::ltl::Reduce_Containment_Checks_Stronger);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
o = (spot::ltl::Reduce_Basics
|
||||||
|
| spot::ltl::Reduce_Syntactic_Implications
|
||||||
|
| spot::ltl::Reduce_Containment_Checks_Stronger);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
o = (spot::ltl::Reduce_Eventuality_And_Universality
|
||||||
|
| spot::ltl::Reduce_Containment_Checks_Stronger);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
o = (spot::ltl::Reduce_Basics
|
||||||
|
| spot::ltl::Reduce_Eventuality_And_Universality
|
||||||
|
| spot::ltl::Reduce_Containment_Checks_Stronger);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2004, 2007 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||||
// et Marie Curie.
|
// et Marie Curie.
|
||||||
//
|
//
|
||||||
|
|
@ -159,11 +159,14 @@ namespace spot
|
||||||
u = dynamic_cast<unop*>(result_);
|
u = dynamic_cast<unop*>(result_);
|
||||||
if (u && u->op() == unop::X)
|
if (u && u->op() == unop::X)
|
||||||
{
|
{
|
||||||
result_ =
|
formula* res =
|
||||||
unop::instance(unop::X,
|
unop::instance(unop::X,
|
||||||
unop::instance(unop::F,
|
unop::instance(unop::F,
|
||||||
basic_reduce(u->child())));
|
basic_reduce(u->child())));
|
||||||
destroy(u);
|
destroy(u);
|
||||||
|
// FXX(a) = XXF(a) ...
|
||||||
|
result_ = basic_reduce(res);
|
||||||
|
destroy(res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,11 +201,15 @@ namespace spot
|
||||||
u = dynamic_cast<unop*>(result_);
|
u = dynamic_cast<unop*>(result_);
|
||||||
if (u && u->op() == unop::X)
|
if (u && u->op() == unop::X)
|
||||||
{
|
{
|
||||||
result_ =
|
formula* res =
|
||||||
unop::instance(unop::X,
|
unop::instance(unop::X,
|
||||||
unop::instance(unop::G,
|
unop::instance(unop::G,
|
||||||
basic_reduce(u->child())));
|
basic_reduce(u->child())));
|
||||||
destroy(u);
|
destroy(u);
|
||||||
|
// GXX(a) = XXG(a) ...
|
||||||
|
// GXF(a) = XGF(a) = GF(a) ...
|
||||||
|
result_ = basic_reduce(res);
|
||||||
|
destroy(res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@
|
||||||
#include "tgba/tgbaproduct.hh"
|
#include "tgba/tgbaproduct.hh"
|
||||||
#include "tgbaalgos/gtec/gtec.hh"
|
#include "tgbaalgos/gtec/gtec.hh"
|
||||||
#include "tgbaalgos/save.hh"
|
#include "tgbaalgos/save.hh"
|
||||||
#include "tostring.hh"
|
|
||||||
#include <iostream>
|
|
||||||
namespace spot
|
namespace spot
|
||||||
{
|
{
|
||||||
namespace ltl
|
namespace ltl
|
||||||
|
|
@ -269,7 +267,7 @@ namespace spot
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if j => i, then i|j = i
|
// if j => i, then i|j = i
|
||||||
else if (lcc->contained((*res)[i], (*res)[j]))
|
else if (lcc->contained((*res)[j], (*res)[i]))
|
||||||
{
|
{
|
||||||
destroy((*res)[j]);
|
destroy((*res)[j]);
|
||||||
(*res)[j] = 0;
|
(*res)[j] = 0;
|
||||||
|
|
@ -301,7 +299,7 @@ namespace spot
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
// if j => i, then i&j = j
|
// if j => i, then i&j = j
|
||||||
else if (lcc->contained((*res)[i], (*res)[j]))
|
else if (lcc->contained((*res)[j], (*res)[i]))
|
||||||
{
|
{
|
||||||
destroy((*res)[i]);
|
destroy((*res)[i]);
|
||||||
(*res)[i] = 0;
|
(*res)[i] = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue