reduce.hh 4.37 KB
Newer Older
1
2
3
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
4
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6
5
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
6
// Pierre et Marie Curie.
martinez's avatar
martinez committed
7
8
9
10
11
//
// 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
martinez's avatar
martinez committed
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/>.
martinez's avatar
martinez committed
22

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

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

29
30
31
32
33
34
35
#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
36
37
38
39
namespace spot
{
  namespace ltl
  {
40

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

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

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

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

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

139
#endif //  SPOT_LTLVISIT_REDUCE_HH