dtwasat: various fixes
* spot/twaalgos/dtwasat.cc: Do not return a transition-based automaton when state-based output is requested. * tests/python/satmin.ipynb, spot/twaalgos/dtbasat.hh: Fix some typos. * tests/python/satmin.py: Add test cases. * NEWS: Mention the bugs.
This commit is contained in:
parent
fea0be96c1
commit
ee80849caf
5 changed files with 32 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et
|
||||
// Copyright (C) 2013-2015, 2021 Laboratoire de Recherche et
|
||||
// Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -38,7 +38,7 @@ namespace spot
|
|||
/// turning the TBA into a BA.
|
||||
///
|
||||
/// If no equivalent deterministic TBA with \a target_state_number
|
||||
/// states is found, a null pointer
|
||||
/// states is found, this returns a null pointer.
|
||||
SPOT_API twa_graph_ptr
|
||||
dtba_sat_synthetize(const const_twa_graph_ptr& a,
|
||||
int target_state_number,
|
||||
|
|
|
|||
|
|
@ -1472,16 +1472,22 @@ namespace spot
|
|||
// returned in the case of a WDBA.
|
||||
complete_here(a);
|
||||
|
||||
bool orig_is_valid = false;
|
||||
|
||||
if (states == -1 && max_states == -1)
|
||||
{
|
||||
if (state_based)
|
||||
max_states = sbacc(a)->num_states();
|
||||
else
|
||||
max_states = a->num_states();
|
||||
// If we have not user-supplied acceptance, the input
|
||||
// automaton is a valid one, so we start the search with one
|
||||
// less state.
|
||||
max_states -= !user_supplied_acc;
|
||||
// If we have no user-supplied acceptance, and we are not
|
||||
// guessing state-based upperbound, the input automaton is a
|
||||
// valid one, so we start the search with one less state.
|
||||
if (!user_supplied_acc && (!state_based || a->prop_state_acc()))
|
||||
{
|
||||
--max_states;
|
||||
orig_is_valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1525,7 +1531,7 @@ namespace spot
|
|||
(a, state_based, sat_langmap, max_states);
|
||||
}
|
||||
|
||||
if (!a && !user_supplied_acc)
|
||||
if (!a && orig_is_valid)
|
||||
a = orig;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue