deprecate copy() in favor of make_twa_graph()
Fixes #258. * spot/twaalgos/copy.cc: Delete, and move the code... * spot/twa/twagraph.cc: ... in some anonymous namespace here. * spot/twa/twagraph.hh: Adjust the make_twa_graph() overload. * spot/twaalgos/copy.hh, NEWS: Mark copy() as deprecated and redirect to make_twa_graph(). * doc/org/upgrade2.org, doc/org/tut51.org, python/spot/impl.i, spot/twaalgos/dot.cc, spot/twaalgos/langmap.cc, tests/core/ikwiad.cc: Adjust callers. * spot/twaalgos/Makefile.am: Remove copy.cc.
This commit is contained in:
parent
1e9daa73f3
commit
8e685e00c9
12 changed files with 197 additions and 206 deletions
|
|
@ -471,7 +471,7 @@ With a small variant of the above code, we could also display the
|
|||
counterexample on the state space, but only because our state space is
|
||||
so small: displaying large state spaces is not sensible. Besides, highlighting
|
||||
a run only works on =twa_graph= automata, so we need to convert the
|
||||
Kripke structure to a =twa_graph=: this can be done with =copy()=. But
|
||||
Kripke structure to a =twa_graph=: this can be done with =make_twa_graph()=. But
|
||||
now =k= is no longer a Kripke structure (also not generated
|
||||
on-the-fly anymore), so the =print_dot()= function will display it as
|
||||
a classical automaton with conditions on edges rather than state:
|
||||
|
|
@ -493,7 +493,6 @@ passing the option "~k~" to =print_dot()= will fix that.
|
|||
#include <spot/twaalgos/translate.hh>
|
||||
#include <spot/twa/twaproduct.hh>
|
||||
#include <spot/twaalgos/emptiness.hh>
|
||||
#include <spot/twaalgos/copy.hh>
|
||||
<<demo-3-aux>>
|
||||
int main()
|
||||
{
|
||||
|
|
@ -509,8 +508,9 @@ passing the option "~k~" to =print_dot()= will fix that.
|
|||
spot::twa_graph_ptr af = spot::translator(d).run(f);
|
||||
|
||||
// Convert demo_kripke into an explicit graph
|
||||
spot::twa_graph_ptr k = spot::copy(std::make_shared<demo_kripke>(d),
|
||||
spot::twa::prop_set::all(), true);
|
||||
spot::twa_graph_ptr k =
|
||||
spot::make_twa_graph(std::make_shared<demo_kripke>(d),
|
||||
spot::twa::prop_set::all(), true);
|
||||
// Find a run of or demo_kripke that intersects af.
|
||||
if (auto run = k->intersecting_run(af))
|
||||
{
|
||||
|
|
@ -518,14 +518,14 @@ passing the option "~k~" to =print_dot()= will fix that.
|
|||
spot::print_dot(std::cout, k, ".k");
|
||||
}
|
||||
}
|
||||
#+END_SRC
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC dot :file kripke-3.png :cmdline -Tpng :cmd circo :var txt=demo-3 :exportss results
|
||||
$txt
|
||||
#+END_SRC
|
||||
#+BEGIN_SRC dot :file kripke-3.png :cmdline -Tpng :cmd circo :var txt=demo-3 :exportss results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
[[file:kripke-3.png]]
|
||||
#+RESULTS:
|
||||
[[file:kripke-3.png]]
|
||||
|
||||
* Possible improvements
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ that provide a function with a similar service.
|
|||
| ~tgbaalgos/dtbasat.hh~ | ~spot/twaalgos/dtbasat.hh~ | |
|
||||
| ~tgbaalgos/dtgbacomp.hh~ | ~spot/twaalgos/complement.hh~ | |
|
||||
| ~tgbaalgos/dtgbasat.hh~ | ~spot/twaalgos/dtwasat.hh~ | |
|
||||
| ~tgbaalgos/dupexp.hh~ | ~spot/twaalgos/copy.hh~ | also a copy constructor of twa |
|
||||
| ~tgbaalgos/dupexp.hh~ | ~spot/twaalgos/twagraph.hh~ | constructor of twa_graph |
|
||||
| ~tgbaalgos/eltl2tgba_lacim.hh~ | | not supported anymore |
|
||||
| ~tgbaalgos/emptiness.hh~ | ~spot/twaalgos/emptiness.hh~ | |
|
||||
| ~tgbaalgos/emptiness_stats.hh~ | ~spot/twaalgos/emptiness_stats.hh~ | |
|
||||
|
|
@ -615,7 +615,7 @@ for (auto i: aut->succ(s))
|
|||
| ~dstar_parse()~ | ~parse_aut()~ | single parser for all automata |
|
||||
| ~dtgba_complement()~ | ~dtwa_complement()~ | |
|
||||
| ~dupexp_bfs()~ | | deleted |
|
||||
| ~dupexp_dfs()~ | ~copy()~ | |
|
||||
| ~dupexp_dfs()~ | ~make_twa_graph()~ | |
|
||||
| ~format_parse_aut_errors()~ | ~parsed_aut::format_errors()~ | |
|
||||
| ~emptiness_check_instantiator::construct()~ | ~make_emptiness_check_instantiator()~ | |
|
||||
| ~emptiness_check_instantiator::max_acceptance_conditions()~ | ~emptiness_check_instantiator::max_sets()~ | |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue