spot 2.16
Loading...
Searching...
No Matches
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
23namespace spot
24{
25 class option_map;
26
29
65 class SPOT_API postprocessor
66 {
67 public:
72 postprocessor(const option_map* opt = nullptr);
73
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 Finite = 512, // introduced in Spot 2.13, used only by translator
93 };
94
139 void
141 {
142 type_ = type;
143 }
144
145 enum
146 {
147 Any = 0,
148 Small = 1, // Small and Deterministic
149 Deterministic = 2, // are exclusive choices.
150 Complete = 4,
151 SBAcc = 8, // State-based acceptance.
152 Unambiguous = 16,
153 Colored = 32, // Colored parity; requires parity acceptance
154 Obligation = 64, // Assume the input is an obligation (Spot≥2.13)
155 };
157 typedef int output_pref;
158
206 void
208 {
209 pref_ = pref;
210 }
211
213 enum optimization_level { Low, Medium, High };
228 void
230 {
231 level_ = level;
232 }
233
239
240 protected:
242 twa_graph_ptr do_simul(const twa_graph_ptr& input, int opt) const;
244 twa_graph_ptr do_sba_simul(const twa_graph_ptr& input, int opt) const;
252 twa_graph_ptr do_scc_filter(const twa_graph_ptr& a, bool arg) const;
257
258 output_type type_ = TGBA;
259 int pref_ = Small;
260 optimization_level level_ = High;
261 // Fine-tuning options fetched from the option_map.
262 bool degen_reset_ = true;
263 bool degen_order_ = false;
264 int degen_cache_ = 1;
265 bool degen_lskip_ = true;
266 bool degen_lowinit_ = false;
267 bool degen_remscc_ = true;
268 bool det_scc_ = true;
269 int det_simul_ = -1;
270 bool det_stutter_ = true;
271 int det_max_states_ = -1;
272 int det_max_edges_ = -1;
273 int simul_ = -1;
274 int simul_method_ = -1;
275 int simul_trans_pruning_ = 512;
276 int dpa_simul_ = -1;
277 int dba_simul_ = -1;
278 int scc_filter_ = -1;
279 int ba_simul_ = -1;
280 bool tba_determinisation_ = false;
281 int sat_minimize_ = 0;
282 int sat_incr_steps_ = 0;
283 bool sat_langmap_ = false;
284 int sat_acc_ = 0;
285 int sat_states_ = 0;
286 int gen_reduce_parity_ = 1;
287 bool state_based_ = false;
288 int wdba_minimize_ = -1;
289 int simul_max_ = 4096;
290 int merge_states_min_ = 128;
291 int wdba_det_max_ = 4096;
292 bool acd_ = true;
294 int rde_ = -1;
295 };
297}
Main class for temporal logic formula.
Definition formula.hh:847
Manage a map of options.
Definition optionmap.hh:34
Wrap TGBA/BA/Monitor post-processing algorithms in an easy interface.
Definition postproc.hh:66
int output_pref
Output preferences bitmask.
Definition postproc.hh:157
void set_pref(output_pref pref)
Select the desired characteristics of the output automaton.
Definition postproc.hh:207
bool acd_was_used_
Whether ACD was used.
Definition postproc.hh:293
postprocessor(const option_map *opt=nullptr)
Construct a postprocessor.
twa_graph_ptr do_sba_simul(const twa_graph_ptr &input, int opt) const
Perform state-based acceptance simulation.
twa_graph_ptr do_scc_filter(const twa_graph_ptr &a) const
Perform the SCC filter step.
optimization_level
Optimization level selection.
Definition postproc.hh:213
twa_graph_ptr do_degen(const twa_graph_ptr &input) const
Perform the degeneralization step.
void set_level(optimization_level level)
Set the optimization level.
Definition postproc.hh:229
twa_graph_ptr finalize(twa_graph_ptr tmp) const
Finalize the automaton.
twa_graph_ptr choose_degen(const twa_graph_ptr &input) const
Choose degeneralization strategy.
twa_graph_ptr do_scc_filter(const twa_graph_ptr &a, bool arg) const
Perform the SCC filter step.
twa_graph_ptr do_simul(const twa_graph_ptr &input, int opt) const
Perform the simulation step.
twa_graph_ptr run(twa_graph_ptr input, formula f=nullptr)
Optimize an automaton.
output_type
Output type selection.
Definition postproc.hh:75
void set_type(output_type type)
Select the desired output type.
Definition postproc.hh:140
twa_graph_ptr do_degen_tba(const twa_graph_ptr &input) const
Perform TBA degeneralization.
std::shared_ptr< twa_graph > twa_graph_ptr
Shared pointer to a mutable twa_graph.
Definition fwd.hh:44
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.8