Switch from "promises" to "accepting set". Fix the definitions
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.
This commit is contained in:
parent
fbbfda43f2
commit
25e6cca4b4
37 changed files with 662 additions and 220 deletions
|
|
@ -3,17 +3,18 @@
|
|||
namespace spot
|
||||
{
|
||||
tgba_bdd_core_data::tgba_bdd_core_data()
|
||||
: relation(bddtrue),
|
||||
now_set(bddtrue), negnow_set(bddtrue), notnow_set(bddtrue),
|
||||
notvar_set(bddtrue), notprom_set(bddtrue), next_to_now(bdd_newpair())
|
||||
: relation(bddtrue), accepting_conditions(bddfalse),
|
||||
now_set(bddtrue), negnow_set(bddtrue), notnext_set(bddtrue),
|
||||
notvar_set(bddtrue), notacc_set(bddtrue), negacc_set(bddtrue),
|
||||
next_to_now(bdd_newpair())
|
||||
{
|
||||
}
|
||||
|
||||
tgba_bdd_core_data::tgba_bdd_core_data(const tgba_bdd_core_data& copy)
|
||||
: relation(copy.relation),
|
||||
: relation(copy.relation), accepting_conditions(copy.accepting_conditions),
|
||||
now_set(copy.now_set), negnow_set(copy.negnow_set),
|
||||
notnow_set(copy.notnow_set), notvar_set(copy.notvar_set),
|
||||
notprom_set(copy.notprom_set),
|
||||
notnext_set(copy.notnext_set), notvar_set(copy.notvar_set),
|
||||
notacc_set(copy.notacc_set), negacc_set(copy.negacc_set),
|
||||
next_to_now(bdd_copypair(copy.next_to_now))
|
||||
{
|
||||
}
|
||||
|
|
@ -22,11 +23,14 @@ namespace spot
|
|||
tgba_bdd_core_data::tgba_bdd_core_data(const tgba_bdd_core_data& left,
|
||||
const tgba_bdd_core_data& right)
|
||||
: relation(left.relation & right.relation),
|
||||
accepting_conditions(left.accepting_conditions
|
||||
| right.accepting_conditions),
|
||||
now_set(left.now_set & right.now_set),
|
||||
negnow_set(left.negnow_set & right.negnow_set),
|
||||
notnow_set(left.notnow_set & right.notnow_set),
|
||||
notnext_set(left.notnext_set & right.notnext_set),
|
||||
notvar_set(left.notvar_set & right.notvar_set),
|
||||
notprom_set(left.notprom_set & right.notprom_set),
|
||||
notacc_set(left.notacc_set & right.notacc_set),
|
||||
negacc_set(left.negacc_set & right.negacc_set),
|
||||
next_to_now(bdd_mergepairs(left.next_to_now, right.next_to_now))
|
||||
{
|
||||
}
|
||||
|
|
@ -52,23 +56,24 @@ namespace spot
|
|||
{
|
||||
now_set &= now;
|
||||
negnow_set &= !now;
|
||||
notnow_set &= next;
|
||||
notnext_set &= now;
|
||||
bdd both = now & next;
|
||||
notvar_set &= both;
|
||||
notprom_set &= both;
|
||||
notacc_set &= both;
|
||||
}
|
||||
|
||||
void
|
||||
tgba_bdd_core_data::declare_atomic_prop(bdd var)
|
||||
{
|
||||
notnow_set &= var;
|
||||
notprom_set &= var;
|
||||
notnext_set &= var;
|
||||
notacc_set &= var;
|
||||
}
|
||||
|
||||
void
|
||||
tgba_bdd_core_data::declare_promise(bdd prom)
|
||||
tgba_bdd_core_data::declare_accepting_condition(bdd acc)
|
||||
{
|
||||
notnow_set &= prom;
|
||||
notvar_set &= prom;
|
||||
notnext_set &= acc;
|
||||
notvar_set &= acc;
|
||||
negacc_set &= !acc;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue