twagraph: improve copy of kripke_graph
Fix #505, Reported by Edmond Irani Liu. * spot/twa/twagraph.cc (copy): Deal with kripke_graph in a better way. * spot/twaalgos/hoa.cc: Do not force the use of named-states since when the input is a kripke_graph. * tests/python/kripke.py: Adjust test cases. * NEWS: Mention the change. * THANKS: Add Edmund.
This commit is contained in:
parent
ef9267a58e
commit
013c879b41
5 changed files with 54 additions and 14 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <spot/twa/formula2bdd.hh>
|
||||
#include <spot/tl/formula.hh>
|
||||
#include <spot/kripke/fairkripke.hh>
|
||||
#include <spot/kripke/kripkegraph.hh>
|
||||
|
||||
using namespace std::string_literals;
|
||||
|
||||
|
|
@ -973,7 +974,11 @@ namespace spot
|
|||
strcpy(tmpopt, opt);
|
||||
tmpopt[n] = 'k';
|
||||
tmpopt[n + 1] = 0;
|
||||
preserve_names = true;
|
||||
// Preserve names if we have some state names, or if we are
|
||||
// not a kripke_graph.
|
||||
auto sn = aut->get_named_prop<std::vector<std::string>>("state-names");
|
||||
preserve_names =
|
||||
!!sn || !std::dynamic_pointer_cast<const kripke_graph>(aut);
|
||||
}
|
||||
|
||||
auto a = std::dynamic_pointer_cast<const twa_graph>(aut);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue