Improve SCC simplification by removing implied acceptance conditions.
Spot 0.7.1 used to need 190 acceptance conditions to translate the 188 literature formulae. With this patch we are down to 185. That's not an impressive, but there are only ~20 formulae that require more than 1 acceptance conditions; hence little room for improvement. * src/misc/bddlt.hh (bdd_hash): New function. * src/misc/accconv.hh, src/misc/accconv.cc: New files. * src/misc/Makefile.am: Add them. * src/tgbaalgos/scc.cc (scc_map::build_map): Adjust to record all combination of acceptance conditions occurring in a SCC. * src/tgbaalgos/scc.hh (scc_map::scc::useful_acc): Update description. * src/tgbaalgos/sccfilter.cc (scc_filter): Simplify acceptance conditions that are always implied by another acceptance conditions. Previously, we only removed acceptance conditions that where always present in accepting SCCs. * src/tgbatest/sccsimpl.test: New file. * src/tgbatest/Makefile.am (TESTS): Add it.
This commit is contained in:
parent
9d232af82f
commit
d9fc75e94e
10 changed files with 401 additions and 28 deletions
53
src/misc/accconv.hh
Normal file
53
src/misc/accconv.hh
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
// Copyright (C) 2011 Laboratoire de Recherche et Developpement de
|
||||
// l'Epita (LRDE)
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
// Spot is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Spot; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_MISC_ACCCONV_HH
|
||||
# define SPOT_MISC_ACCCONV_HH
|
||||
|
||||
#include <bdd.h>
|
||||
#include "misc/hash.hh"
|
||||
#include "misc/bddlt.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
/// \brief Help class to convert between acceptance conditions to
|
||||
/// other BDD formats.
|
||||
class acceptance_convertor
|
||||
{
|
||||
public:
|
||||
acceptance_convertor(bdd allneg)
|
||||
: allneg_(allneg)
|
||||
{
|
||||
}
|
||||
|
||||
bdd as_positive_product(bdd acc);
|
||||
|
||||
bdd as_full_product(bdd acc);
|
||||
|
||||
protected:
|
||||
bdd allneg_;
|
||||
typedef Sgi::hash_map<bdd, bdd, bdd_hash> bdd_cache_t;
|
||||
bdd_cache_t pos_prod_cache_;
|
||||
bdd_cache_t full_prod_cache_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // SPOT_MISC_ACCCONV_HH
|
||||
Loading…
Add table
Add a link
Reference in a new issue