declenv.hh 2.06 KB
Newer Older
1
2
// -*- coding: utf-8 -*-
// Copyright (C) 2009, 2012 Laboratoire de Recherche et Développement
Guillaume Sadegh's avatar
Guillaume Sadegh committed
3
4
// de l'Epita (LRDE).
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
5
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
6
7
8
9
10
11
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// 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
14
15
16
17
18
19
20
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more details.
//
// 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
23
24
25
26

#ifndef SPOT_LTLENV_DECLENV_HH
# define SPOT_LTLENV_DECLENV_HH

# include "environment.hh"
27
28
29
# include <string>
# include <map>
# include "ltlast/atomic_prop.hh"
30
31
32
33
34
35

namespace spot
{
  namespace ltl
  {

36
    /// \ingroup ltl_environment
37
    /// \brief A declarative environment.
38
39
40
    ///
    /// This environment recognizes all atomic propositions
    /// that have been previously declared.  It will reject other.
41
42
43
44
45
    class declarative_environment : public environment
    {
    public:
      declarative_environment();
      ~declarative_environment();
46

47
48
49
50
      /// Declare an atomic proposition.  Return false iff the
      /// proposition was already declared.
      bool declare(const std::string& prop_str);

51
      virtual const formula* require(const std::string& prop_str);
52
53
54
55

      /// Get the name of the environment.
      virtual const std::string& name();

56
      typedef std::map<const std::string, const atomic_prop*> prop_map;
57
58
59
60
61
62
63

      /// Get the map of atomic proposition known to this environment.
      const prop_map& get_prop_map() const;

    private:
      prop_map props_;
    };
64
65
66
67
  }
}

#endif // SPOT_LTLENV_DECLENV_HH