adjust names for automata printers

The following renamings are made:

  never_claim_reachable -> print_never_claim
  hoa_reachable   -> print_hoa
  lbtt_reachable  -> print_lbtt
  dotty_reachable -> print_dot
  ltl::dotty      -> print_dot_psl

Fixes #89.

* src/ltlvisit/dotty.cc, src/ltlvisit/dotty.hh, src/taalgos/dotty.cc,
src/taalgos/dotty.hh src/twaalgos/dotty.cc, src/twaalgos/dotty.hh:
Rename...
* src/ltlvisit/dot.cc, src/ltlvisit/dot.hh src/taalgos/dot.cc,
src/taalgos/dot.hh src/twaalgos/dot.cc, src/twaalgos/dot.hh:
... those.
* bench/stutter/stutter_invariance_randomgraph.cc,
iface/ltsmin/modelcheck.cc, src/bin/common_aoutput.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgta.cc, src/dstarparse/dra2ba.cc,
src/ltlvisit/Makefile.am, src/taalgos/Makefile.am,
src/tests/checkpsl.cc, src/tests/checkta.cc,
src/tests/complementation.cc, src/tests/emptchk.cc,
src/tests/ltl2tgba.cc, src/tests/ltlprod.cc, src/tests/randtgba.cc,
src/tests/readltl.cc, src/tests/taatgba.cc, src/tests/twagraph.cc,
src/twa/twa.hh, src/twa/twasafracomplement.cc,
src/twaalgos/Makefile.am, src/twaalgos/dtbasat.cc,
src/twaalgos/dtgbasat.cc, src/twaalgos/dupexp.cc,
src/twaalgos/lbtt.cc, src/twaalgos/lbtt.hh,
src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/neverclaim.cc,
src/twaalgos/neverclaim.hh, wrap/python/ajax/spot.in,
wrap/python/spot.py, wrap/python/spot_impl.i,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/parsetgba.py: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-06-05 21:35:22 +02:00
parent 8fb7b279f7
commit 738f939ff8
40 changed files with 115 additions and 114 deletions

View file

@ -21,7 +21,7 @@
#include "ltlvisit/apcollect.hh" #include "ltlvisit/apcollect.hh"
#include "twaalgos/dtgbacomp.hh" #include "twaalgos/dtgbacomp.hh"
#include "twaalgos/randomgraph.hh" #include "twaalgos/randomgraph.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/product.hh" #include "twaalgos/product.hh"
#include "twaalgos/stutter.hh" #include "twaalgos/stutter.hh"
#include "twaalgos/stats.hh" #include "twaalgos/stats.hh"

View file

@ -18,7 +18,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ltsmin.hh" #include "ltsmin.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "ltlenv/defaultenv.hh" #include "ltlenv/defaultenv.hh"
#include "ltlast/allnodes.hh" #include "ltlast/allnodes.hh"
#include "ltlparse/public.hh" #include "ltlparse/public.hh"
@ -230,9 +230,9 @@ checked_main(int argc, char **argv)
if (output == DotModel) if (output == DotModel)
{ {
tm.start("dotty output"); tm.start("dot output");
spot::dotty_reachable(std::cout, model); spot::print_dot(std::cout, model);
tm.stop("dotty output"); tm.stop("dot output");
goto safe_exit; goto safe_exit;
} }
if (output == Kripke) if (output == Kripke)
@ -246,9 +246,9 @@ checked_main(int argc, char **argv)
if (output == DotFormula) if (output == DotFormula)
{ {
tm.start("dotty output"); tm.start("dot output");
spot::dotty_reachable(std::cout, prop); spot::print_dot(std::cout, prop);
tm.stop("dotty output"); tm.stop("dot output");
goto safe_exit; goto safe_exit;
} }
@ -256,9 +256,9 @@ checked_main(int argc, char **argv)
if (output == DotProduct) if (output == DotProduct)
{ {
tm.start("dotty output"); tm.start("dot output");
spot::dotty_reachable(std::cout, product); spot::print_dot(std::cout, product);
tm.stop("dotty output"); tm.stop("dot output");
goto safe_exit; goto safe_exit;
} }

View file

@ -27,7 +27,7 @@
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/lbtt.hh" #include "twaalgos/lbtt.hh"
#include "twaalgos/hoa.hh" #include "twaalgos/hoa.hh"
#include "twaalgos/neverclaim.hh" #include "twaalgos/neverclaim.hh"
@ -319,19 +319,19 @@ automaton_printer::print(const spot::twa_graph_ptr& aut,
// Do not output anything. // Do not output anything.
break; break;
case Dot: case Dot:
spot::dotty_reachable(*out, aut, opt_dot); spot::print_dot(*out, aut, opt_dot);
break; break;
case Lbtt: case Lbtt:
spot::lbtt_reachable(*out, aut, type == spot::postprocessor::BA); spot::print_lbtt(*out, aut, type == spot::postprocessor::BA);
break; break;
case Lbtt_t: case Lbtt_t:
spot::lbtt_reachable(*out, aut, false); spot::print_lbtt(*out, aut, false);
break; break;
case Hoa: case Hoa:
spot::hoa_reachable(*out, aut, hoa_opt) << '\n'; spot::hoa_reachable(*out, aut, hoa_opt) << '\n';
break; break;
case Spin: case Spin:
spot::never_claim_reachable(*out, aut, opt_never); spot::print_never_claim(*out, aut, opt_never);
break; break;
case Stats: case Stats:
statistics.set_output(*out); statistics.set_output(*out);

View file

@ -32,7 +32,7 @@
#include "common_post.hh" #include "common_post.hh"
#include "common_file.hh" #include "common_file.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/lbtt.hh" #include "twaalgos/lbtt.hh"
#include "twaalgos/hoa.hh" #include "twaalgos/hoa.hh"
#include "twaalgos/neverclaim.hh" #include "twaalgos/neverclaim.hh"
@ -388,19 +388,19 @@ namespace
switch (format) switch (format)
{ {
case Dot: case Dot:
spot::dotty_reachable(*out, aut, opt_dot); spot::print_dot(*out, aut, opt_dot);
break; break;
case Lbtt: case Lbtt:
spot::lbtt_reachable(*out, aut, type == spot::postprocessor::BA); spot::print_lbtt(*out, aut, type == spot::postprocessor::BA);
break; break;
case Lbtt_t: case Lbtt_t:
spot::lbtt_reachable(*out, aut, false); spot::print_lbtt(*out, aut, false);
break; break;
case Hoa: case Hoa:
spot::hoa_reachable(*out, aut, hoa_opt) << '\n'; spot::hoa_reachable(*out, aut, hoa_opt) << '\n';
break; break;
case Spin: case Spin:
spot::never_claim_reachable(*out, aut, opt_never); spot::print_never_claim(*out, aut, opt_never);
break; break;
case Stats: case Stats:
statistics.set_output(*out); statistics.set_output(*out);

View file

@ -35,13 +35,13 @@
#include "ltlparse/public.hh" #include "ltlparse/public.hh"
#include "ltlvisit/print.hh" #include "ltlvisit/print.hh"
#include "ltlvisit/simplify.hh" #include "ltlvisit/simplify.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/ltl2tgba_fm.hh" #include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/translate.hh" #include "twaalgos/translate.hh"
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "taalgos/tgba2ta.hh" #include "taalgos/tgba2ta.hh"
#include "taalgos/dotty.hh" #include "taalgos/dot.hh"
#include "taalgos/minimize.hh" #include "taalgos/minimize.hh"
#include "misc/optionmap.hh" #include "misc/optionmap.hh"
@ -198,14 +198,14 @@ namespace
opt_with_artificial_livelock); opt_with_artificial_livelock);
if (level != spot::postprocessor::Low) if (level != spot::postprocessor::Low)
testing_automaton = spot::minimize_ta(testing_automaton); testing_automaton = spot::minimize_ta(testing_automaton);
spot::dotty_reachable(std::cout, testing_automaton); spot::print_dot(std::cout, testing_automaton);
} }
else else
{ {
auto tgta = tgba_to_tgta(aut, ap_set); auto tgta = tgba_to_tgta(aut, ap_set);
if (level != spot::postprocessor::Low) if (level != spot::postprocessor::Low)
tgta = spot::minimize_tgta(tgta); tgta = spot::minimize_tgta(tgta);
spot::dotty_reachable(std::cout, tgta->get_ta()); spot::print_dot(std::cout, tgta->get_ta());
} }
f->destroy(); f->destroy();
flush_cout(); flush_cout();

View file

@ -23,7 +23,7 @@
#include "twaalgos/reachiter.hh" #include "twaalgos/reachiter.hh"
#include "twaalgos/gtec/gtec.hh" #include "twaalgos/gtec/gtec.hh"
#include "twaalgos/sccfilter.hh" #include "twaalgos/sccfilter.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
namespace spot namespace spot
{ {

View file

@ -29,7 +29,7 @@ ltlvisit_HEADERS = \
apcollect.hh \ apcollect.hh \
contain.hh \ contain.hh \
clone.hh \ clone.hh \
dotty.hh \ dot.hh \
dump.hh \ dump.hh \
exclusive.hh \ exclusive.hh \
length.hh \ length.hh \
@ -52,7 +52,7 @@ libltlvisit_la_SOURCES = \
apcollect.cc \ apcollect.cc \
contain.cc \ contain.cc \
clone.cc \ clone.cc \
dotty.cc \ dot.cc \
dump.cc \ dump.cc \
exclusive.cc \ exclusive.cc \
length.cc \ length.cc \

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire de // Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire
// Recherche et Développement de l'Epita (LRDE). // de Recherche et Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 // Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université // (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// Pierre et Marie Curie. // Pierre et Marie Curie.
@ -21,7 +21,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "misc/hash.hh" #include "misc/hash.hh"
#include "dotty.hh" #include "dot.hh"
#include "ltlast/visitor.hh" #include "ltlast/visitor.hh"
#include "ltlast/allnodes.hh" #include "ltlast/allnodes.hh"
#include <ostream> #include <ostream>
@ -114,9 +114,9 @@ namespace spot
void finish() void finish()
{ {
os_ << " subgraph atoms {" << std::endl os_ << (" subgraph atoms {\n"
<< " rank=sink;" << std::endl " rank=sink;\n")
<< sinks_->str() << " }" << std::endl; << sinks_->str() << " }\n";
delete sinks_; delete sinks_;
} }
@ -154,7 +154,7 @@ namespace spot
os_ << " [taillabel=\"L\"]"; os_ << " [taillabel=\"L\"]";
else if (childnum == -2) else if (childnum == -2)
os_ << " [taillabel=\"R\"]"; os_ << " [taillabel=\"R\"]";
os_ << ';' << std::endl; os_ << ";\n";
} }
father_ = node; father_ = node;
@ -177,11 +177,11 @@ namespace spot
} }
std::ostream& std::ostream&
dotty(std::ostream& os, const formula* f) print_dot_psl(std::ostream& os, const formula* f)
{ {
dotty_visitor::map m; dotty_visitor::map m;
dotty_visitor v(os, m); dotty_visitor v(os, m);
os << "digraph G {" << std::endl; os << "digraph G {\n";
f->accept(v); f->accept(v);
v.finish(); v.finish();
os << '}' << std::endl; os << '}' << std::endl;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2013 Laboratoire de Recherche et Développement // Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
// de l'Epita (LRDE). // de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -37,6 +37,6 @@ namespace spot
/// \c dot is part of the GraphViz package /// \c dot is part of the GraphViz package
/// http://www.research.att.com/sw/tools/graphviz/ /// http://www.research.att.com/sw/tools/graphviz/
SPOT_API SPOT_API
std::ostream& dotty(std::ostream& os, const formula* f); std::ostream& print_dot_psl(std::ostream& os, const formula* f);
} }
} }

View file

@ -1,5 +1,5 @@
## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
## Copyright (C) 2010, 2012, 2013 Laboratoire de Recherche et ## Copyright (C) 2010, 2012, 2013, 2015 Laboratoire de Recherche et
## Développement de l'Epita (LRDE). ## Développement de l'Epita (LRDE).
## ##
## This file is part of Spot, a model checking library. ## This file is part of Spot, a model checking library.
@ -25,7 +25,7 @@ taalgosdir = $(pkgincludedir)/taalgos
taalgos_HEADERS = \ taalgos_HEADERS = \
tgba2ta.hh \ tgba2ta.hh \
dotty.hh \ dot.hh \
reachiter.hh \ reachiter.hh \
stats.hh \ stats.hh \
statessetbuilder.hh \ statessetbuilder.hh \
@ -35,7 +35,7 @@ taalgos_HEADERS = \
noinst_LTLIBRARIES = libtaalgos.la noinst_LTLIBRARIES = libtaalgos.la
libtaalgos_la_SOURCES = \ libtaalgos_la_SOURCES = \
tgba2ta.cc \ tgba2ta.cc \
dotty.cc \ dot.cc \
reachiter.cc \ reachiter.cc \
stats.cc \ stats.cc \
statessetbuilder.cc \ statessetbuilder.cc \

View file

@ -18,7 +18,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <ostream> #include <ostream>
#include "dotty.hh" #include "dot.hh"
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "reachiter.hh" #include "reachiter.hh"
#include "misc/escape.hh" #include "misc/escape.hh"
@ -234,7 +234,7 @@ namespace spot
} }
std::ostream& std::ostream&
dotty_reachable(std::ostream& os, const const_ta_ptr& a, const char* opt) print_dot(std::ostream& os, const const_ta_ptr& a, const char* opt)
{ {
dotty_bfs d(os, a, opt); dotty_bfs d(os, a, opt);
d.run(); d.run();

View file

@ -25,6 +25,6 @@
namespace spot namespace spot
{ {
SPOT_API std::ostream& SPOT_API std::ostream&
dotty_reachable(std::ostream& os, const const_ta_ptr& a, print_dot(std::ostream& os, const const_ta_ptr& a,
const char* opt = nullptr); const char* opt = nullptr);
} }

View file

@ -28,7 +28,7 @@
#include "twaalgos/ltl2taa.hh" #include "twaalgos/ltl2taa.hh"
#include "twaalgos/sccfilter.hh" #include "twaalgos/sccfilter.hh"
#include "twaalgos/product.hh" #include "twaalgos/product.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
void void
syntax(char* prog) syntax(char* prog)

View file

@ -31,7 +31,7 @@
#include "twaalgos/stats.hh" #include "twaalgos/stats.hh"
#include "taalgos/minimize.hh" #include "taalgos/minimize.hh"
#include "taalgos/tgba2ta.hh" #include "taalgos/tgba2ta.hh"
#include "taalgos/dotty.hh" #include "taalgos/dot.hh"
#include "taalgos/stats.hh" #include "taalgos/stats.hh"
void void

View file

@ -19,7 +19,7 @@
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/hoa.hh" #include "twaalgos/hoa.hh"
#include "hoaparse/public.hh" #include "hoaparse/public.hh"
#include "twa/twaproduct.hh" #include "twa/twaproduct.hh"
@ -136,7 +136,7 @@ int main(int argc, char* argv[])
if (save_hoa) if (save_hoa)
spot::hoa_reachable(std::cout, complement, nullptr); spot::hoa_reachable(std::cout, complement, nullptr);
else else
spot::dotty_reachable(std::cout, complement); spot::print_dot(std::cout, complement);
} }
if (print_safra) if (print_safra)
@ -158,7 +158,7 @@ int main(int argc, char* argv[])
spot::twa_ptr complement = 0; spot::twa_ptr complement = 0;
complement = spot::make_safra_complement(a); complement = spot::make_safra_complement(a);
spot::dotty_reachable(std::cout, complement); spot::print_dot(std::cout, complement);
f1->destroy(); f1->destroy();
} }
else if (stats) else if (stats)
@ -253,7 +253,7 @@ int main(int argc, char* argv[])
return_value = 1; return_value = 1;
if (auto run = res->accepting_run()) if (auto run = res->accepting_run())
{ {
spot::dotty_reachable(std::cout, ec->automaton()); spot::print_dot(std::cout, ec->automaton());
spot::print_tgba_run(std::cout, ec->automaton(), run); spot::print_tgba_run(std::cout, ec->automaton(), run);
} }
} }

View file

@ -30,7 +30,7 @@
#include "twaalgos/degen.hh" #include "twaalgos/degen.hh"
#include "twa/twaproduct.hh" #include "twa/twaproduct.hh"
#include "twaalgos/gtec/gtec.hh" #include "twaalgos/gtec/gtec.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/emptiness.hh" #include "twaalgos/emptiness.hh"
void void
@ -163,7 +163,7 @@ main(int argc, char** argv)
if (auto run = res->accepting_run()) if (auto run = res->accepting_run())
{ {
auto ar = spot::tgba_run_to_tgba(a, run); auto ar = spot::tgba_run_to_tgba(a, run);
spot::dotty_reachable(std::cout, ar); spot::print_dot(std::cout, ar);
} }
std::cout << '\n'; std::cout << '\n';
if (runs == 0) if (runs == 0)

View file

@ -33,7 +33,7 @@
#include "twaalgos/ltl2tgba_fm.hh" #include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/ltl2taa.hh" #include "twaalgos/ltl2taa.hh"
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/lbtt.hh" #include "twaalgos/lbtt.hh"
#include "twaalgos/hoa.hh" #include "twaalgos/hoa.hh"
#include "twaalgos/degen.hh" #include "twaalgos/degen.hh"
@ -69,7 +69,7 @@
#include "twaalgos/stutter.hh" #include "twaalgos/stutter.hh"
#include "taalgos/tgba2ta.hh" #include "taalgos/tgba2ta.hh"
#include "taalgos/dotty.hh" #include "taalgos/dot.hh"
#include "taalgos/stats.hh" #include "taalgos/stats.hh"
std::string std::string
@ -1368,7 +1368,7 @@ checked_main(int argc, char** argv)
switch (output) switch (output)
{ {
case 0: case 0:
spot::dotty_reachable(std::cout, testing_automaton); spot::print_dot(std::cout, testing_automaton);
break; break;
case 12: case 12:
stats_reachable(testing_automaton).dump(std::cout); stats_reachable(testing_automaton).dump(std::cout);
@ -1402,7 +1402,7 @@ checked_main(int argc, char** argv)
switch (output) switch (output)
{ {
case 0: case 0:
spot::dotty_reachable(std::cout, std::dynamic_pointer_cast spot::print_dot(std::cout, std::dynamic_pointer_cast
<spot::tgta_explicit>(a)->get_ta()); <spot::tgta_explicit>(a)->get_ta());
break; break;
case 12: case 12:
@ -1478,19 +1478,19 @@ checked_main(int argc, char** argv)
switch (output) switch (output)
{ {
case 0: case 0:
spot::dotty_reachable(std::cout, a); spot::print_dot(std::cout, a);
break; break;
case 5: case 5:
a->get_dict()->dump(std::cout); a->get_dict()->dump(std::cout);
break; break;
case 6: case 6:
spot::lbtt_reachable(std::cout, a); spot::print_lbtt(std::cout, a);
break; break;
case 8: case 8:
{ {
assert(degeneralize_opt == DegenSBA); assert(degeneralize_opt == DegenSBA);
if (assume_sba) if (assume_sba)
spot::never_claim_reachable(std::cout, a, opt_never); spot::print_never_claim(std::cout, a, opt_never);
else else
{ {
// It is possible that we have applied other // It is possible that we have applied other
@ -1498,7 +1498,7 @@ checked_main(int argc, char** argv)
// degeneralization. Let's degeneralize again! // degeneralization. Let's degeneralize again!
auto s = spot::degeneralize(ensure_digraph(a), degen_reset, auto s = spot::degeneralize(ensure_digraph(a), degen_reset,
degen_order, degen_cache); degen_order, degen_cache);
spot::never_claim_reachable(std::cout, s, opt_never); spot::print_never_claim(std::cout, s, opt_never);
} }
break; break;
} }
@ -1700,7 +1700,7 @@ checked_main(int argc, char** argv)
if (graph_run_tgba_opt) if (graph_run_tgba_opt)
{ {
auto ar = spot::tgba_run_to_tgba(a, run); auto ar = spot::tgba_run_to_tgba(a, run);
spot::dotty_reachable(std::cout, ar); spot::print_dot(std::cout, ar);
} }
else else
{ {

View file

@ -27,7 +27,7 @@
#include "ltlparse/public.hh" #include "ltlparse/public.hh"
#include "twaalgos/product.hh" #include "twaalgos/product.hh"
#include "twaalgos/ltl2tgba_fm.hh" #include "twaalgos/ltl2tgba_fm.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
void void
syntax(char* prog) syntax(char* prog)
@ -65,7 +65,7 @@ main(int argc, char** argv)
auto a2 = spot::ltl_to_tgba_fm(f2, dict); auto a2 = spot::ltl_to_tgba_fm(f2, dict);
f1->destroy(); f1->destroy();
f2->destroy(); f2->destroy();
spot::dotty_reachable(std::cout, product(a1, a2)); spot::print_dot(std::cout, product(a1, a2));
} }
} }
assert(spot::ltl::atomic_prop::instance_count() == 0); assert(spot::ltl::atomic_prop::instance_count() == 0);

View file

@ -40,7 +40,7 @@
#include "twaalgos/hoa.hh" #include "twaalgos/hoa.hh"
#include "twaalgos/stats.hh" #include "twaalgos/stats.hh"
#include "ltlenv/defaultenv.hh" #include "ltlenv/defaultenv.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "misc/random.hh" #include "misc/random.hh"
#include "misc/optionmap.hh" #include "misc/optionmap.hh"
#include "twaalgos/degen.hh" #include "twaalgos/degen.hh"
@ -919,7 +919,7 @@ main(int argc, char** argv)
if (opt_dot) if (opt_dot)
{ {
dotty_reachable(std::cout, a); print_dot(std::cout, a);
} }
if (!opt_ec) if (!opt_ec)
{ {

View file

@ -26,7 +26,7 @@
#include <cstring> #include <cstring>
#include "ltlparse/public.hh" #include "ltlparse/public.hh"
#include "ltlvisit/dump.hh" #include "ltlvisit/dump.hh"
#include "ltlvisit/dotty.hh" #include "ltlvisit/dot.hh"
#include "ltlast/allnodes.hh" #include "ltlast/allnodes.hh"
void void
@ -87,7 +87,7 @@ main(int argc, char** argv)
dump_instances("before"); dump_instances("before");
#ifdef DOTTY #ifdef DOTTY
spot::ltl::dotty(std::cout, f); spot::ltl::print_dot_psl(std::cout, f);
#else #else
spot::ltl::dump(std::cout, f); spot::ltl::dump(std::cout, f);
std::cout << std::endl; std::cout << std::endl;
@ -105,6 +105,7 @@ main(int argc, char** argv)
assert(spot::ltl::atomic_prop::instance_count() == 0); assert(spot::ltl::atomic_prop::instance_count() == 0);
assert(spot::ltl::unop::instance_count() == 0); assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0); assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::bunop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0); assert(spot::ltl::multop::instance_count() == 0);
return exit_code; return exit_code;
} }

View file

@ -22,7 +22,7 @@
#include "misc/hash.hh" #include "misc/hash.hh"
#include "ltlenv/defaultenv.hh" #include "ltlenv/defaultenv.hh"
#include "ltlast/allnodes.hh" #include "ltlast/allnodes.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twa/taatgba.hh" #include "twa/taatgba.hh"
int int
@ -46,7 +46,7 @@ main()
a->add_condition(t3, e.require("c")); a->add_condition(t3, e.require("c"));
a->set_init_state("state 1"); a->set_init_state("state 1");
spot::dotty_reachable(std::cout, a); spot::print_dot(std::cout, a);
} }
assert(spot::ltl::atomic_prop::instance_count() == 0); assert(spot::ltl::atomic_prop::instance_count() == 0);

View file

@ -20,7 +20,7 @@
#include <iostream> #include <iostream>
#include "twa/twagraph.hh" #include "twa/twagraph.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "ltlenv/defaultenv.hh" #include "ltlenv/defaultenv.hh"
void f1() void f1()
@ -50,7 +50,7 @@ void f1()
tg->new_transition(s3, s2, p1 >> p2, 0U); tg->new_transition(s3, s2, p1 >> p2, 0U);
tg->new_transition(s3, s3, bddtrue, tg->acc().marks({0, 1})); tg->new_transition(s3, s3, bddtrue, tg->acc().marks({0, 1}));
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
{ {
auto i = tg->get_graph().out_iteraser(s3); auto i = tg->get_graph().out_iteraser(s3);
@ -58,14 +58,14 @@ void f1()
i.erase(); i.erase();
i.erase(); i.erase();
assert(!i); assert(!i);
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
} }
{ {
auto i = tg->get_graph().out_iteraser(s3); auto i = tg->get_graph().out_iteraser(s3);
i.erase(); i.erase();
assert(!i); assert(!i);
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
} }
auto all = tg->acc().marks({0, 1}); auto all = tg->acc().marks({0, 1});
@ -76,9 +76,9 @@ void f1()
std::cerr << tg->num_transitions() << '\n'; std::cerr << tg->num_transitions() << '\n';
assert(tg->num_transitions() == 7); assert(tg->num_transitions() == 7);
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
tg->merge_transitions(); tg->merge_transitions();
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
std::cerr << tg->num_transitions() << '\n'; std::cerr << tg->num_transitions() << '\n';
assert(tg->num_transitions() == 5); assert(tg->num_transitions() == 5);
@ -86,7 +86,7 @@ void f1()
// Add enough states so that the state vector is reallocated. // Add enough states so that the state vector is reallocated.
for (unsigned i = 0; i < 100; ++i) for (unsigned i = 0; i < 100; ++i)
tg->new_state(); tg->new_state();
spot::dotty_reachable(std::cout, tg); spot::print_dot(std::cout, tg);
} }
int main() int main()

View file

@ -608,7 +608,7 @@ namespace spot
/// Implementing this method is optional; the default annotation /// Implementing this method is optional; the default annotation
/// is the empty string. /// is the empty string.
/// ///
/// This method is used for instance in dotty_reachable(), /// This method is used for instance in print_dot(),
/// and replay_tgba_run(). /// and replay_tgba_run().
/// ///
/// \param t a non-done twa_succ_iterator for this automaton /// \param t a non-done twa_succ_iterator for this automaton

View file

@ -32,7 +32,7 @@
#include "misc/hashfunc.hh" #include "misc/hashfunc.hh"
#include "ltlast/formula.hh" #include "ltlast/formula.hh"
#include "ltlast/constant.hh" #include "ltlast/constant.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twa/twasafracomplement.hh" #include "twa/twasafracomplement.hh"
#include "twaalgos/degen.hh" #include "twaalgos/degen.hh"

View file

@ -37,7 +37,7 @@ twaalgos_HEADERS = \
cycles.hh \ cycles.hh \
dtgbacomp.hh \ dtgbacomp.hh \
degen.hh \ degen.hh \
dotty.hh \ dot.hh \
dtbasat.hh \ dtbasat.hh \
dtgbasat.hh \ dtgbasat.hh \
dupexp.hh \ dupexp.hh \
@ -95,7 +95,7 @@ libtwaalgos_la_SOURCES = \
cycles.cc \ cycles.cc \
dtgbacomp.cc \ dtgbacomp.cc \
degen.cc \ degen.cc \
dotty.cc \ dot.cc \
dtbasat.cc \ dtbasat.cc \
dtgbasat.cc \ dtgbasat.cc \
dupexp.cc \ dupexp.cc \

View file

@ -23,7 +23,7 @@
#include <ostream> #include <ostream>
#include <stdexcept> #include <stdexcept>
#include "twa/twagraph.hh" #include "twa/twagraph.hh"
#include "dotty.hh" #include "dot.hh"
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "reachiter.hh" #include "reachiter.hh"
#include "misc/escape.hh" #include "misc/escape.hh"
@ -528,7 +528,7 @@ namespace spot
} // anonymous namespace } // anonymous namespace
std::ostream& std::ostream&
dotty_reachable(std::ostream& os, const const_twa_ptr& g, print_dot(std::ostream& os, const const_twa_ptr& g,
const char* options) const char* options)
{ {
dotty_output d(os, options); dotty_output d(os, options);

View file

@ -41,7 +41,7 @@ namespace spot
/// automaton, 'n' shows the name, 'c' uses circle-shaped states, /// automaton, 'n' shows the name, 'c' uses circle-shaped states,
/// 'a' shows the acceptance. /// 'a' shows the acceptance.
SPOT_API std::ostream& SPOT_API std::ostream&
dotty_reachable(std::ostream& os, print_dot(std::ostream& os,
const const_twa_ptr& g, const const_twa_ptr& g,
const char* options = nullptr); const char* options = nullptr);
} }

View file

@ -29,7 +29,7 @@
#include "stats.hh" #include "stats.hh"
#include "misc/satsolver.hh" #include "misc/satsolver.hh"
#include "misc/timer.hh" #include "misc/timer.hh"
#include "dotty.hh" #include "dot.hh"
// If you set the SPOT_TMPKEEP environment variable the temporary // If you set the SPOT_TMPKEEP environment variable the temporary
// file used to communicate with the sat solver will be left in // file used to communicate with the sat solver will be left in
@ -800,7 +800,7 @@ namespace spot
} }
static bool show = getenv("SPOT_SATSHOW"); static bool show = getenv("SPOT_SATSHOW");
if (show && res) if (show && res)
dotty_reachable(std::cout, res); print_dot(std::cout, res);
trace << "dtba_sat_synthetize(...) = " << res << '\n'; trace << "dtba_sat_synthetize(...) = " << res << '\n';
return res; return res;

View file

@ -33,7 +33,7 @@
#include "misc/timer.hh" #include "misc/timer.hh"
#include "isweakscc.hh" #include "isweakscc.hh"
#include "isdet.hh" #include "isdet.hh"
#include "dotty.hh" #include "dot.hh"
#include "complete.hh" #include "complete.hh"
#include "misc/optionmap.hh" #include "misc/optionmap.hh"
#include "dtbasat.hh" #include "dtbasat.hh"
@ -1147,7 +1147,7 @@ namespace spot
} }
static bool show = getenv("SPOT_SATSHOW"); static bool show = getenv("SPOT_SATSHOW");
if (show && res) if (show && res)
dotty_reachable(std::cout, res); print_dot(std::cout, res);
trace << "dtgba_sat_synthetize(...) = " << res << '\n'; trace << "dtgba_sat_synthetize(...) = " << res << '\n';
return res; return res;

View file

@ -26,7 +26,7 @@
#include <string> #include <string>
#include <map> #include <map>
#include "reachiter.hh" #include "reachiter.hh"
#include "dotty.hh" #include "dot.hh"
namespace spot namespace spot
{ {

View file

@ -133,7 +133,7 @@ namespace spot
} }
std::ostream& std::ostream&
lbtt_reachable(std::ostream& os, const const_twa_ptr& g, bool sba) print_lbtt(std::ostream& os, const const_twa_ptr& g, bool sba)
{ {
if (!g->acc().is_generalized_buchi()) if (!g->acc().is_generalized_buchi())
throw std::runtime_error throw std::runtime_error

View file

@ -35,5 +35,5 @@ namespace spot
/// \param sba Assume \a g is an SBA and use LBTT's state-based /// \param sba Assume \a g is an SBA and use LBTT's state-based
/// acceptance format (similar to LBT's format). /// acceptance format (similar to LBT's format).
SPOT_API std::ostream& SPOT_API std::ostream&
lbtt_reachable(std::ostream& os, const const_twa_ptr& g, bool sba = false); print_lbtt(std::ostream& os, const const_twa_ptr& g, bool sba = false);
} }

View file

@ -38,7 +38,7 @@
#include "ltl2tgba_fm.hh" #include "ltl2tgba_fm.hh"
#include "twa/bddprint.hh" #include "twa/bddprint.hh"
#include "twaalgos/sccinfo.hh" #include "twaalgos/sccinfo.hh"
//#include "twaalgos/dotty.hh" //#include "twaalgos/dot.hh"
namespace spot namespace spot
{ {
@ -1170,7 +1170,7 @@ namespace spot
// short-lived. (Maybe it would even work without this line.) // short-lived. (Maybe it would even work without this line.)
dict_.dict->register_propositions(dict_.var_set, a); dict_.dict->register_propositions(dict_.var_set, a);
//dotty_reachable(std::cerr, a); //print_dot(std::cerr, a);
// The following code trims the automaton in a crude way by // The following code trims the automaton in a crude way by
// eliminating SCCs that are not coaccessible. It does not // eliminating SCCs that are not coaccessible. It does not

View file

@ -202,7 +202,7 @@ namespace spot
} // anonymous namespace } // anonymous namespace
std::ostream& std::ostream&
never_claim_reachable(std::ostream& os, const const_twa_ptr& g, print_never_claim(std::ostream& os, const const_twa_ptr& g,
const char* options) const char* options)
{ {
if (!(g->acc().is_buchi() || g->acc().is_true())) if (!(g->acc().is_buchi() || g->acc().is_true()))

View file

@ -39,7 +39,7 @@ namespace spot
/// these requirements, call degeneralize() first. /// these requirements, call degeneralize() first.
/// \param opt a string of option: 'c' to comment each state /// \param opt a string of option: 'c' to comment each state
SPOT_API std::ostream& SPOT_API std::ostream&
never_claim_reachable(std::ostream& os, print_never_claim(std::ostream& os,
const const_twa_ptr& g, const const_twa_ptr& g,
const char* opt = nullptr); const char* opt = nullptr);
} }

View file

@ -288,16 +288,16 @@ However you may download the <a href="''' + cgi.escape(autprefix)
def render_automaton(automaton, dont_run_dot): def render_automaton(automaton, dont_run_dot):
dotsrc = spot.ostringstream() dotsrc = spot.ostringstream()
if isinstance(automaton, spot.ta): # TA/GTA if isinstance(automaton, spot.ta): # TA/GTA
spot.dotty_reachable(dotsrc, automaton) spot.print_dot(dotsrc, automaton)
elif hasattr(automaton, 'get_ta'): # TGTA elif hasattr(automaton, 'get_ta'): # TGTA
spot.dotty_reachable(dotsrc, automaton.get_ta()) spot.print_dot(dotsrc, automaton.get_ta())
else: # TGBA else: # TGBA
spot.dotty_reachable(dotsrc, automaton, "N") spot.print_dot(dotsrc, automaton, "N")
render_dot_maybe(dotsrc.str(), dont_run_dot) render_dot_maybe(dotsrc.str(), dont_run_dot)
def render_formula(f): def render_formula(f):
dotsrc = spot.ostringstream() dotsrc = spot.ostringstream()
spot.dotty(dotsrc, f) spot.print_dot_psl(dotsrc, f)
render_dot_maybe(dotsrc.str(), False) render_dot_maybe(dotsrc.str(), False)
def print_stats(automaton, detinfo = False, ta = False): def print_stats(automaton, detinfo = False, ta = False):
@ -722,7 +722,7 @@ else:
if output_type == 'a': if output_type == 'a':
if buchi_type == 'i': if buchi_type == 'i':
s = spot.ostringstream() s = spot.ostringstream()
spot.never_claim_reachable(s, degen, f) spot.print_never_claim(s, degen, f)
unbufprint('<div class="neverclaim">%s</div>' % cgi.escape(s.str())) unbufprint('<div class="neverclaim">%s</div>' % cgi.escape(s.str()))
del s del s
else: # 't' or 's' else: # 't' or 's'

View file

@ -71,7 +71,7 @@ def _ostream_to_svg(ostr):
def _render_automaton_as_svg(a, opt=None): def _render_automaton_as_svg(a, opt=None):
ostr = ostringstream() ostr = ostringstream()
dotty_reachable(ostr, a, opt) print_dot(ostr, a, opt)
return _ostream_to_svg(ostr) return _ostream_to_svg(ostr)
twa._repr_svg_ = _render_automaton_as_svg twa._repr_svg_ = _render_automaton_as_svg
@ -83,7 +83,7 @@ def _render_formula_as_svg(a):
# installed. # installed.
from IPython.display import SVG from IPython.display import SVG
ostr = ostringstream() ostr = ostringstream()
dotty(ostr, a) print_dot_psl(ostr, a)
return SVG(_ostream_to_svg(ostr)) return SVG(_ostream_to_svg(ostr))
def _return_automaton_as_svg(a, opt=None): def _return_automaton_as_svg(a, opt=None):
@ -128,15 +128,15 @@ def _twa_to_str(a, format='hoa', opt=None):
return ostr.str() return ostr.str()
if format == 'dot': if format == 'dot':
ostr = ostringstream() ostr = ostringstream()
dotty_reachable(ostr, a, opt) print_dot(ostr, a, opt)
return ostr.str() return ostr.str()
if format == 'spin': if format == 'spin':
ostr = ostringstream() ostr = ostringstream()
never_claim_reachable(ostr, a, opt) print_never_claim(ostr, a, opt)
return ostr.str() return ostr.str()
if format == 'lbtt': if format == 'lbtt':
ostr = ostringstream() ostr = ostringstream()
lbtt_reachable(ostr, a, bool(opt)) print_lbtt(ostr, a, bool(opt))
return ostr.str() return ostr.str()
raise ValueError("unknown string format: " + format) raise ValueError("unknown string format: " + format)

View file

@ -97,7 +97,7 @@ namespace std {
#include "twa/bdddict.hh" #include "twa/bdddict.hh"
#include "ltlvisit/apcollect.hh" #include "ltlvisit/apcollect.hh"
#include "ltlvisit/dotty.hh" #include "ltlvisit/dot.hh"
#include "ltlvisit/dump.hh" #include "ltlvisit/dump.hh"
#include "ltlvisit/lunabbrev.hh" #include "ltlvisit/lunabbrev.hh"
#include "ltlvisit/nenoform.hh" #include "ltlvisit/nenoform.hh"
@ -117,7 +117,7 @@ namespace std {
#include "twa/twaproduct.hh" #include "twa/twaproduct.hh"
#include "twaalgos/cleanacc.hh" #include "twaalgos/cleanacc.hh"
#include "twaalgos/dotty.hh" #include "twaalgos/dot.hh"
#include "twaalgos/degen.hh" #include "twaalgos/degen.hh"
#include "twaalgos/dupexp.hh" #include "twaalgos/dupexp.hh"
#include "twaalgos/emptiness.hh" #include "twaalgos/emptiness.hh"
@ -149,7 +149,7 @@ namespace std {
#include "ta/taexplicit.hh" #include "ta/taexplicit.hh"
#include "ta/tgtaexplicit.hh" #include "ta/tgtaexplicit.hh"
#include "taalgos/tgba2ta.hh" #include "taalgos/tgba2ta.hh"
#include "taalgos/dotty.hh" #include "taalgos/dot.hh"
#include "taalgos/stats.hh" #include "taalgos/stats.hh"
#include "taalgos/minimize.hh" #include "taalgos/minimize.hh"
@ -239,7 +239,7 @@ using namespace spot;
%include "twa/twa.hh" %include "twa/twa.hh"
%include "ltlvisit/apcollect.hh" %include "ltlvisit/apcollect.hh"
%include "ltlvisit/dotty.hh" %include "ltlvisit/dot.hh"
%include "ltlvisit/dump.hh" %include "ltlvisit/dump.hh"
%include "ltlvisit/lunabbrev.hh" %include "ltlvisit/lunabbrev.hh"
%include "ltlvisit/nenoform.hh" %include "ltlvisit/nenoform.hh"
@ -261,7 +261,7 @@ using namespace spot;
%include "twaalgos/cleanacc.hh" %include "twaalgos/cleanacc.hh"
%include "twaalgos/degen.hh" %include "twaalgos/degen.hh"
%include "twaalgos/dotty.hh" %include "twaalgos/dot.hh"
%include "twaalgos/dupexp.hh" %include "twaalgos/dupexp.hh"
%include "twaalgos/emptiness.hh" %include "twaalgos/emptiness.hh"
%include "twaalgos/gtec/gtec.hh" %include "twaalgos/gtec/gtec.hh"
@ -292,7 +292,7 @@ using namespace spot;
%include "ta/taexplicit.hh" %include "ta/taexplicit.hh"
%include "ta/tgtaexplicit.hh" %include "ta/tgtaexplicit.hh"
%include "taalgos/tgba2ta.hh" %include "taalgos/tgba2ta.hh"
%include "taalgos/dotty.hh" %include "taalgos/dot.hh"
%include "taalgos/stats.hh" %include "taalgos/stats.hh"
%include "taalgos/minimize.hh" %include "taalgos/minimize.hh"

View file

@ -111,11 +111,11 @@ if f:
a = degeneralized = spot.degeneralize(a) a = degeneralized = spot.degeneralize(a)
if output == 0: if output == 0:
spot.dotty_reachable(cout, a) spot.print_dot(cout, a)
elif output == 5: elif output == 5:
a.get_dict().dump(cout) a.get_dict().dump(cout)
elif output == 6: elif output == 6:
spot.lbtt_reachable(cout, a) spot.print_lbtt(cout, a)
else: else:
assert "unknown output option" assert "unknown output option"

View file

@ -37,7 +37,7 @@ a = spot.hoa_parse(filename, p, spot.make_bdd_dict())
assert not p assert not p
spot.dotty_reachable(spot.get_cout(), a.aut) spot.print_dot(spot.get_cout(), a.aut)
del p del p
del a del a