reduce.hh 4.45 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
12
13
14
15
16
17
18
19
20
21
22
23
24
//
// 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.

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

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

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

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

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

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

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

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

141
#endif //  SPOT_LTLVISIT_REDUCE_HH