Commit 7a7ed8a6 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

rename dba_complement() to dtgba_complement()

* src/tgbaalgos/dbacomp.cc, src/tgbaalgos/dbacomp.hh
(dba_complement): Rename to...
* src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbacomp.hh
(dtgba_complement): ... this.
* src/tgbaalgos/minimize.cc, src/tgbaalgos/powerset.cc,
src/tgbatest/ltl2tgba.cc, src/bin/ltlcross.cc,
src/tgbaalgos/Makefile.am: Adjust to name change.
parent fdb157bf
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#include "tgbaalgos/isweakscc.hh" #include "tgbaalgos/isweakscc.hh"
#include "tgbaalgos/reducerun.hh" #include "tgbaalgos/reducerun.hh"
#include "tgbaalgos/word.hh" #include "tgbaalgos/word.hh"
#include "tgbaalgos/dbacomp.hh" #include "tgbaalgos/dtgbacomp.hh"
#include "misc/formater.hh" #include "misc/formater.hh"
#include "tgbaalgos/stats.hh" #include "tgbaalgos/stats.hh"
#include "tgbaalgos/isdet.hh" #include "tgbaalgos/isdet.hh"
...@@ -1105,7 +1105,7 @@ namespace ...@@ -1105,7 +1105,7 @@ namespace
if (!no_complement && pos[n] if (!no_complement && pos[n]
&& ((want_stats && !(*pstats)[n].nondeterministic) && ((want_stats && !(*pstats)[n].nondeterministic)
|| (!want_stats && is_deterministic(pos[n])))) || (!want_stats && is_deterministic(pos[n]))))
comp_pos[n] = dba_complement(pos[n]); comp_pos[n] = dtgba_complement(pos[n]);
} }
// ---------- Negative Formula ---------- // ---------- Negative Formula ----------
...@@ -1143,7 +1143,7 @@ namespace ...@@ -1143,7 +1143,7 @@ namespace
if (!no_complement && neg[n] if (!no_complement && neg[n]
&& ((want_stats && !(*nstats)[n].nondeterministic) && ((want_stats && !(*nstats)[n].nondeterministic)
|| (!want_stats && is_deterministic(neg[n])))) || (!want_stats && is_deterministic(neg[n]))))
comp_neg[n] = dba_complement(neg[n]); comp_neg[n] = dtgba_complement(neg[n]);
} }
nf->destroy(); nf->destroy();
} }
......
...@@ -33,7 +33,7 @@ tgbaalgos_HEADERS = \ ...@@ -33,7 +33,7 @@ tgbaalgos_HEADERS = \
compsusp.hh \ compsusp.hh \
cutscc.hh \ cutscc.hh \
cycles.hh \ cycles.hh \
dbacomp.hh \ dtgbacomp.hh \
degen.hh \ degen.hh \
dottydec.hh \ dottydec.hh \
dotty.hh \ dotty.hh \
...@@ -82,7 +82,7 @@ libtgbaalgos_la_SOURCES = \ ...@@ -82,7 +82,7 @@ libtgbaalgos_la_SOURCES = \
compsusp.cc \ compsusp.cc \
cutscc.cc \ cutscc.cc \
cycles.cc \ cycles.cc \
dbacomp.cc \ dtgbacomp.cc \
degen.cc \ degen.cc \
dotty.cc \ dotty.cc \
dottydec.cc \ dottydec.cc \
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// 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 "dbacomp.hh" #include "dtgbacomp.hh"
#include "ltlast/constant.hh" #include "ltlast/constant.hh"
#include "reachiter.hh" #include "reachiter.hh"
...@@ -26,7 +26,7 @@ namespace spot ...@@ -26,7 +26,7 @@ namespace spot
namespace namespace
{ {
class dbacomp_iter: public tgba_reachable_iterator_depth_first_stack class dtgbacomp_iter: public tgba_reachable_iterator_depth_first_stack
{ {
bdd orig_acc_; bdd orig_acc_;
bdd all_neg_; bdd all_neg_;
...@@ -37,7 +37,7 @@ namespace spot ...@@ -37,7 +37,7 @@ namespace spot
typedef state_explicit_number::transition trans; typedef state_explicit_number::transition trans;
public: public:
dbacomp_iter(const tgba* a) dtgbacomp_iter(const tgba* a)
: tgba_reachable_iterator_depth_first_stack(a), : tgba_reachable_iterator_depth_first_stack(a),
dict_(a->get_dict()), dict_(a->get_dict()),
out_(new tgba_explicit_number(dict_)) out_(new tgba_explicit_number(dict_))
...@@ -162,9 +162,9 @@ namespace spot ...@@ -162,9 +162,9 @@ namespace spot
} // anonymous } // anonymous
tgba_explicit_number* dba_complement(const tgba* aut) tgba_explicit_number* dtgba_complement(const tgba* aut)
{ {
dbacomp_iter dci(aut); dtgbacomp_iter dci(aut);
dci.run(); dci.run();
return dci.result(); return dci.result();
} }
......
...@@ -17,21 +17,21 @@ ...@@ -17,21 +17,21 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef SPOT_TGBAALGOS_DBACOMP_HH #ifndef SPOT_TGBAALGOS_DTGBACOMP_HH
# define SPOT_TGBAALGOS_DBACOMP_HH # define SPOT_TGBAALGOS_DTGBACOMP_HH
#include "tgba/tgbaexplicit.hh" #include "tgba/tgbaexplicit.hh"
namespace spot namespace spot
{ {
/// \brief Complement a deterministic Büchi automaton /// \brief Complement a deterministic TGBA
/// ///
/// The automaton \a aut should be deterministic. It does no need /// The automaton \a aut should be deterministic. It does no need
/// to be complete. Acceptance can be transition-based, or /// to be complete. Acceptance can be transition-based, or
/// state-based. The resulting automaton is very unlikely to be /// state-based. The resulting automaton is very unlikely to be
/// deterministic. /// deterministic.
SPOT_API tgba_explicit_number* SPOT_API tgba_explicit_number*
dba_complement(const tgba* aut); dtgba_complement(const tgba* aut);
} }
#endif // SPOT_TGBAALGOS_DBACOMP_HH #endif // SPOT_TGBAALGOS_DTGBACOMP_HH
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include "tgbaalgos/ltl2tgba_fm.hh" #include "tgbaalgos/ltl2tgba_fm.hh"
#include "tgbaalgos/bfssteps.hh" #include "tgbaalgos/bfssteps.hh"
#include "tgbaalgos/isdet.hh" #include "tgbaalgos/isdet.hh"
#include "tgbaalgos/dbacomp.hh" #include "tgbaalgos/dtgbacomp.hh"
#include "priv/countstates.hh" #include "priv/countstates.hh"
namespace spot namespace spot
...@@ -672,7 +672,7 @@ namespace spot ...@@ -672,7 +672,7 @@ namespace spot
{ {
// If the automaton is deterministic, complementing is // If the automaton is deterministic, complementing is
// easy. // easy.
to_free = aut_neg_f = dba_complement(aut_f); to_free = aut_neg_f = dtgba_complement(aut_f);
} }
else else
{ {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "tgbaalgos/gtec/gtec.hh" #include "tgbaalgos/gtec/gtec.hh"
#include "tgbaalgos/sccfilter.hh" #include "tgbaalgos/sccfilter.hh"
#include "tgbaalgos/ltl2tgba_fm.hh" #include "tgbaalgos/ltl2tgba_fm.hh"
#include "tgbaalgos/dbacomp.hh" #include "tgbaalgos/dtgbacomp.hh"
#include "ltlast/unop.hh" #include "ltlast/unop.hh"
namespace spot namespace spot
...@@ -382,7 +382,7 @@ namespace spot ...@@ -382,7 +382,7 @@ namespace spot
delete p; delete p;
// Complement the DBA. // Complement the DBA.
tgba* neg_det = dba_complement(det); tgba* neg_det = dtgba_complement(det);
tgba* p = new tgba_product(aut, neg_det); tgba* p = new tgba_product(aut, neg_det);
emptiness_check* ec = couvreur99(p); emptiness_check* ec = couvreur99(p);
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#include "tgbaalgos/simulation.hh" #include "tgbaalgos/simulation.hh"
#include "tgbaalgos/compsusp.hh" #include "tgbaalgos/compsusp.hh"
#include "tgbaalgos/powerset.hh" #include "tgbaalgos/powerset.hh"
#include "tgbaalgos/dbacomp.hh" #include "tgbaalgos/dtgbacomp.hh"
#include "tgbaalgos/complete.hh" #include "tgbaalgos/complete.hh"
#include "tgbaalgos/dtbasat.hh" #include "tgbaalgos/dtbasat.hh"
#include "tgbaalgos/dtgbasat.hh" #include "tgbaalgos/dtgbasat.hh"
...@@ -396,7 +396,7 @@ main(int argc, char** argv) ...@@ -396,7 +396,7 @@ main(int argc, char** argv)
bool opt_determinize = false; bool opt_determinize = false;
unsigned opt_determinize_threshold = 0; unsigned opt_determinize_threshold = 0;
unsigned opt_o_threshold = 0; unsigned opt_o_threshold = 0;
bool opt_dbacomp = false; bool opt_dtgbacomp = false;
bool reject_bigger = false; bool reject_bigger = false;
bool opt_bisim_ta = false; bool opt_bisim_ta = false;
bool opt_monitor = false; bool opt_monitor = false;
...@@ -487,7 +487,7 @@ main(int argc, char** argv) ...@@ -487,7 +487,7 @@ main(int argc, char** argv)
} }
else if (!strcmp(argv[formula_index], "-DC")) else if (!strcmp(argv[formula_index], "-DC"))
{ {
opt_dbacomp = true; opt_dtgbacomp = true;
} }
else if (!strncmp(argv[formula_index], "-DS", 3)) else if (!strncmp(argv[formula_index], "-DS", 3))
{ {
...@@ -1543,11 +1543,11 @@ main(int argc, char** argv) ...@@ -1543,11 +1543,11 @@ main(int argc, char** argv)
} }
spot::tgba* complemented = 0; spot::tgba* complemented = 0;
if (opt_dbacomp) if (opt_dtgbacomp)
{ {
tm.start("DBA complement"); tm.start("DTGBA complement");
a = complemented = dba_complement(a); a = complemented = dtgba_complement(a);
tm.stop("DBA complement"); tm.stop("DTGBA complement");
} }
if (complemented || satminimized || determinized) if (complemented || satminimized || determinized)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment