twa: get rid of intersecting_run()'s second argument
* spot/twa/twa.cc, spot/twa/twa.hh: Here. * NEWS: Mention the backward incompatibility.
This commit is contained in:
parent
f3e57901a4
commit
dc34862d3b
3 changed files with 42 additions and 9 deletions
9
NEWS
9
NEWS
|
|
@ -135,6 +135,15 @@ New in spot 2.7.5.dev (not yet released)
|
|||
properties. This can be altered with the SPOT_PR_CHECK
|
||||
environment variable.
|
||||
|
||||
Backward incompatibilities:
|
||||
|
||||
- The virtual function twa::intersecting_run() no longuer takes a
|
||||
second "from_other" Boolean argument. This is a backward
|
||||
incompatibility only for code that overrides this function in a
|
||||
subclass. For backward compatibility with programs that simply
|
||||
call this function with two argument, a non-virtual version of the
|
||||
function has been introduced and marked as deprecated.
|
||||
|
||||
Bugs fixed:
|
||||
|
||||
- The gf_guarantee_to_ba() is relying on an inplace algorithm that
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ namespace spot
|
|||
}
|
||||
|
||||
twa_run_ptr
|
||||
twa::intersecting_run(const_twa_ptr other, bool from_other) const
|
||||
twa::intersecting_run(const_twa_ptr other) const
|
||||
{
|
||||
auto self = shared_from_this();
|
||||
if (acc().uses_fin_acceptance() || other->acc().uses_fin_acceptance())
|
||||
|
|
@ -168,14 +168,14 @@ namespace spot
|
|||
auto run = generic_accepting_run(product(g1, g2));
|
||||
if (!run)
|
||||
return nullptr;
|
||||
return run->reduce()->project(from_other ? g2 : g1);
|
||||
return run->reduce()->project(g1);
|
||||
}
|
||||
self = remove_fin_maybe(self); // remove alternation, not Fin
|
||||
other = remove_fin_maybe(other);
|
||||
auto run = otf_product(self, other)->accepting_run();
|
||||
if (!run)
|
||||
return nullptr;
|
||||
return run->reduce()->project(from_other ? other : self);
|
||||
return run->reduce()->project(self);
|
||||
}
|
||||
|
||||
twa_word_ptr
|
||||
|
|
|
|||
|
|
@ -872,18 +872,42 @@ namespace spot
|
|||
/// \brief Return an accepting run recognizing a word accepted by
|
||||
/// two automata.
|
||||
///
|
||||
/// If \a from_other is true, the returned run will be over the
|
||||
/// \a other automaton. Otherwise, the run will be over this
|
||||
/// automaton. (This argument will be deprecated soon, do not
|
||||
/// use it.)
|
||||
/// The run returned is a run from automaton this.
|
||||
///
|
||||
/// Return nullptr if no accepting run were found.
|
||||
///
|
||||
/// An emptiness check is performed on a product computed
|
||||
/// on-the-fly, unless some of the operands use Fin-acceptance: in
|
||||
/// this case an explicit product is performed.
|
||||
virtual twa_run_ptr intersecting_run(const_twa_ptr other,
|
||||
bool from_other = false) const;
|
||||
virtual twa_run_ptr intersecting_run(const_twa_ptr other) const;
|
||||
|
||||
/// \brief Return an accepting run recognizing a word accepted by
|
||||
/// two automata.
|
||||
///
|
||||
/// If \a from_other is true, the returned run will be over the
|
||||
/// \a other automaton. Otherwise, the run will be over this
|
||||
/// automaton.
|
||||
///
|
||||
/// This form is deprecated. Replace a->interesecting_run(b, true)
|
||||
/// by b->intersecting_run(a).
|
||||
///
|
||||
/// Return nullptr if no accepting run were found.
|
||||
///
|
||||
/// An emptiness check is performed on a product computed
|
||||
/// on-the-fly, unless some of the operands use Fin-acceptance: in
|
||||
/// this case an explicit product is performed.
|
||||
///
|
||||
/// This function was deprecated in Spot 2.8.
|
||||
SPOT_DEPRECATED("replace a->intersecting_run(b, true) "
|
||||
"by b->intersecting_run(a).")
|
||||
twa_run_ptr intersecting_run(const_twa_ptr other,
|
||||
bool from_other) const
|
||||
{
|
||||
if (from_other)
|
||||
return other->intersecting_run(shared_from_this());
|
||||
else
|
||||
return this->intersecting_run(other);
|
||||
}
|
||||
|
||||
/// \brief Return a word accepted by two automata.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue