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
|
|
@ -10,28 +10,72 @@ namespace spot
|
|||
{
|
||||
/// \brief encodes the transition relation of the TGBA.
|
||||
///
|
||||
/// \c relation uses four kinds of variables:
|
||||
/// \c relation uses three kinds of variables:
|
||||
/// \li "Now" variables, that encode the current state
|
||||
/// \li "Next" variables, that encode the destination state
|
||||
/// \li atomic propositions, which are things to verify before going on
|
||||
/// to the next state
|
||||
/// \li promises: \c a \c U \c b, or \c F \c b, both imply that \c b
|
||||
/// should be verified eventually. We encode this with \c Prom[b],
|
||||
/// and check that promises are fullfilled in the emptyness check.
|
||||
bdd relation;
|
||||
|
||||
/// \brief encodes the accepting conditions
|
||||
///
|
||||
/// \c a \c U \c b, or \c F \c b, both imply that \c b
|
||||
/// should be verified eventually. We encode this with generalized
|
||||
/// Büchi acceptating conditions. An accepting set, called Acc[b],
|
||||
/// hold all the state that do not promise to verify \c b eventually.
|
||||
/// (I.e., all the states that contain \c b, or do not conatain
|
||||
/// \c a \c U \c b, or \c F \c b.)
|
||||
///
|
||||
/// The spot::succ_iter::current_accepting_conditions() method
|
||||
/// will return the Acc[x] variables of the accepting sets
|
||||
/// in which a transition is. Actually we never return Acc[x]
|
||||
/// alone, but Acc[x] and all other accepting variables negated.
|
||||
///
|
||||
/// So if there is three accepting set \c a, \c b, and \c c, and
|
||||
/// a transition is in set \c a, we'll return \c Acc[a]&!Acc[b]&!Acc[c].
|
||||
/// If the transition is in both \c a and \c b, we'll return
|
||||
/// \c (Acc[a]\&!Acc[b]\&!Acc[c]) \c | \c (!Acc[a]\&Acc[b]\&!Acc[c]).
|
||||
///
|
||||
/// Accepting conditions are attributed to transitions and are
|
||||
/// only concerned by atomic propositions (which label the
|
||||
/// transitions) and Next variables (the destination). Typically,
|
||||
/// a transition should bear the variable Acc[b] if it doesn't
|
||||
/// check for `b' and have a destination of the form \c a \c U \c
|
||||
/// b, or \c F \c b.
|
||||
///
|
||||
/// To summarize, \c accepting_conditions contains three kinds of
|
||||
/// variables:
|
||||
/// \li "Next" variables, that encode the destination state,
|
||||
/// \li atomic propositions, which are things to verify before going on
|
||||
/// to the next state,
|
||||
/// \li promise variables.
|
||||
bdd accepting_conditions;
|
||||
|
||||
/// The set of all accepting conditions used by the Automaton.
|
||||
///
|
||||
/// The goal of the emptiness check is to ensure that
|
||||
/// a strongly connected component walks through each
|
||||
/// of these acceptiong conditions. I.e., the union
|
||||
/// of the acceptiong conditions of all transition in
|
||||
/// the SCC should be equal to the result of this function.
|
||||
bdd all_accepting_conditions;
|
||||
|
||||
/// The conjunction of all Now variables, in their positive form.
|
||||
bdd now_set;
|
||||
/// The conjunction of all Now variables, in their negated form.
|
||||
bdd negnow_set;
|
||||
/// \brief The (positive) conjunction of all variables which are
|
||||
/// not Now variables.
|
||||
bdd notnow_set;
|
||||
/// not Next variables.
|
||||
bdd notnext_set;
|
||||
/// \brief The (positive) conjunction of all variables which are
|
||||
/// not atomic propositions.
|
||||
bdd notvar_set;
|
||||
/// The (positive) conjunction of all variables which are not promises.
|
||||
bdd notprom_set;
|
||||
/// The (positive) conjunction of all variables which are not
|
||||
/// accepting conditions.
|
||||
bdd notacc_set;
|
||||
/// The negative conjunction of all variables which are accepting
|
||||
/// conditions.
|
||||
bdd negacc_set;
|
||||
|
||||
/// Record pairings between Next and Now variables.
|
||||
bddPair* next_to_now;
|
||||
|
|
@ -60,8 +104,9 @@ namespace spot
|
|||
/// \brief Update the variable sets to take a new automic proposition into
|
||||
/// account.
|
||||
void declare_atomic_prop(bdd var);
|
||||
/// Update the variable sets to take a new promise into account.
|
||||
void declare_promise(bdd prom);
|
||||
/// \brief Update the variable sets to take a new accepting condition
|
||||
/// into account.
|
||||
void declare_accepting_condition(bdd prom);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue