spot  1.0
randomltl.hh
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et
3 // Développement de l'Epita (LRDE).
4 // Copyright (C) 2005 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_LTLVISIT_RANDOMLTL_HH
24 # define SPOT_LTLVISIT_RANDOMLTL_HH
25 
26 #include "apcollect.hh"
27 #include <iosfwd>
28 
29 namespace spot
30 {
31  namespace ltl
32  {
33 
37  {
38  public:
39  random_formula(unsigned proba_size,
40  const atomic_prop_set* ap):
41  proba_size_(proba_size), proba_(new op_proba[proba_size_]), ap_(ap)
42  {
43  }
44 
45  virtual ~random_formula()
46  {
47  delete[] proba_;
48  }
49 
51  const atomic_prop_set*
52  ap() const
53  {
54  return ap_;
55  }
56 
63  const formula* generate(int n) const;
64 
67  std::ostream& dump_priorities(std::ostream& os) const;
68 
76  const char* parse_options(char* options);
77 
78  protected:
79  void update_sums();
80 
81  struct op_proba
82  {
83  const char* name;
84  int min_n;
85  double proba;
86  typedef const formula* (*builder)(const random_formula* rl, int n);
88  void setup(const char* name, int min_n, builder build);
89  };
90  unsigned proba_size_;
92  double total_1_;
94  double total_2_;
98  };
99 
100 
114  {
115  public:
147  random_ltl(const atomic_prop_set* ap);
148 
149  protected:
150  void setup_proba_();
151  random_ltl(int size, const atomic_prop_set* ap);
152  };
153 
164  {
165  public:
192  };
193 
204  {
205  public:
233 
235  };
236 
244  class random_psl: public random_ltl
245  {
246  public:
289  random_psl(const atomic_prop_set* ap);
290 
293  };
294 
295 
296 
297  }
298 }
299 
300 
301 #endif // SPOT_LTLVIST_RANDOMLTL_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Sat Oct 27 2012 09:34:32 for spot by doxygen 1.8.1.2