randomltl.hh

Go to the documentation of this file.
00001 // Copyright (C) 2010 Laboratoire de Recherche et Développement de
00002 // l'Epita (LRDE).
00003 // Copyright (C) 2005  Laboratoire d'Informatique de Paris 6 (LIP6),
00004 // département Systèmes Répartis Coopératifs (SRC), Université Pierre
00005 // et Marie Curie.
00006 //
00007 // This file is part of Spot, a model checking library.
00008 //
00009 // Spot is free software; you can redistribute it and/or modify it
00010 // under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation; either version 2 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // Spot is distributed in the hope that it will be useful, but WITHOUT
00015 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00016 // or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
00017 // License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with Spot; see the file COPYING.  If not, write to the Free
00021 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00022 // 02111-1307, USA.
00023 
00024 #ifndef SPOT_LTLVISIT_RANDOMLTL_HH
00025 # define SPOT_LTLVISIT_RANDOMLTL_HH
00026 
00027 #include "apcollect.hh"
00028 #include <iosfwd>
00029 
00030 namespace spot
00031 {
00032   namespace ltl
00033   {
00034 
00047     class random_ltl
00048     {
00049     public:
00051       random_ltl(const atomic_prop_set* ap);
00052       ~random_ltl();
00053 
00064       formula* generate(int n) const;
00065 
00068       std::ostream& dump_priorities(std::ostream& os) const;
00069 
00107       const char* parse_options(char* options);
00108 
00110       const atomic_prop_set*
00111       ap() const
00112       {
00113         return ap_;
00114       }
00115 
00116     protected:
00117       void update_sums();
00118 
00119     private:
00120       struct op_proba
00121       {
00122         const char* name;
00123         int min_n;
00124         double proba;
00125         typedef formula* (*builder)(const random_ltl* rl, int n);
00126         builder build;
00127         void setup(const char* name, int min_n, builder build);
00128       };
00129       op_proba* proba_;
00130       double total_1_;
00131       op_proba* proba_2_;
00132       double total_2_;
00133       double total_2_and_more_;
00134       const atomic_prop_set* ap_;
00135     };
00136   }
00137 }
00138 
00139 
00140 #endif // SPOT_LTLVIST_RANDOMLTL_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Fri Apr 16 09:40:33 2010 for spot by doxygen 1.6.3