spot  2.12
postproc.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) by the Spot authors, see the AUTHORS file for details.
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 #pragma once
20 
21 #include <spot/twa/twagraph.hh>
22 
23 namespace spot
24 {
25  class option_map;
26 
29 
65  class SPOT_API postprocessor
66  {
67  public:
72  postprocessor(const option_map* opt = nullptr);
73 
74  enum output_type {
75  TGBA = 0, // Historical. Use GeneralizedBuchi instead
76  GeneralizedBuchi = 0, // Introduced in Spot 2.10 to replace TGBA
77  BA = 1, // Historical. Implies Buchi and SBAcc.
78  Monitor = 2,
79  Generic = 3,
80  Parity = 4,
81  ParityMin = Parity | 8,
82  ParityMax = Parity | 16,
83  ParityOdd = Parity | 32,
84  ParityEven = Parity | 64,
85  ParityMinOdd = ParityMin | ParityOdd,
86  ParityMaxOdd = ParityMax | ParityOdd,
87  ParityMinEven = ParityMin | ParityEven,
88  ParityMaxEven = ParityMax | ParityEven,
89  CoBuchi = 128,
90  Buchi = 256, // introduced in Spot 2.10, does not imply SBAcc
91  };
92 
137  void
138  set_type(output_type type)
139  {
140  type_ = type;
141  }
142 
143  enum
144  {
145  Any = 0,
146  Small = 1, // Small and Deterministic
147  Deterministic = 2, // are exclusive choices.
148  Complete = 4,
149  SBAcc = 8, // State-based acceptance.
150  Unambiguous = 16,
151  Colored = 32, // Colored parity; requires parity acceptance
152  };
153  typedef int output_pref;
154 
195  void
196  set_pref(output_pref pref)
197  {
198  pref_ = pref;
199  }
200 
201  enum optimization_level { Low, Medium, High };
216  void
217  set_level(optimization_level level)
218  {
219  level_ = level;
220  }
221 
226  twa_graph_ptr run(twa_graph_ptr input, formula f = nullptr);
227 
228  protected:
229  twa_graph_ptr do_simul(const twa_graph_ptr& input, int opt) const;
230  twa_graph_ptr do_sba_simul(const twa_graph_ptr& input, int opt) const;
231  twa_graph_ptr choose_degen(const twa_graph_ptr& input) const;
232  twa_graph_ptr do_degen(const twa_graph_ptr& input) const;
233  twa_graph_ptr do_degen_tba(const twa_graph_ptr& input) const;
234  twa_graph_ptr do_scc_filter(const twa_graph_ptr& a, bool arg) const;
235  twa_graph_ptr do_scc_filter(const twa_graph_ptr& a) const;
236  twa_graph_ptr finalize(twa_graph_ptr tmp) const;
237 
238  output_type type_ = TGBA;
239  int pref_ = Small;
240  optimization_level level_ = High;
241  // Fine-tuning options fetched from the option_map.
242  bool degen_reset_ = true;
243  bool degen_order_ = false;
244  int degen_cache_ = 1;
245  bool degen_lskip_ = true;
246  bool degen_lowinit_ = false;
247  bool degen_remscc_ = true;
248  bool det_scc_ = true;
249  int det_simul_ = -1;
250  bool det_stutter_ = true;
251  int det_max_states_ = -1;
252  int det_max_edges_ = -1;
253  int simul_ = -1;
254  int simul_method_ = -1;
255  int simul_trans_pruning_ = 512;
256  int dpa_simul_ = -1;
257  int dba_simul_ = -1;
258  int scc_filter_ = -1;
259  int ba_simul_ = -1;
260  bool tba_determinisation_ = false;
261  int sat_minimize_ = 0;
262  int sat_incr_steps_ = 0;
263  bool sat_langmap_ = false;
264  int sat_acc_ = 0;
265  int sat_states_ = 0;
266  int gen_reduce_parity_ = 1;
267  bool state_based_ = false;
268  int wdba_minimize_ = -1;
269  int simul_max_ = 4096;
270  int merge_states_min_ = 128;
271  int wdba_det_max_ = 4096;
272  bool acd_ = true;
273  bool acd_was_used_;
274  };
276 }
Main class for temporal logic formula.
Definition: formula.hh:732
Manage a map of options.
Definition: optionmap.hh:34
Wrap TGBA/BA/Monitor post-processing algorithms in an easy interface.
Definition: postproc.hh:66
void set_pref(output_pref pref)
Select the desired characteristics of the output automaton.
Definition: postproc.hh:196
postprocessor(const option_map *opt=nullptr)
Construct a postprocessor.
void set_level(optimization_level level)
Set the optimization level.
Definition: postproc.hh:217
twa_graph_ptr run(twa_graph_ptr input, formula f=nullptr)
Optimize an automaton.
void set_type(output_type type)
Select the desired output type.
Definition: postproc.hh:138
Definition: automata.hh:26

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.1