spot 2.11.5.dev
minato.hh
1// -*- coding: utf-8 -*-
2// Copyright (C) 2009, 2013-2015, 2019 Laboratoire de Recherche et
3// Développement de l'Epita (LRDE).
4// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
5// département Systèmes Répartis Coopératifs (SRC), Université Pierre
6// et Marie Curie.
7//
8// This file is part of Spot, a model checking library.
9//
10// Spot is free software; you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation; either version 3 of the License, or
13// (at your option) any later version.
14//
15// Spot is distributed in the hope that it will be useful, but WITHOUT
16// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18// License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23#pragma once
24
25#include <spot/misc/common.hh>
26#include <bddx.h>
27#include <stack>
28
29namespace spot
30{
37 class SPOT_API minato_isop
38 {
39 public:
42 minato_isop(bdd input);
46 minato_isop(bdd input, bdd vars);
53 minato_isop(bdd input_min, bdd input_max, bool);
56 bdd next();
57
58 private:
60 struct local_vars
61 {
62 // If you are following the paper, f_min and f_max correspond
63 // to the pair of BDD functions used to encode the ternary function f
64 // (see Section 3.4).
65 // Also note that f0, f0', and f0'' all share the same _max function.
66 // Likewise for f1, f1', and f1''.
67 bdd f_min, f_max;
68 // Because we need a non-recursive version of the algorithm,
69 // we had to split it in four steps (each step is separated
70 // from the other by a call to ISOP in the original algorithm).
71 enum { FirstStep, SecondStep, ThirdStep, FourthStep } step;
72 // The list of variables to factorize. This is an addition to
73 // the original algorithm.
74 bdd vars;
75 bdd v1;
76 bdd f0_min, f0_max;
77 bdd f1_min, f1_max;
78 bdd g0, g1;
79 local_vars(bdd f_min, bdd f_max, bdd vars) noexcept
80 : f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {}
81 };
82 std::stack<local_vars> todo_;
83 std::stack<bdd> cube_;
84 bdd ret_;
85 };
86}
Generate an irredundant sum-of-products (ISOP) form of a BDD function.
Definition: minato.hh:38
minato_isop(bdd input)
Conctructor.
minato_isop(bdd input, bdd vars)
Conctructor.
minato_isop(bdd input_min, bdd input_max, bool)
Conctructor.
bdd next()
Compute the next sum term of the ISOP form. Return bddfalse when all terms have been output.
Definition: automata.hh:27

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.4