Deprecate reduce() in favor of ltl_simplifier.
* src/ltlvisit/reduce.hh: Mark the file as obsolete. (reduce): Declare this function as obsolete. * src/ltlvisit/reduce.cc: Define SKIP_DEPRECATED_WARNING so we can include reduce.hh. * src/sanity/includes.test: Also use SKIP_DEPRECATED_WARNING when compiling headers. * iface/dve2/dve2check.cc, src/ltltest/equals.cc, src/ltltest/randltl.cc, src/ltltest/reduc.cc, src/tgbaalgos/ltl2tgba_fm.hh, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbatest/randtgba.cc, wrap/python/ajax/spot.in, wrap/python/spot.i: Adjust to use ltl_simplifier. * src/tgbatest/ltl2tgba.cc: Adjust to use ltl_simplifier, and replace -fr1...-fr7 options by a single -fr option. * src/tgbatest/spotlbtt.test: Adjust -fr flags accordingly. * src/tgbatest/reductgba.cc: Do not include reduce.hh.
This commit is contained in:
parent
c0085a8f30
commit
67f4e8b5ce
15 changed files with 367 additions and 166 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2008, 2009, 2010 Laboratoire de Recherche et
|
||||
// Copyright (C) 2008, 2009, 2010, 2011 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),
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
#include "ltlvisit/randomltl.hh"
|
||||
#include "ltlvisit/tostring.hh"
|
||||
#include "ltlvisit/length.hh"
|
||||
#include "ltlvisit/reduce.hh"
|
||||
#include "ltlvisit/simplify.hh"
|
||||
#include "tgbaalgos/randomgraph.hh"
|
||||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaalgos/stats.hh"
|
||||
|
|
@ -488,7 +488,9 @@ print_ar_stats(ar_stats_type& ar_stats, const std::string s)
|
|||
}
|
||||
|
||||
spot::ltl::formula*
|
||||
generate_formula(const spot::ltl::random_ltl& rl, int opt_f, int opt_s,
|
||||
generate_formula(const spot::ltl::random_ltl& rl,
|
||||
spot::ltl::ltl_simplifier& simp,
|
||||
int opt_f, int opt_s,
|
||||
int opt_l = 0, bool opt_u = false)
|
||||
{
|
||||
static std::set<std::string> unique;
|
||||
|
|
@ -504,7 +506,7 @@ generate_formula(const spot::ltl::random_ltl& rl, int opt_f, int opt_s,
|
|||
f = rl.generate(opt_f);
|
||||
if (opt_l)
|
||||
{
|
||||
spot::ltl::formula* g = reduce(f);
|
||||
spot::ltl::formula* g = simp.simplify(f);
|
||||
f->destroy();
|
||||
if (spot::ltl::length(g) < opt_l)
|
||||
{
|
||||
|
|
@ -586,6 +588,9 @@ main(int argc, char** argv)
|
|||
spot::ltl::atomic_prop_set* ap = new spot::ltl::atomic_prop_set;
|
||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||
|
||||
spot::ltl::ltl_simplifier_options simpopt(true, true, true, true, true);
|
||||
spot::ltl::ltl_simplifier simp(simpopt);
|
||||
|
||||
if (argc <= 1)
|
||||
syntax(argv[0]);
|
||||
|
||||
|
|
@ -848,7 +853,8 @@ main(int argc, char** argv)
|
|||
{
|
||||
if (opt_F)
|
||||
{
|
||||
spot::ltl::formula* f = generate_formula(rl, opt_f, opt_ec_seed,
|
||||
spot::ltl::formula* f = generate_formula(rl, simp,
|
||||
opt_f, opt_ec_seed,
|
||||
opt_l, opt_u);
|
||||
if (!f)
|
||||
exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue