spot  1.1.4
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 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 
25 #ifndef SPOT_LTLAST_ATOMIC_PROP_HH
26 # define SPOT_LTLAST_ATOMIC_PROP_HH
27 
28 #include <string>
29 #include <iosfwd>
30 #include <map>
31 #include "refformula.hh"
32 #include "ltlenv/environment.hh"
33 
34 namespace spot
35 {
36  namespace ltl
37  {
38 
41  class atomic_prop : public ref_formula
42  {
43  public:
46  static const atomic_prop*
47  instance(const std::string& name, environment& env);
48 
49  virtual void accept(visitor& visitor) const;
50 
52  const std::string& name() const;
54  environment& env() const;
55 
57  virtual std::string dump() const;
58 
60  static unsigned instance_count();
62  static std::ostream& dump_instances(std::ostream& os);
63 
64  protected:
65  atomic_prop(const std::string& name, environment& env);
66  virtual ~atomic_prop();
67 
68  typedef std::pair<std::string, environment*> pair;
69  typedef std::map<pair, const atomic_prop*> map;
70  static map instances;
71 
72  private:
73  std::string name_;
75  };
76 
77  inline
78  const atomic_prop*
80  {
81  if (f->kind() != formula::AtomicProp)
82  return 0;
83  return static_cast<const atomic_prop*>(f);
84  }
85  }
86 }
87 
88 #endif // SPOT_LTLAST_ATOMICPROP_HH

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Mon Jul 29 2013 00:27:24 for spot by doxygen 1.8.4