spot  1.0.2
simplify.hh
Go to the documentation of this file.
1 // Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et
2 // Developpement 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  bool boolean_to_isop = false)
42  : reduce_basics(basics),
50  {
51  }
52 
54  bool synt_impl;
55  bool event_univ;
58  // If true, Boolean subformulae will not be put into
59  // negative normal form.
61  // If true, some rules that produce slightly larger formulae
62  // will be disabled. Those larger formulae are normally easier
63  // to translate, so we recommend to set this to false.
65  // If true, Boolean subformulae will be rewritten in ISOP form.
67  };
68 
69  // fwd declaration to hide technical details.
70  class ltl_simplifier_cache;
71 
75  {
76  public:
77  ltl_simplifier(bdd_dict* dict = 0);
78  ltl_simplifier(const ltl_simplifier_options& opt, bdd_dict* dict = 0);
80 
83  const formula* simplify(const formula* f);
84 
93  const formula*
94  negative_normal_form(const formula* f, bool negated = false);
95 
115  bool syntactic_implication(const formula* f, const formula* g);
121  bool syntactic_implication_neg(const formula* f, const formula* g,
122  bool right);
123 
128  bool are_equivalent(const formula* f, const formula* g);
129 
130 
136  bool implication(const formula* f, const formula* g);
137 
142  bdd as_bdd(const formula* f);
143 
153  void clear_as_bdd_cache();
154 
156  bdd_dict* get_dict() const;
157 
159  const formula* star_normal_form(const formula* f);
160 
166  const formula* boolean_to_isop(const formula* f);
167 
169  void print_stats(std::ostream& os) const;
170 
171  private:
172  ltl_simplifier_cache* cache_;
173  // Copy disallowed.
175  bool owndict;
176  };
177  }
178 
179 }
180 
181 #endif // SPOT_LTLVISIT_SIMPLIFY_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Mar 6 2013 09:25:14 for spot by doxygen 1.8.1.2