spot  0.9.2
automatop.hh
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2008, 2009, 2012 Laboratoire de Recherche et
3 // Développement 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 2 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 Spot; see the file COPYING. If not, write to the Free
19 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 // 02111-1307, USA.
21 
24 #ifndef SPOT_LTLAST_AUTOMATOP_HH
25 # define SPOT_LTLAST_AUTOMATOP_HH
26 
27 # include <vector>
28 # include <iosfwd>
29 # include <map>
30 # include "nfa.hh"
31 # include "refformula.hh"
32 
33 namespace spot
34 {
35  namespace ltl
36  {
40  class automatop : public ref_formula
41  {
42  public:
44  typedef std::vector<const formula*> vec;
45 
52  static const automatop*
53  instance(const nfa::ptr nfa, vec* v, bool negated);
54 
55  virtual void accept(visitor& v) const;
56 
58  unsigned size() const;
62  const formula* nth(unsigned n) const;
63 
65  const spot::ltl::nfa::ptr get_nfa() const;
66 
68  bool is_negated() const;
69 
71  std::string dump() const;
72 
74  static unsigned instance_count();
75 
77  static std::ostream& dump_instances(std::ostream& os);
78 
79 
80  protected:
81  typedef std::pair<std::pair<nfa::ptr, bool>, vec*> triplet;
83  struct tripletcmp
84  {
85  bool
86  operator () (const triplet& p1, const triplet& p2) const
87  {
88  if (p1.first.first != p2.first.first)
89  return p1.first.first < p2.first.first;
90  if (p1.first.second != p2.first.second)
91  return p1.first.second < p2.first.second;
92  return *p1.second < *p2.second;
93  }
94  };
95  typedef std::map<triplet, const automatop*, tripletcmp> map;
96  static map instances;
97 
98  automatop(const nfa::ptr, vec* v, bool negated);
99  virtual ~automatop();
100 
101  private:
102  const nfa::ptr nfa_;
104  bool negated_;
105  };
106  }
107 }
108 
109 #endif // SPOT_LTLAST_AUTOMATOP_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