Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

misc/minato.hh

Go to the documentation of this file.
00001 // Copyright (C) 2003  Laboratoire d'Informatique de Paris 6 (LIP6),
00002 // département Systèmes Répartis Coopératifs (SRC), Université Pierre
00003 // et Marie Curie.
00004 //
00005 // This file is part of Spot, a model checking library.
00006 //
00007 // Spot is free software; you can redistribute it and/or modify it
00008 // under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011 //
00012 // Spot is distributed in the hope that it will be useful, but WITHOUT
00013 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00014 // or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
00015 // License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Spot; see the file COPYING.  If not, write to the Free
00019 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00020 // 02111-1307, USA.
00021 
00022 #ifndef SPOT_MISC_MINATO_HH
00023 # define SPOT_MISC_MINATO_HH
00024 
00025 # include <bdd.h>
00026 # include <stack>
00027 
00028 namespace spot
00029 {
00049   class minato_isop
00050   {
00051   public:
00054     minato_isop(bdd input);
00058     minato_isop(bdd input, bdd vars);
00061     bdd next();
00062 
00063   private:
00065     struct local_vars
00066     {
00067       // If you are following the paper, f_min and f_max corresponds
00068       // to the pair of BDD function used to encode the ternary function `f'
00069       // (see Section 3.4).
00070       // Also note that f0, f0', and f0'' all share the same _max function.
00071       // Likewise for f1, f1', and f1''.
00072       bdd f_min, f_max;
00073       // Because we need a non-recursive version of the algorithm,
00074       // we had to split it in four step (each step is separated
00075       // from the other by a call to ISOP in the original algorithm).
00076       enum { FirstStep, SecondStep, ThirdStep, FourthStep } step;
00077       // The list of variable to factorize.  This is an addition to
00078       // the original algorithm.
00079       bdd vars;
00080       bdd v1;
00081       bdd f0_min, f0_max;
00082       bdd f1_min, f1_max;
00083       bdd g0, g1;
00084       local_vars(bdd f_min, bdd f_max, bdd vars)
00085         : f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {}
00086     };
00087     std::stack<local_vars> todo_;
00088     std::stack<bdd> cube_;
00089     bdd ret_;
00090   };
00091 }
00092 
00093 #endif // SPOT_MISC_MINATO_HH

Generated on Mon Mar 8 23:31:01 2004 for spot by doxygen 1.3.5