spot  1.0
simplify.hh
Go to the documentation of this file.
1 // Copyright (C) 2011, 2012 Laboratoire de Recherche et Developpement
2 // de l'Epita (LRDE).
3 //
4 // This file is part of Spot, a model checking library.
5 //
6 // Spot is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // Spot is distributed in the hope that it will be useful, but WITHOUT
12 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 #ifndef SPOT_LTLVISIT_SIMPLIFY_HH
20 # define SPOT_LTLVISIT_SIMPLIFY_HH
21 
22 #include "ltlast/formula.hh"
23 #include "bdd.h"
24 #include "tgba/bdddict.hh"
25 #include <iosfwd>
26 
27 namespace spot
28 {
29  namespace ltl
30  {
32  {
33  public:
34  ltl_simplifier_options(bool basics = true,
35  bool synt_impl = true,
36  bool event_univ = true,
37  bool containment_checks = false,
38  bool containment_checks_stronger = false,
39  bool nenoform_stop_on_boolean = false,
40  bool reduce_size_strictly = false)
41  : reduce_basics(basics),
48  {
49  }
50 
52  bool synt_impl;
53  bool event_univ;
56  // If true, Boolean subformulae will not be put into
57  // negative normal form.
59  // If true, some rules that produce slightly larger formulae
60  // will be disabled. Those larger formulae are normally easier
61  // to translate, so we recommend to set this to false.
63  };
64 
65  // fwd declaration to hide technical details.
66  class ltl_simplifier_cache;
67 
71  {
72  public:
73  ltl_simplifier(bdd_dict* dict = 0);
74  ltl_simplifier(const ltl_simplifier_options& opt, bdd_dict* dict = 0);
76 
79  const formula* simplify(const formula* f);
80 
89  const formula*
90  negative_normal_form(const formula* f, bool negated = false);
91 
111  bool syntactic_implication(const formula* f, const formula* g);
117  bool syntactic_implication_neg(const formula* f, const formula* g,
118  bool right);
119 
124  bool are_equivalent(const formula* f, const formula* g);
125 
126 
132  bool implication(const formula* f, const formula* g);
133 
138  bdd as_bdd(const formula* f);
139 
149  void clear_as_bdd_cache();
150 
152  bdd_dict* get_dict() const;
153 
155  const formula* star_normal_form(const formula* f);
156 
158  void print_stats(std::ostream& os) const;
159 
160  private:
161  ltl_simplifier_cache* cache_;
162  // Copy disallowed.
164  bool owndict;
165  };
166  }
167 
168 }
169 
170 #endif // SPOT_LTLVISIT_SIMPLIFY_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Sat Oct 27 2012 09:34:32 for spot by doxygen 1.8.1.2