reduce.hh 4.41 KB
Newer Older
1
2
3
4
5
// Copyright (C) 2010, 2011 Laboratoire de Recherche et Developpement
// de l'Epita (LRDE).
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// Pierre et Marie Curie.
martinez's avatar
martinez committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
// 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
// the Free Software Foundation; either version 2 of the License, or
// (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
// along with Spot; see the file COPYING.  If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.

24
25
#ifndef SPOT_LTLVISIT_REDUCE_HH
# define SPOT_LTLVISIT_REDUCE_HH
martinez's avatar
martinez committed
26
27

#include "ltlast/formula.hh"
28
#include "ltlast/visitor.hh"
martinez's avatar
martinez committed
29

30
31
32
33
34
35
36
#if __GNUC__
#ifndef SKIP_DEPRECATED_WARNING
#warning This file and its functions are deprecated.  \
         The functionality moved to ltlvisit/simplify.hh
#endif
#endif

martinez's avatar
martinez committed
37
38
39
40
namespace spot
{
  namespace ltl
  {
41

42
43
44
    /// \addtogroup ltl_rewriting
    /// @{

45
    /// Options for spot::ltl::reduce.
46
47
    enum reduce_options
      {
48
	/// No reduction.
49
	Reduce_None = 0,
50
	/// Basic reductions.
51
	Reduce_Basics = 1,
52
	/// Somenzi & Bloem syntactic implication.
53
	Reduce_Syntactic_Implications = 2,
54
	/// Etessami & Holzmann eventuality and universality reductions.
55
	Reduce_Eventuality_And_Universality = 4,
56
57
58
59
	/// Tauriainen containment checks.
	Reduce_Containment_Checks = 8,
	/// Tauriainen containment checks (stronger version).
	Reduce_Containment_Checks_Stronger = 16,
60
	/// All reductions.
61
62
	Reduce_All = -1U
      };
63

64
    /// \brief Reduce a formula \a f.
65
    ///
66
67
    /// \param f the formula to reduce
    /// \param opt a conjonction of spot::ltl::reduce_options specifying
68
    ///            which optimizations to apply.
69
    /// \return the reduced formula
70
71
72
73
74
75
    ///
    /// \deprecated Use spot::ltl::ltl_simplifier instead.
#if __GNUC__
    formula*
    reduce(const formula* f, int opt = Reduce_All) __attribute__ ((deprecated));
#else
76
    formula* reduce(const formula* f, int opt = Reduce_All);
77
#endif
78
    /// @}
79

80
    /// \brief Check whether a formula is a pure eventuality.
81
    /// \ingroup ltl_misc
82
    ///
83
    /// Pure eventuality formulae are defined in
84
85
    /// \verbatim
    /// @InProceedings{	  etessami.00.concur,
86
    /// author		= {Kousha Etessami and Gerard J. Holzmann},
87
88
89
90
91
    /// title		= {Optimizing {B\"u}chi Automata},
    /// booktitle	= {Proceedings of the 11th International Conference on
    /// 		  Concurrency Theory (Concur'2000)},
    /// pages		= {153--167},
    /// year		= {2000},
92
93
94
    /// editor		= {C. Palamidessi},
    /// volume		= {1877},
    /// series		= {Lecture Notes in Computer Science},
95
    /// publisher	= {Springer-Verlag}
96
97
    /// }
    /// \endverbatim
98
99
100
    ///
    /// A word that satisfies a pure eventuality can be prefixed by
    /// anything and still satisfies the formula.
101
102
103
104
105
    ///
    /// \deprecated Use f->is_eventual() instead.
#if __GNUC__
    bool is_eventual(const formula* f) __attribute__ ((deprecated));
#else
martinez's avatar
martinez committed
106
    bool is_eventual(const formula* f);
107
#endif
108

109
    /// \brief Check whether a formula is purely universal.
110
    /// \ingroup ltl_misc
111
112
113
114
    ///
    /// Purely universal formulae are defined in
    /// \verbatim
    /// @InProceedings{	  etessami.00.concur,
115
    /// author		= {Kousha Etessami and Gerard J. Holzmann},
116
117
118
119
120
    /// title		= {Optimizing {B\"u}chi Automata},
    /// booktitle	= {Proceedings of the 11th International Conference on
    /// 		  Concurrency Theory (Concur'2000)},
    /// pages		= {153--167},
    /// year		= {2000},
121
122
123
    /// editor		= {C. Palamidessi},
    /// volume		= {1877},
    /// series		= {Lecture Notes in Computer Science},
124
125
126
    /// publisher	= {Springer-Verlag}
    /// }
    /// \endverbatim
127
    ///
128
129
    /// Any (non-empty) suffix of a word that satisfies if purely
    /// universal formula also satisfies the formula.
130
131
132
133
134
    ///
    /// \deprecated Use f->is_universal() instead.
#if __GNUC__
    bool is_universal(const formula* f) __attribute__ ((deprecated));
#else
martinez's avatar
martinez committed
135
    bool is_universal(const formula* f);
136
#endif
martinez's avatar
martinez committed
137
138
139
  }
}

140
#endif //  SPOT_LTLVISIT_REDUCE_HH