Fix tgta_explicit not to inherit from ta_explicit to please clang++.
* src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh: Use a ta_explicit attribute instead of inheriting from it. (get_ta): New method. * src/taalgos/minimize.cc, src/taalgos/minimize.hh, src/taalgos/tgba2ta.cc, src/tgbatest/ltl2tgba.cc: Adjust usage. * wrap/python/spot.i (as_ta): Remove, now that we have get_ta. * wrap/python/ajax/spot.in: Use get_ta instead of as_ta.
This commit is contained in:
parent
d4130f15bf
commit
941cb0b57b
8 changed files with 59 additions and 69 deletions
|
|
@ -514,13 +514,12 @@ namespace spot
|
|||
std::list<hash_set*>::iterator itdone;
|
||||
for (itdone = partition.begin(); itdone != partition.end(); ++itdone)
|
||||
delete *itdone;
|
||||
//delete ta_;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
tgta*
|
||||
minimize_tgta(const tgta* tgta_)
|
||||
tgta_explicit*
|
||||
minimize_tgta(const tgta_explicit* tgta_)
|
||||
{
|
||||
|
||||
tgba_explicit_number* tgba = new tgba_explicit_number(tgta_->get_dict());
|
||||
|
|
@ -528,19 +527,17 @@ namespace spot
|
|||
tgta_explicit* res = new tgta_explicit(tgba, tgta_->all_acceptance_conditions(),
|
||||
0, /* own_tgba = */ true);
|
||||
|
||||
//TODO copier le tgta_ dans un tgta_explicit au lieu de faire un cast...
|
||||
const ta_explicit* tgta = dynamic_cast<const tgta_explicit*> (tgta_);
|
||||
const ta_explicit* ta = tgta_->get_ta();
|
||||
|
||||
partition_t partition = build_partition(tgta);
|
||||
partition_t partition = build_partition(ta);
|
||||
|
||||
// Build the minimal tgta automaton.
|
||||
build_result(tgta, partition, tgba, res);
|
||||
build_result(ta, partition, tgba, res->get_ta());
|
||||
|
||||
// Free all the allocated memory.
|
||||
std::list<hash_set*>::iterator itdone;
|
||||
for (itdone = partition.begin(); itdone != partition.end(); ++itdone)
|
||||
delete *itdone;
|
||||
//delete ta_;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue