reduce.hh 2.65 KB
Newer Older
1
// Copyright (C) 2004  Laboratoire d'Informatique de Paris 6 (LIP6),
martinez's avatar
martinez committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// 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
// 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.

22
23
#ifndef SPOT_LTLVISIT_REDUCE_HH
# define SPOT_LTLVISIT_REDUCE_HH
martinez's avatar
martinez committed
24
25
26
27
28
29
30
31

#include "ltlast/formula.hh"
#include "ltlast/visitor.hh"

namespace spot
{
  namespace ltl
  {
32

33
    /// Options for spot::ltl::reduce.
34
35
    enum reduce_options
      {
36
	/// No reduction.
37
	Reduce_None = 0,
38
	/// Basic reductions.
39
	Reduce_Basics = 1,
40
	/// Somenzi & Bloem syntactic implication.
41
	Reduce_Syntactic_Implications = 2,
42
	/// Etessami & Holzmann eventuality and universality reductions.
43
	Reduce_Eventuality_And_Universality = 4,
44
	/// All reductions.
45
46
	Reduce_All = -1U
      };
47

48
    /// \brief Reduce a formula \a f.
49
    ///
50
51
52
53
    /// \param f the formula to reduce
    /// \param opt a conjonction of spot::ltl::reduce_options specifying
    //             which optimizations to apply.
    /// \return the reduced formula
54
    formula* reduce(const formula* f, int opt = Reduce_All);
55

56
57
    /// \brief Check whether a formula is eventual.
    ///
58
59
60
61
62
63
64
65
66
67
68
69
    /// This comes from
    /// \verbatim
    /// @InProceedings{	  etessami.00.concur,
    /// author  	= {Kousha Etessami and Gerard J. Holzmann},
    /// title		= {Optimizing {B\"u}chi Automata},
    /// booktitle	= {Proceedings of the 11th International Conference on
    /// 		  Concurrency Theory (Concur'2000)},
    /// pages		= {153--167},
    /// year		= {2000},
    /// editor  	= {C. Palamidessi},
    /// volume  	= {1877},
    /// series  	= {Lecture Notes in Computer Science},
70
    /// publisher	= {Springer-Verlag}
71
72
    /// }
    /// \endverbatim
73
    /// FIXME: Describe what eventual formulae are.
martinez's avatar
martinez committed
74
    bool is_eventual(const formula* f);
75
76
77
78

    /// \brief Check whether a formula is universal.
    ///
    /// FIXME: Describe what universal formulae are.  Cite paper.
martinez's avatar
martinez committed
79
80
81
82
    bool is_universal(const formula* f);
  }
}

83
#endif //  SPOT_LTLVISIT_REDUCE_HH