dtgbasat.hh 2.7 KB
Newer Older
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// de l'Epita.
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

20
#pragma once
21

22
#include "twa/twagraph.hh"
23
24
25

namespace spot
{
26
27
  /// \brief Attempt to synthetize am equivalent deterministic TGBA
  /// with a SAT solver.
28
  ///
29
  /// \param a the input TGBA.  It should be a deterministic TGBA.
30
  ///
31
32
33
34
35
36
  /// \param target_acc_number is the number of acceptance sets wanted
  /// in the result.
  ///
  /// \param target_state_number is the desired number of states in
  /// the result.  The output may have less than \a
  /// target_state_number reachable states.
37
  ///
38
39
40
41
  /// \param state_based set to true to force all outgoing transitions
  /// of a state to share the same acceptance conditions, effectively
  /// turning the TGBA into a TBA.
  ///
42
  /// This functions attempts to find a TGBA with \a target_acc_number
43
44
45
  /// acceptance sets and target_state_number states that is
  /// equivalent to \a a.  If no such TGBA is found, a null pointer is
  /// returned.
46
47
  SPOT_API twa_graph_ptr
  dtgba_sat_synthetize(const const_twa_graph_ptr& a,
48
		       unsigned target_acc_number,
49
50
51
52
53
54
55
56
57
		       int target_state_number,
		       bool state_based = false);

  /// \brief Attempt to minimize a deterministic TGBA with a SAT solver.
  ///
  /// This calls dtgba_sat_synthetize() in a loop, with a decreasing
  /// number of states, and returns the last successfully built TGBA.
  ///
  /// If no smaller TGBA exist, this returns a null pointer.
58
59
  SPOT_API twa_graph_ptr
  dtgba_sat_minimize(const const_twa_graph_ptr& a,
60
		     unsigned target_acc_number,
61
		     bool state_based = false);
62
63
64
65
66
67
68

  /// \brief Attempt to minimize a deterministic TGBA with a SAT solver.
  ///
  /// This calls dtgba_sat_synthetize() in a loop, but attempting to
  /// find the minimum number of states using a binary search.
  //
  /// If no smaller TBA exist, this returns a null pointer.
69
70
  SPOT_API twa_graph_ptr
  dtgba_sat_minimize_dichotomy(const const_twa_graph_ptr& a,
71
			       unsigned target_acc_number,
72
			       bool state_based = false);
73
}