spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
minato.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2009, 2013 Laboratoire de Recherche et Développement
3 // 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 #ifndef SPOT_MISC_MINATO_HH
24 # define SPOT_MISC_MINATO_HH
25 
26 # include "common.hh"
27 # include <bdd.h>
28 # include <stack>
29 
30 namespace spot
31 {
38 
52  class SPOT_API minato_isop
53  {
54  public:
57  minato_isop(bdd input);
61  minato_isop(bdd input, bdd vars);
64  bdd next();
65 
66  private:
68  struct local_vars
69  {
70  // If you are following the paper, f_min and f_max correspond
71  // to the pair of BDD functions used to encode the ternary function f
72  // (see Section 3.4).
73  // Also note that f0, f0', and f0'' all share the same _max function.
74  // Likewise for f1, f1', and f1''.
75  bdd f_min, f_max;
76  // Because we need a non-recursive version of the algorithm,
77  // we had to split it in four steps (each step is separated
78  // from the other by a call to ISOP in the original algorithm).
79  enum { FirstStep, SecondStep, ThirdStep, FourthStep } step;
80  // The list of variables to factorize. This is an addition to
81  // the original algorithm.
82  bdd vars;
83  bdd v1;
84  bdd f0_min, f0_max;
85  bdd f1_min, f1_max;
86  bdd g0, g1;
87  local_vars(bdd f_min, bdd f_max, bdd vars)
88  : f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {}
89  };
90  std::stack<local_vars> todo_;
91  std::stack<bdd> cube_;
92  bdd ret_;
93  };
94 }
95 
96 #endif // SPOT_MISC_MINATO_HH

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:11 for spot by doxygen 1.8.4