spot  1.99.4a
porinfos.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2015 Laboratoire de Recherche et
3 // Developpement de l'Epita (LRDE)
4 //
5 // This file is part of Spot, a model checking library.
6 //
7 // Spot is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Spot is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20 #pragma once
21 
22 #include <vector>
23 #include <unordered_set>
24 #include <iterator>
25 #include <iostream>
26 #include <algorithm>
27 #include <assert.h>
28 #include "spins.hh"
29 #include "misc/common.hh"
30 
31 namespace spot
32 {
33  // \brief Store statistics about partial order
34  class SPOT_API porinfos_stats
35  {
36  public:
38 
39  void cumul(unsigned red, unsigned en);
40 
41  void dump();
42 
43  private:
44  unsigned red_;
45  unsigned en_;
46  unsigned cumul_;
47  unsigned min_red_;
48  unsigned max_red_;
49  unsigned min_en_;
50  unsigned max_en_;
51  };
52 
53  // \brief Store informations about partial order
54  class SPOT_API porinfos
55  {
56  public:
57  porinfos(const spins_interface* si);
58 
59  std::vector<bool> compute_reduced_set(const std::vector<int>& enabled,
60  const int* for_spins_state);
61 
62  inline bool non_maybecoenabled(int t1, int t2);
63 
64  int transitions();
65 
66  int variables();
67 
68  void dump_read_dependency();
69 
70  void dump_write_dependency();
71 
72  void dump_nes_guards();
73 
74  void dump_mbc_guards();
75 
76  porinfos_stats& stats();
77 
78  private:
79  const spins_interface* d_;
80  int transitions_;
81  int variables_;
82  int guards_;
83  porinfos_stats stats_;
84  std::vector<std::vector<bool>> m_read;
85  std::vector<std::vector<bool>> m_write;
86  std::vector<std::vector<bool>> m_nes;
87  std::vector<std::vector<bool>> m_mbc;
88  std::vector<std::vector<int>> m_guards;
89 
90  // Develop caches to reduce computation time
91  std::vector<std::vector<bool>> m_dep_tr;
92  std::vector<std::vector<bool>> non_mbc_tr;
93  };
94 }
Definition: graph.hh:32
Definition: porinfos.hh:54
Definition: porinfos.hh:34
Definition: spins.hh:35

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Sun Oct 11 2015 10:50:08 for spot by doxygen 1.8.9.1