of these accepting set so that they are really usable. Provide
a all_accepting_conditions() method for use in the emptyness
check, and a neg_accepting_conditions() for products.
Predeclare TGBA accepting conditions is the i/o.
* src/tgba/bddprint.cc (want_prom): Rename as ...
(want_prom): ... this.
(print_handler): Adjust to display Acc[].
(print_acc_handler, bdd_print_acc): New functions.
* src/tgba/bddprint.hh (print_acc_handler, bdd_print_acc):
New functions.
* src/tgba/succiter.hh (current_promise): Rename as ...
(current_accepting_conditions): ... this.
* src/tgba/succiterconcrete.cc (current_state):
Rename next to now.
(current_promise): Rename as ...
(current_accepting_conditions): ... this, and compute
the accepting conditions.
* src/tgba/dictunion.cc, src/tgba/ltl2tgba.cc,
src/tgba/succiterconcrete.hh,
src/tgba/tgbabddconcretefactory.cc,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh,
src/tgba/tgbabdddict.hh, src/tgba/tgbabdddict.cc,
src/tgba/tgbabddtranslatefactory.cc,
src/tgbaalgos/dotty.cc: Adjust to new names.
* src/tgba/tgba.hh (all_accepting_conditions,
neg_accepting_conditions): New functions.
* src/tgba/tgbabddconcretefactory.cc: Adjust to new
names, and record accepting conditions instead of promises.
* src/tgba/tgbabddcoredata.hh (accepting_conditions,
all_accepting_conditions, negacc_set): New variables.
(notnow_set, notprom_set, declare_promise): Rename as ...
(notnext_set, notacc_set, declare_accepting_condition): ... these.
* src/tgba/tgbaexplicit.hh
(tgba_explicit_succ_iterator::current_promise): Rename as ...
(tgba_explicit_succ_iterator::current_accepting_conditions): ... this.
(tgba_explicit::add_promise): Rename as ...
(tgba_explicit::add_accepting_condition): ... this.
(tgba_explicit::declare_accepting_condition,
tgba_explicit::has_accepting_condition): New variables.
(tgba_explicit::get_promise): Rename as ...
(tgba_explicit::get_accepting_condition): ... this.
(tgba_explicit::all_accepting_conditions,
tgba_explicit::neg_accepting_conditions): Implement them.
(all_accepting_conditions, neg_accepting_conditions,
all_accepting_conditions): New variables.
(tgba_explicit_succ_iterator): Embed all_accepting_conditions_.
* src/tgba/tgbaexplicit.cc: Likewise.
* src/tgba/tgbaproduct.hh
(tgba_product_succ_uterator): Embed left_neg_ and right_neg_.
(tgba_product::all_accepting_conditions,
tgba_product::neg_accepting_conditions): Implement them.
* src/tgba/tgbatranslateproxy.hh:
(tgba_translate_proxy::all_accepting_conditions,
tgba_translate_proxy::neg_accepting_conditions): Implement them.
* src/tgba/tgbatranslateproxy.cc: Likewise.
* src/tgbaalgos/save.cc (save_rec): Call bdd_print
(tgba_save_reachable): Output the `acc =' line.
* src/tgbaparse/tgbaparse.yy: Support the for
accepting conditions definitions using an "acc =" line
at the start. Later, use has_accepting_condition while
parsing accepting conditions to ensure they were declared.
Disallow !cond in accepting conditions.
* src/tgbaparse/tgbascan.ll (ACC_DEF): New token.
* src/tgbatest/explicit.cc (main): Declare accepting conditions.
* src/tgbatest/ltl2tgba.cc (main): Add support for the -a, -A,
and -R new options.
* src/tgbatest/tgbaread.cc (main): Really exit on parse error.
* src/tgbatest/explicit.test, src/tgbatest/explprod.test,
src/tgbatest/mixprod.test, src/tgbatest/readsave.test,
src/tgbatest/tgbaread.test, src/tgbatest/tripprod.test: Reflect
recent changes.
(tgba_bdd_concrete_factory::~tgba_bdd_concrete_factory): destroy the
formulae used as keys in prom_.
(tgba_bdd_concrete_factory::create_promise): Delete.
(tgba_bdd_concrete_factory::declare_promise,
tgba_bdd_concrete_factory::finish): New functions.
* src/tgba/tgbabddconcretefactory.hh
(tgba_bdd_concrete_factory::create_promise): Delete.
(tgba_bdd_concrete_factory::declare_promise,
tgba_bdd_concrete_factory::finish): New functions.
(tgba_bdd_concrete_factory::prom_): New map.
* src/tgba/ltl2tgba.cc (ltl_trad_visitor::visit): Adjust
the Fx and aUb cases to register promises with
tgba_bdd_concrete_factory::declare_promise().
(ltl2tgba): Call tgba_bdd_concrete_factory::finish().
* tgba/state.hh (state::translate, state::clone, state::as_bdd):
New virtual methods.
* tgba/stataebdd.cc (state::translate, state::clone): New methods.
* tgba/stataebdd.hh (state::translate, state::clone): New methods.
* tgba/tgbabddprod.cc (state_bdd_product::clone,
tgba_bdd_product_succ_iterator::~tgba_bdd_product_succ_iterator):
New methods.
(tgba_bdd_product_succ_iterator::first): Reset right_
if any of left_ or right_ is already done (i.e., is empty).
(tgba_bdd_product_succ_iterator::done): Return true
if right_ is NULL.
(tgba_bdd_product_succ_iterator::current_state,
tgba_bdd_product::get_init_state): Work directory with `state's.
* tgba/tgbabddprod.hh (state_bdd_product::clone,
tgba_bdd_product_succ_iterator::~tgba_bdd_product_succ_iterator):
New methods.
* tgba/tgbabddtranslateproxy.cc
(tgba_bdd_translate_proxy_succ_iterator::
tgba_bdd_translate_proxy_succ_iterator): Work on any kind of iteraator.
(tgba_bdd_translate_proxy_succ_iterator::
~tgba_bdd_translate_proxy_succ_iterator): New method.
(tgba_bdd_translate_proxy_succ_iterator::current_state,
tgba_bdd_translate_proxy::get_init_state,
tgba_bdd_translate_proxy::succ_iter): Work on `state's and
`tgba_succ_iterator's directlry.
(tgba_bdd_translate_proxy::format_state): Delegate formating
to the proxied automata.
* tgba/tgbaexplicit.cc (state_explicit::clone): New method.
* src/tgba/tgbaexplicit.cc (tgba_explicit::get_condition,
tgba_explicit::get_promise): Call ltl::destroy on existing formulae.
* tgbatest/Makefile.am (check_PROGRAMS): Add explprod.
(explprod_SOURCES): New variable.
(TESTS): Add explprod.test.
(CLEANFILES): Add input1 and input2.
while building new dictionary.
* src/tgbatest/ltlprod.test, src/tgbatest/ltlprod.cc: New files.
* src/tgbatest/Makefile.am (check_PROGRAMS): Add ltlprod.
(ltlprod_SOURCES): New variable.
(TESTS): Add ltlprod.test.
* src/tgba/bddprint.cc (bdd_format_set): Likewise.
* src/tgba/state.hh: Add Doxygen comments.
(state::compare): Take a state*, not a state&.
(state_ptr_less_than): New functor.
* src/tgba/statebdd.hh (state_bdd::compare): Take a state*, not a
state&.
* src/tgba/statebdd.cc (state_bdd::compare): Likewise.
* src/tgba/succiter.hh: Add Doxygen comments.
* src/tgba/tgba.hh: Mention promises.
(tgba::formate_state): New pure virtual method.
* src/tgba/tgbabddconcrete.hh (tgba_bdd_concrete::formate_state):
New method.
* src/tgba/tgbabddconcrete.cc (tgba_bdd_concrete::formate_state):
Likewise.
* src/tgbaalgos/dotty.cc: Adjust to use state_ptr_less_than
and tgba::formate_state.
Return a state*, not a state_bdd.
* src/tgba/succiterconcrete.hh
(tgba_succ_iterator_concrete::current_state): Return a state_bdd*,
not a state_bdd.
* src/tgba/state.hh (state::as_bdd): New abstract method.
* src/tgba/statebdd.hh (state_bdd::as_bdd): Move definitions ...
* src/tgba/statebdd.cc (state_bdd::as_bdd): ... here.
* src/tgba/tgba.hh: Add Doxygen comments.
(tgba::succ_iter, tgba::get_init_state): Use state*, not state_bdd.
* src/tgba/tgbabddconcrete.hh (tgba_bdd_concrete::get_init_state):
Return a state_bdd*, not a state_bdd.
(tgba_bdd_concrete::get_init_bdd): New method.
(tgba_bdd_concrete::succ_uter): Take a state* as argument.
* src/tgba/tgbabddconcrete.cc: Likewise.
* src/tgba/tgbabddtranslatefactory.cc
(tgba_bdd_translate_factory::tgba_bdd_translate_factory): Use
tgba_bdd_concrete::get_init_bdd.
* src/tgbaalgos/dotty.cc (dotty_state, dotty_rec, dotty): Adjust
to use state* instead of state_bdd.
* src/tgba/succlist.hh: Delete. (Leftover from a previous
draft.)
* src/tgba/public.hh: .. this.
* src/tgba/tgba.hh: New file.
* src/tgba/Makefile.am (libtgba_la_SOURCES): Add public.hh.
* src/tgba/tgbabddconcrete.hh (tgba_bdd_concrete): Inherit from tgba.
(tgba_bdd_concrete::init_iter): Delete.
(tgba_bdd_concrete::succ_iter): Take a state_bdd as argument,
not a bdd.
* src/tgba/tgbabddconcrete.cc: Likewise.
equal visitor useless, since two equals formulae will now
share the same address.
* src/ltlast/multop.hh (add_sorted): New function.
(paircmp): New comparison functor.
(map): Use paircmp, we want to compare the vectors' contents,
not their addresses.
* src/ltlast/multop.cc (add_sorted): New function.
(add): Use it.
* src/ltltest/equals.cc, src/ltltest/tostring.cc: Compare
pointers instead of calling equal.
* src/ltlvisit/equals.cc, src/ltlvisit/equals.hh: Delete.
* src/ltlvisit/Makefile.am (libltlvisit_la_SOURCES): Remove
equals.cc and equals.hh.
* wrap/spot.i: Do not include equals.hh.
* src/ltlast/atomic_prop.hh: Declare instance_count().
* src/ltlast/binop.hh, src/ltlast/unop.hh, src/ltlast/multop.hh:
Likewise. Also, really inherit for ref_formula this time.
* src/ltlast/atomic_prop.cc, src/ltlast/binop.cc,
src/ltlast/unop.cc, src/ltlast/multop.cc: On destruction, suppress
the instance from the instance map. Implement instance_count().
* src/ltlast/formula.cc, src/ltlast/formula.hh,
src/ltlast/ref_formula.cc, src/ltlast/ref_formula.hh: Add virtual
destructors.
* src/ltlparse/ltlparse.yy: Recover from binary operators with
missing right hand operand (the point is just to destroy the
the left hand operand).
* src/ltltest/equals.cc, src/ltltest/readltl.cc,
src/ltltest/tostring.cc: Destroy used formulae. Make sure
instance_count()s are null are the end.
* src/ltltest/parseerr.test: Adjust expected result, now
that the parser lnows about missing right hand operands.
* src/ltlvisit/destroy.hh, src/ltlvisit/destroy.cc,
src/ltlvisit/postfix.hh, src/ltlvisit/postfix.cc: New files.
* src/ltlvisit/Makefile.am (libltlvisit_la_SOURCES): Add them.
* src/ltlvisit/lunabbrev.cc (Xor, Equiv): Clone formulae
occurring twice in the rewritten expression.
reference-counted formula*. One can't call constructors for AST
items anymore, everything need to be acquired through instance()
class methods.
* src/ltlast/formula.cc, src/ltlast/refformula.cc,
src/ltlast/refformula.hh: New files.
* src/ltlast/Makefile.am (libltlast_la_SOURCES): Add them.
* src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
src/ltlast/unop.cc, src/ltlast/unop.hh,
src/ltlast/binop.cc, src/ltlast/binop.hh: Make the constructor
and destructor protected. Define a static function `instance()'
to get an instance with specific argument. Use a map called
`instances' to store all known instances. Inherit from
ref_formula.
* src/ltlast/constant.hh, src/ltlast/constant.cc: Protect
the constructor and destructor. Provide the false_instance()
and true_instance() functions instead.
* src/formula.hh (ref, unref, ref_, unref_): New methods.
* src/ltlast/multop.cc, src/ltlast/multop.hh: Protect
the constructor, destructor, as well as the add() method.
Provides the instance(), and add() class methods instead.
Store children_ as a pointer.
* src/ltlenv/defaultenv.cc (require): Adjust to
call atomic_prop::instance.
* src/ltlparse/ltlparse.yy: Adjust to call instance() functions
instead of constructors.
* src/ltltest/Makefile.am (LDADD): Tweak library ordering.
* src/ltlvisit/clone.hh (clone_visitor): Inherit from visitor,
not const_visitor, and adjust all prototypes appropriately.
* src/ltlvisit/clone.cc (clone_visitor): Likewise.
Call ref() or instance() methods instead of copy constructors.
* src/ltlvisit/equals.cc: Simplify atomic_prop and constant
cases.
* src/ltlvisit/lunabbrev.hh, src/ltlvisit/lunabbrev.cc,
src/ltlvisit/tunabbrev.hh, src/ltlvisit/tunabbrev.cc,
src/ltlvisit/nenoform.hh, src/ltlvisit/nenoform.cc: Use instance()
methods instead of constructor. Make these children of visitor, not
const_visitor.
* src/ltltest/readltl.c (main): Do not delete the formula.