spot  0.9.2
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 2 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 Spot; see the file COPYING. If not, write to the Free
22 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 // 02111-1307, USA.
24 
25 #ifndef SPOT_LTLVISIT_RANDOMLTL_HH
26 # define SPOT_LTLVISIT_RANDOMLTL_HH
27 
28 #include "apcollect.hh"
29 #include <iosfwd>
30 
31 namespace spot
32 {
33  namespace ltl
34  {
35 
39  {
40  public:
41  random_formula(unsigned proba_size,
42  const atomic_prop_set* ap):
43  proba_size_(proba_size), proba_(new op_proba[proba_size_]), ap_(ap)
44  {
45  }
46 
47  virtual ~random_formula()
48  {
49  delete[] proba_;
50  }
51 
53  const atomic_prop_set*
54  ap() const
55  {
56  return ap_;
57  }
58 
65  const formula* generate(int n) const;
66 
69  std::ostream& dump_priorities(std::ostream& os) const;
70 
78  const char* parse_options(char* options);
79 
80  protected:
81  void update_sums();
82 
83  struct op_proba
84  {
85  const char* name;
86  int min_n;
87  double proba;
88  typedef const formula* (*builder)(const random_formula* rl, int n);
90  void setup(const char* name, int min_n, builder build);
91  };
92  unsigned proba_size_;
94  double total_1_;
96  double total_2_;
100  };
101 
102 
116  {
117  public:
149  random_ltl(const atomic_prop_set* ap);
150 
151  protected:
152  void setup_proba_();
153  random_ltl(int size, const atomic_prop_set* ap);
154  };
155 
166  {
167  public:
194  };
195 
206  {
207  public:
235 
237  };
238 
246  class random_psl: public random_ltl
247  {
248  public:
291  random_psl(const atomic_prop_set* ap);
292 
295  };
296 
297 
298 
299  }
300 }
301 
302 
303 #endif // SPOT_LTLVIST_RANDOMLTL_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Jul 2 2012 17:35:47 for spot by doxygen 1.8.1.1