spot  2.11.6
parity.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2016-2019, 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/misc/common.hh>
23 #include <spot/twa/fwd.hh>
24 #include <vector>
25 
26 namespace spot
27 {
30 
33 
36  {
45  };
46 
49  {
58  };
59 
87  SPOT_API twa_graph_ptr
88  change_parity(const const_twa_graph_ptr& aut,
89  parity_kind kind, parity_style style);
90 
91  SPOT_API twa_graph_ptr
92  change_parity_here(twa_graph_ptr aut, parity_kind kind, parity_style style);
94 
108  SPOT_API twa_graph_ptr
109  cleanup_parity(const const_twa_graph_ptr& aut,
110  bool keep_style = false);
111 
112  SPOT_API twa_graph_ptr
113  cleanup_parity_here(twa_graph_ptr aut, bool keep_style = false);
115 
131  SPOT_API twa_graph_ptr
132  colorize_parity(const const_twa_graph_ptr& aut, bool keep_style = false);
133 
134  SPOT_API twa_graph_ptr
135  colorize_parity_here(twa_graph_ptr aut, bool keep_style = false);
137 
191  SPOT_API twa_graph_ptr
192  reduce_parity(const const_twa_graph_ptr& aut,
193  bool colored = false, bool layered = false);
194 
195  SPOT_API twa_graph_ptr
196  reduce_parity_here(twa_graph_ptr aut,
197  bool colored = false, bool layered = false);
198 
200 
210  struct SPOT_API reduce_parity_data
211  {
212  bool parity_max;
213  bool parity_odd;
214  std::vector<int> piprime1;
215  std::vector<int> piprime2;
216 
217  reduce_parity_data(const const_twa_graph_ptr& aut, bool layered = false);
218  };
219 
221 }
twa_graph_ptr change_parity(const const_twa_graph_ptr &aut, parity_kind kind, parity_style style)
Change the parity acceptance of an automaton.
parity_kind
Parity kind type.
Definition: parity.hh:36
parity_style
Parity style type.
Definition: parity.hh:49
twa_graph_ptr change_parity_here(twa_graph_ptr aut, parity_kind kind, parity_style style)
Parity kind type.
@ parity_kind_any
The new acceptance may change the kind.
Definition: parity.hh:44
@ parity_kind_min
The new acceptance will be a parity min.
Definition: parity.hh:40
@ parity_kind_same
The new acceptance will keep the kind.
Definition: parity.hh:42
@ parity_kind_max
The new acceptance will be a parity max.
Definition: parity.hh:38
Definition: automata.hh:27
twa_graph_ptr colorize_parity_here(twa_graph_ptr aut, bool keep_style=false)
Colorize an automaton with parity acceptance.
twa_graph_ptr reduce_parity(const const_twa_graph_ptr &aut, bool colored=false, bool layered=false)
Reduce the parity acceptance condition to use a minimal number of colors.
twa_graph_ptr cleanup_parity(const const_twa_graph_ptr &aut, bool keep_style=false)
Remove useless acceptance sets of an automaton with parity acceptance.
twa_graph_ptr reduce_parity_here(twa_graph_ptr aut, bool colored=false, bool layered=false)
Reduce the parity acceptance condition to use a minimal number of colors.
twa_graph_ptr cleanup_parity_here(twa_graph_ptr aut, bool keep_style=false)
Remove useless acceptance sets of an automaton with parity acceptance.
twa_graph_ptr colorize_parity(const const_twa_graph_ptr &aut, bool keep_style=false)
Colorize an automaton with parity acceptance.
@ parity_style_odd
The new acceptance will be a parity odd.
Definition: parity.hh:51
@ parity_style_even
The new acceptance will be a parity even.
Definition: parity.hh:53
@ parity_style_same
The new acceptance will keep the style.
Definition: parity.hh:55
@ parity_style_any
The new acceptance may change the style.
Definition: parity.hh:57
Internal data computed by the reduce_parity function.
Definition: parity.hh:211
bool parity_odd
Whether the input automaton is parity odd.
Definition: parity.hh:213
bool parity_max
Whether the input automaton is parity max.
Definition: parity.hh:212

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