spot  0.9.2
atomic_prop.hh
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2009, 2012 Laboratoire de Recherche et Développement
3 // de l'Epita (LRDE).
4 // Copyright (C) 2003, 2004 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 
27 #ifndef SPOT_LTLAST_ATOMIC_PROP_HH
28 # define SPOT_LTLAST_ATOMIC_PROP_HH
29 
30 #include <string>
31 #include <iosfwd>
32 #include <map>
33 #include "refformula.hh"
34 #include "ltlenv/environment.hh"
35 
36 namespace spot
37 {
38  namespace ltl
39  {
40 
43  class atomic_prop : public ref_formula
44  {
45  public:
48  static const atomic_prop*
49  instance(const std::string& name, environment& env);
50 
51  virtual void accept(visitor& visitor) const;
52 
54  const std::string& name() const;
56  environment& env() const;
57 
59  virtual std::string dump() const;
60 
62  static unsigned instance_count();
64  static std::ostream& dump_instances(std::ostream& os);
65 
66  protected:
67  atomic_prop(const std::string& name, environment& env);
68  virtual ~atomic_prop();
69 
70  typedef std::pair<std::string, environment*> pair;
71  typedef std::map<pair, const atomic_prop*> map;
72  static map instances;
73 
74  private:
75  std::string name_;
77  };
78 
79  inline
80  const atomic_prop*
82  {
83  if (f->kind() != formula::AtomicProp)
84  return 0;
85  return static_cast<const atomic_prop*>(f);
86  }
87  }
88 }
89 
90 #endif // SPOT_LTLAST_ATOMICPROP_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