autfilt: add a --simplify-exclusive-ap option
* src/bin/autfilt.cc: Add option. * src/ltlvisit/exclusive.cc, src/ltlvisit/exclusive.hh: implement it. * src/tgbatest/exclusive.test: Test it. * src/misc/minato.cc, src/misc/minato.hh: Add an interface to simplify a Boolean function with don't care.
This commit is contained in:
parent
25de479e12
commit
75328f1a21
6 changed files with 115 additions and 18 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2013, 2014 Laboratoire de Recherche et
|
||||
// Copyright (C) 2009, 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
|
|
@ -28,8 +28,12 @@ namespace spot
|
|||
{
|
||||
|
||||
minato_isop::minato_isop(bdd input)
|
||||
: ret_(bddfalse)
|
||||
: minato_isop(input, bdd_support(input))
|
||||
{
|
||||
}
|
||||
|
||||
minato_isop::minato_isop(bdd input, bdd vars)
|
||||
: ret_(bddfalse)
|
||||
{
|
||||
// If INPUT has the form a&b&c&(binary function) we want to
|
||||
// compute the ISOP of the only binary and prepend a&b&c latter.
|
||||
|
|
@ -39,14 +43,23 @@ namespace spot
|
|||
// original algorithm, because in many cases we are trying to
|
||||
// build ISOPs out of formulae that are already cubes.
|
||||
cube_.push(bdd_satprefix(input));
|
||||
todo_.emplace(input, input, bdd_support(input));
|
||||
todo_.emplace(input, input, vars);
|
||||
}
|
||||
|
||||
minato_isop::minato_isop(bdd input, bdd vars)
|
||||
minato_isop::minato_isop(bdd input_min, bdd input_max, bool)
|
||||
: ret_(bddfalse)
|
||||
{
|
||||
cube_.push(bdd_satprefix(input));
|
||||
todo_.emplace(input, input, vars);
|
||||
if (input_min == input_max)
|
||||
{
|
||||
cube_.push(bdd_satprefix(input_min));
|
||||
input_max = input_min;
|
||||
}
|
||||
else
|
||||
{
|
||||
cube_.push(bddtrue);
|
||||
}
|
||||
bdd common = input_min & input_max;
|
||||
todo_.emplace(input_min, input_max, bdd_support(common));
|
||||
}
|
||||
|
||||
bdd
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2013, 2014 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
// Copyright (C) 2009, 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
|
|
@ -58,6 +58,13 @@ namespace spot
|
|||
/// \arg input The BDD function to translate in ISOP.
|
||||
/// \arg vars The set of BDD variables to factorize in \a input.
|
||||
minato_isop(bdd input, bdd vars);
|
||||
/// \brief Conctructor.
|
||||
///
|
||||
/// This version allow some flexibility in computing the ISOP.
|
||||
/// the result must be within \a input_min and \a input_max.
|
||||
/// \arg input_min The minimum BDD function to translate in ISOP.
|
||||
/// \arg input_max The maximum BDD function to translate in ISOP.
|
||||
minato_isop(bdd input_min, bdd input_max, bool);
|
||||
/// \brief Compute the next sum term of the ISOP form.
|
||||
/// Return \c bddfalse when all terms have been output.
|
||||
bdd next();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue