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

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