spot 2.2.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
minato.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2009, 2013, 2014, 2015 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
29 namespace spot
30 {
37
51 class SPOT_API minato_isop
52 {
53 public:
56 minato_isop(bdd input);
60 minato_isop(bdd input, bdd vars);
67 minato_isop(bdd input_min, bdd input_max, bool);
70 bdd next();
71
72 private:
74 struct local_vars
75 {
76 // If you are following the paper, f_min and f_max correspond
77 // to the pair of BDD functions used to encode the ternary function f
78 // (see Section 3.4).
79 // Also note that f0, f0', and f0'' all share the same _max function.
80 // Likewise for f1, f1', and f1''.
81 bdd f_min, f_max;
82 // Because we need a non-recursive version of the algorithm,
83 // we had to split it in four steps (each step is separated
84 // from the other by a call to ISOP in the original algorithm).
85 enum { FirstStep, SecondStep, ThirdStep, FourthStep } step;
86 // The list of variables to factorize. This is an addition to
87 // the original algorithm.
88 bdd vars;
89 bdd v1;
90 bdd f0_min, f0_max;
91 bdd f1_min, f1_max;
92 bdd g0, g1;
93 local_vars(bdd f_min, bdd f_max, bdd vars)
94 : f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {}
95 };
96 std::stack<local_vars> todo_;
97 std::stack<bdd> cube_;
98 bdd ret_;
99 };
100 }
spot
Definition: graph.hh:32
spot::minato_isop
Generate an irredundant sum-of-products (ISOP) form of a BDD function.
Definition: minato.hh:51

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.