spot  0.9.2
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 2 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 Spot; see the file COPYING. If not, write to the Free
18 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 // 02111-1307, USA.
20 
21 #ifndef SPOT_LTLVISIT_SIMPLIFY_HH
22 # define SPOT_LTLVISIT_SIMPLIFY_HH
23 
24 #include "ltlast/formula.hh"
25 #include "bdd.h"
26 #include "tgba/bdddict.hh"
27 #include <iosfwd>
28 
29 namespace spot
30 {
31  namespace ltl
32  {
34  {
35  public:
36  ltl_simplifier_options(bool basics = true,
37  bool synt_impl = true,
38  bool event_univ = true,
39  bool containment_checks = false,
40  bool containment_checks_stronger = false,
41  bool nenoform_stop_on_boolean = false,
42  bool reduce_size_strictly = false)
43  : 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  };
66 
67  // fwd declaration to hide technical details.
68  class ltl_simplifier_cache;
69 
73  {
74  public:
75  ltl_simplifier(bdd_dict* dict = 0);
78 
81  const formula* simplify(const formula* f);
82 
91  const formula*
92  negative_normal_form(const formula* f, bool negated = false);
93 
113  bool syntactic_implication(const formula* f, const formula* g);
119  bool syntactic_implication_neg(const formula* f, const formula* g,
120  bool right);
121 
126  bool are_equivalent(const formula* f, const formula* g);
127 
132  bdd as_bdd(const formula* f);
133 
143  void clear_as_bdd_cache();
144 
146  bdd_dict* get_dict() const;
147 
149  const formula* star_normal_form(const formula* f);
150 
152  void print_stats(std::ostream& os) const;
153 
154  private:
155  ltl_simplifier_cache* cache_;
156  // Copy disallowed.
158  bool owndict;
159  };
160  }
161 
162 }
163 
164 #endif // SPOT_LTLVISIT_SIMPLIFY_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Jul 2 2012 17:35:47 for spot by doxygen 1.8.1.1