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:
Alexandre Duret-Lutz 2015-03-30 11:37:32 +02:00
parent 25de479e12
commit 75328f1a21
6 changed files with 115 additions and 18 deletions

View file

@ -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