spot  2.4.4
postproc.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2012-2017 Laboratoire de Recherche et Développement
3 // de 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 #pragma once
21 
22 #include <spot/twa/twagraph.hh>
23 
24 namespace spot
25 {
26  class option_map;
27 
30 
66  class SPOT_API postprocessor
67  {
68  public:
73  postprocessor(const option_map* opt = nullptr);
74 
75  enum output_type { TGBA, BA, Monitor, Generic };
76 
106  void
107  set_type(output_type type)
108  {
109  type_ = type;
110  }
111 
112  enum
113  {
114  Any = 0,
115  Small = 1, // Small and Deterministic
116  Deterministic = 2, // are exclusive choices.
117  Complete = 4,
118  SBAcc = 8, // State-based acceptance.
119  Unambiguous = 16,
120  };
121  typedef int output_pref;
122 
161  void
162  set_pref(output_pref pref)
163  {
164  pref_ = pref;
165  }
166 
167  enum optimization_level { Low, Medium, High };
182  void
183  set_level(optimization_level level)
184  {
185  level_ = level;
186  }
187 
192  twa_graph_ptr run(twa_graph_ptr input, formula f = nullptr);
193 
194  protected:
195  twa_graph_ptr do_simul(const twa_graph_ptr& input, int opt);
196  twa_graph_ptr do_sba_simul(const twa_graph_ptr& input, int opt);
197  twa_graph_ptr do_degen(const twa_graph_ptr& input);
198  twa_graph_ptr do_scc_filter(const twa_graph_ptr& a, bool arg);
199  twa_graph_ptr do_scc_filter(const twa_graph_ptr& a);
200 
201  output_type type_ = TGBA;
202  int pref_ = Small;
203  optimization_level level_ = High;
204  // Fine-tuning options fetched from the option_map.
205  bool degen_reset_ = true;
206  bool degen_order_ = false;
207  int degen_cache_ = 1;
208  bool degen_lskip_ = true;
209  bool degen_lowinit_ = false;
210  bool det_scc_ = true;
211  bool det_simul_ = true;
212  bool det_stutter_ = true;
213  int simul_ = -1;
214  int scc_filter_ = -1;
215  int ba_simul_ = -1;
216  bool tba_determinisation_ = false;
217  int sat_minimize_ = 0;
218  int sat_incr_steps_ = 0;
219  bool sat_langmap_ = false;
220  int sat_acc_ = 0;
221  int sat_states_ = 0;
222  bool state_based_ = false;
223  bool wdba_minimize_ = true;
224  };
226 }
Definition: automata.hh:26
Manage a map of options.
Definition: optionmap.hh:37
void set_level(optimization_level level)
Set the optimization level.
Definition: postproc.hh:183
Main class for temporal logic formula.
Definition: formula.hh:673
void set_type(output_type type)
Select the desired output type.
Definition: postproc.hh:107
void set_pref(output_pref pref)
Select the desired characteristics of the output automaton.
Definition: postproc.hh:162
Wrap TGBA/BA/Monitor post-processing algorithms in an easy interface.
Definition: postproc.hh:66

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Mon Dec 25 2017 14:51:14 for spot by doxygen 1.8.13