spot
1.2.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
ltlast
constant.hh
Go to the documentation of this file.
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2009, 2010, 2012, 2013, 2014 Laboratoire de Recherche
3
// et Développement de l'Epita (LRDE).
4
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
5
//
6
// This file is part of Spot, a model checking library.
7
//
8
// Spot is free software; you can redistribute it and/or modify it
9
// under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 3 of the License, or
11
// (at your option) any later version.
12
//
13
// Spot is distributed in the hope that it will be useful, but WITHOUT
14
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16
// License for more details.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with this program. If not, see <http://www.gnu.org/licenses/>.
20
23
#ifndef SPOT_LTLAST_CONSTANT_HH
24
# define SPOT_LTLAST_CONSTANT_HH
25
26
#include "
formula.hh
"
27
28
namespace
spot
29
{
30
namespace
ltl
31
{
32
35
class
SPOT_API
constant
:
public
formula
36
{
37
public
:
38
enum
type { False, True, EmptyWord };
39
virtual
void
accept(
visitor
& v)
const
;
40
42
type
val
()
const
43
{
44
return
val_;
45
}
46
48
const
char
* val_name()
const
;
49
50
virtual
std::string
dump
()
const
;
51
53
static
constant
*
true_instance
() {
return
&true_instance_; }
55
static
constant
*
false_instance
() {
return
&false_instance_; }
57
static
constant
*
empty_word_instance
() {
return
&empty_word_instance_; }
58
59
protected
:
60
constant
(type val);
61
virtual
~
constant
();
62
63
private
:
64
type val_;
65
66
static
constant
true_instance_;
67
static
constant
false_instance_;
68
static
constant
empty_word_instance_;
69
// If you add new constants here, be sure to update the
70
// formula::formula() constructor.
71
};
72
73
78
inline
79
const
constant
*
80
is_constant(
const
formula
* f)
81
{
82
if
(f->
kind
() != formula::Constant)
83
return
0;
84
return
static_cast<
const
constant
*
>
(f);
85
}
86
}
87
}
88
89
#endif // SPOT_LTLAST_CONSTANT_HH
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Thu May 15 2014 11:04:11 for spot by
1.8.4