rename the spot::tgba class as spot::twa

Now that we support any type of omega-accetpance, not just "Generalized
Büchi", it is time to move away from GB and replace it by "ω", written
just w in ASCII.

This just change the name of the tgba class.  This part has to be done
by hand because the word "tgba" occurs in many contexts and a mass
replacement would be wrong.

This will be followed by some automatic renaming of all the derived
types and more.

* src/bin/autfilt.cc, src/bin/randaut.cc, src/kripke/fairkripke.hh,
src/ta/tgta.cc, src/ta/tgta.hh, src/tgba/fwd.hh, src/tgba/taatgba.cc,
src/tgba/taatgba.hh, src/tgba/tgba.cc, src/tgba/tgba.hh,
src/tgba/tgbagraph.hh, src/tgba/tgbaproduct.cc, src/tgba/tgbaproduct.hh,
src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh,
src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/cleanacc.cc,
src/tgbaalgos/dotty.cc, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/dupexp.hh, src/tgbaalgos/hoa.cc,
src/tgbaalgos/neverclaim.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/stutter.cc, src/tgbatest/checkpsl.cc,
src/tgbatest/emptchk.cc, src/tgbatest/ltl2tgba.cc, wrap/python/spot.py,
wrap/python/spot_impl.i: Rename the tgba class into twa.
This commit is contained in:
Alexandre Duret-Lutz 2015-04-21 18:58:22 +02:00
parent 8248072057
commit c2ae99e779
31 changed files with 117 additions and 107 deletions

View file

@ -54,7 +54,7 @@ def _render_automaton_as_svg(a, opt=None):
dotty_reachable(ostr, a, opt)
return _ostream_to_svg(ostr)
tgba._repr_svg_ = _render_automaton_as_svg
twa._repr_svg_ = _render_automaton_as_svg
ta._repr_svg_ = _render_automaton_as_svg
def _render_formula_as_svg(a):
@ -72,7 +72,7 @@ def _return_automaton_as_svg(a, opt=None):
# installed.
from IPython.display import SVG
return SVG(_render_automaton_as_svg(a, opt))
tgba.show = _return_automaton_as_svg
twa.show = _return_automaton_as_svg
ta.show = _return_automaton_as_svg
def _formula_str_ctor(self, str):
@ -100,7 +100,7 @@ formula.__init__ = _formula_str_ctor
formula.to_str = _formula_to_str
formula.show_ast = _render_formula_as_svg
def _tgba_to_str(a, format='hoa', opt=None):
def _twa_to_str(a, format='hoa', opt=None):
format = format.lower()
if format == 'hoa':
ostr = ostringstream()
@ -120,7 +120,7 @@ def _tgba_to_str(a, format='hoa', opt=None):
return ostr.str()
raise ValueError("unknown string format: " + format)
def _tgba_save(a, filename, format='hoa', opt=None, append=False):
def _twa_save(a, filename, format='hoa', opt=None, append=False):
with open(filename, 'a' if append else 'w') as f:
s = a.to_str(format, opt)
f.write(s)
@ -128,8 +128,8 @@ def _tgba_save(a, filename, format='hoa', opt=None, append=False):
f.write('\n')
return a
tgba.to_str = _tgba_to_str
tgba.save = _tgba_save
twa.to_str = _twa_to_str
twa.save = _twa_save
def automata(*filenames):
"""Read automata from a list of filenames.

View file

@ -48,7 +48,7 @@
%shared_ptr(spot::tgta)
%shared_ptr(spot::tgta_explicit)
%shared_ptr(spot::bdd_dict)
%shared_ptr(spot::tgba)
%shared_ptr(spot::twa)
%shared_ptr(spot::tgba_digraph)
%shared_ptr(spot::tgba_product)
%shared_ptr(spot::tgba_product_init)
@ -381,7 +381,7 @@ ensure_digraph(const spot::tgba_ptr& a)
auto aa = std::dynamic_pointer_cast<spot::tgba_digraph>(a);
if (aa)
return aa;
return spot::make_tgba_digraph(a, spot::tgba::prop_set::all());
return spot::make_tgba_digraph(a, spot::twa::prop_set::all());
}
std::ostream&