spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
translate.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2013 Laboratoire de Recherche et Développement de
3 // l'Epita (LRDE).
4 //
5 // This file is part of Spot, a model checking library.
6 //
7 // Spot is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Spot is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20 #ifndef SPOT_TGBAALGOS_TRANSLATE_HH
21 # define SPOT_TGBAALGOS_TRANSLATE_HH
22 
23 #include "postproc.hh"
24 #include "ltlvisit/simplify.hh"
25 
26 namespace spot
27 {
48  class SPOT_API translator: protected postprocessor
49  {
50  public:
51  translator(ltl::ltl_simplifier* simpl, const option_map* opt = 0)
52  : postprocessor(opt), simpl_(simpl), simpl_owned_(0)
53  {
54  assert(simpl);
55  setup_opt(opt);
56  }
57 
58  translator(bdd_dict* dict, const option_map* opt = 0)
59  : postprocessor(opt)
60  {
61  build_simplifier(dict);
62  setup_opt(opt);
63  }
64 
65  translator(const option_map* opt = 0)
66  : postprocessor(opt)
67  {
68  build_simplifier(0);
69  setup_opt(opt);
70  }
71 
72  ~translator()
73  {
74  // simpl_owned_ is 0 if simpl_ was supplied to the constructor.
75  delete simpl_owned_;
76  }
77 
78  typedef postprocessor::output_type output_type;
79 
80  void
81  set_type(output_type type)
82  {
83  this->postprocessor::set_type(type);
84  }
85 
86  typedef postprocessor::output_pref output_pref;
87 
88  void
89  set_pref(output_pref pref)
90  {
91  this->postprocessor::set_pref(pref);
92  }
93 
94  typedef postprocessor::optimization_level optimization_level;
95 
96  void
97  set_level(optimization_level level)
98  {
99  level_ = level;
100  }
101 
106  const tgba* run(const ltl::formula* f);
107 
113  const tgba* run(const ltl::formula** f);
114 
115  protected:
116  void setup_opt(const option_map* opt);
117  void build_simplifier(bdd_dict* dict);
118 
119  private:
120  ltl::ltl_simplifier* simpl_;
121  ltl::ltl_simplifier* simpl_owned_;
122  int comp_susp_;
123  int early_susp_;
124  int skel_wdba_;
125  int skel_simul_;
126  };
128 }
129 
130 
131 #endif // SPOT_TGBAALGOS_TRANSLATE_HH

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Sat Dec 6 2014 12:28:44 for spot by doxygen 1.8.4