* src/tgba/succiter.hh: Adjust comments about promises to
refer to accepting conditions. * src/tgba/tgbabddconcretefactory.hh: Likewise. * src/tgba/tgbabddcoredata.hh: Likewise. * src/tgba/dictunion.cc: Likewise. * src/tgba/tgba.hh: Likewise.
This commit is contained in:
parent
0b3d2c1325
commit
8e3a24ad5c
5 changed files with 37 additions and 30 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
2003-06-26 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
2003-06-26 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/tgba/succiter.hh: Adjust comments about promises to
|
||||||
|
refer to accepting conditions.
|
||||||
|
* src/tgba/tgbabddconcretefactory.hh: Likewise.
|
||||||
|
* src/tgba/tgbabddcoredata.hh: Likewise.
|
||||||
|
* src/tgba/dictunion.cc: Likewise.
|
||||||
|
* src/tgba/tgba.hh: Likewise.
|
||||||
|
|
||||||
* doc/Makefile.am (doc): Typo.
|
* doc/Makefile.am (doc): Typo.
|
||||||
* src/ltlvisit/tostring.hh (to_string): Add doxygen comments.
|
* src/ltlvisit/tostring.hh (to_string): Add doxygen comments.
|
||||||
* src/ltlast/multop.hh (multop::paircmp): Add doxygen comments.
|
* src/ltlast/multop.hh (multop::paircmp): Add doxygen comments.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
std::set<const ltl::formula*> now;
|
std::set<const ltl::formula*> now;
|
||||||
std::set<const ltl::formula*> var;
|
std::set<const ltl::formula*> var;
|
||||||
std::set<const ltl::formula*> prom;
|
std::set<const ltl::formula*> acc;
|
||||||
|
|
||||||
tgba_bdd_dict::fv_map::const_iterator i;
|
tgba_bdd_dict::fv_map::const_iterator i;
|
||||||
|
|
||||||
|
|
@ -28,21 +28,21 @@ namespace spot
|
||||||
for (i = r.var_map.begin(); i != r.var_map.end(); ++i)
|
for (i = r.var_map.begin(); i != r.var_map.end(); ++i)
|
||||||
var.insert(i->first);
|
var.insert(i->first);
|
||||||
|
|
||||||
// Merge promises.
|
// Merge accepting conditions.
|
||||||
for (i = l.acc_map.begin(); i != l.acc_map.end(); ++i)
|
for (i = l.acc_map.begin(); i != l.acc_map.end(); ++i)
|
||||||
prom.insert(i->first);
|
acc.insert(i->first);
|
||||||
for (i = r.acc_map.begin(); i != r.acc_map.end(); ++i)
|
for (i = r.acc_map.begin(); i != r.acc_map.end(); ++i)
|
||||||
prom.insert(i->first);
|
acc.insert(i->first);
|
||||||
|
|
||||||
// Ensure we have enough BDD variables.
|
// Ensure we have enough BDD variables.
|
||||||
int have = bdd_extvarnum(0);
|
int have = bdd_extvarnum(0);
|
||||||
int want = now.size() * 2 + var.size() + prom.size();
|
int want = now.size() * 2 + var.size() + acc.size();
|
||||||
if (have < want)
|
if (have < want)
|
||||||
bdd_setvarnum(want);
|
bdd_setvarnum(want);
|
||||||
|
|
||||||
// Fill in the "defragmented" union dictionary.
|
// Fill in the "defragmented" union dictionary.
|
||||||
|
|
||||||
// FIXME: Make some experiments with ordering of prom/var/now variables.
|
// FIXME: Make some experiments with ordering of acc/var/now variables.
|
||||||
// Maybe there is one order that usually produces smaller BDDs?
|
// Maybe there is one order that usually produces smaller BDDs?
|
||||||
|
|
||||||
// Next BDD variable to use.
|
// Next BDD variable to use.
|
||||||
|
|
@ -51,7 +51,7 @@ namespace spot
|
||||||
tgba_bdd_dict res;
|
tgba_bdd_dict res;
|
||||||
|
|
||||||
std::set<const ltl::formula*>::const_iterator f;
|
std::set<const ltl::formula*>::const_iterator f;
|
||||||
for (f = prom.begin(); f != prom.end(); ++f)
|
for (f = acc.begin(); f != acc.end(); ++f)
|
||||||
{
|
{
|
||||||
clone(*f);
|
clone(*f);
|
||||||
res.acc_map[*f] = v;
|
res.acc_map[*f] = v;
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ namespace spot
|
||||||
/// This class provides the basic functionalities required to
|
/// This class provides the basic functionalities required to
|
||||||
/// iterate over the successors of a state, as well as querying
|
/// iterate over the successors of a state, as well as querying
|
||||||
/// transition labels. Because transitions are never explicitely
|
/// transition labels. Because transitions are never explicitely
|
||||||
/// encoded, labels (conditions and promises) can only be queried
|
/// encoded, labels (conditions and accepting conditions) can only
|
||||||
/// while iterating over the successors.
|
/// be queried while iterating over the successors.
|
||||||
class tgba_succ_iterator
|
class tgba_succ_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -63,8 +63,7 @@ namespace spot
|
||||||
/// Note that the same state may occur at different points
|
/// Note that the same state may occur at different points
|
||||||
/// in the iteration. These actually correspond to the same
|
/// in the iteration. These actually correspond to the same
|
||||||
/// destination. It just means there were several transitions,
|
/// destination. It just means there were several transitions,
|
||||||
/// with different conditions or promises, leading to the
|
/// with different conditions, leading to the same state.
|
||||||
/// same state.
|
|
||||||
virtual state* current_state() = 0;
|
virtual state* current_state() = 0;
|
||||||
/// \brief Get the condition on the transition leading to this successor.
|
/// \brief Get the condition on the transition leading to this successor.
|
||||||
virtual bdd current_condition() = 0;
|
virtual bdd current_condition() = 0;
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ namespace spot
|
||||||
/// \brief Perfom final computations before the relation can be used.
|
/// \brief Perfom final computations before the relation can be used.
|
||||||
///
|
///
|
||||||
/// This function should be called after all propositions, state,
|
/// This function should be called after all propositions, state,
|
||||||
/// promise, and constraints have been declared, and before calling
|
/// accepting conditions, and constraints have been declared, and
|
||||||
/// get_code_data() or get_dict().
|
/// before calling get_code_data() or get_dict().
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -19,36 +19,37 @@ namespace spot
|
||||||
|
|
||||||
/// \brief encodes the accepting conditions
|
/// \brief encodes the accepting conditions
|
||||||
///
|
///
|
||||||
/// \c a \c U \c b, or \c F \c b, both imply that \c b
|
/// <tt>a U b</tt>, or <tt>F b</tt>, both imply that \c b should
|
||||||
/// should be verified eventually. We encode this with generalized
|
/// be verified eventually. We encode this with generalized Büchi
|
||||||
/// Büchi acceptating conditions. An accepting set, called Acc[b],
|
/// acceptating conditions. An accepting set, called
|
||||||
/// hold all the state that do not promise to verify \c b eventually.
|
/// <tt>Acc[b]</tt>, hold all the state that do not promise to
|
||||||
/// (I.e., all the states that contain \c b, or do not conatain
|
/// verify \c b eventually. (I.e., all the states that contain \c
|
||||||
/// \c a \c U \c b, or \c F \c b.)
|
/// b, or do not contain <tt>a U b</tt>, or <tt>F b</tt>.)
|
||||||
///
|
///
|
||||||
/// The spot::succ_iter::current_accepting_conditions() method
|
/// The spot::succ_iter::current_accepting_conditions() method
|
||||||
/// will return the Acc[x] variables of the accepting sets
|
/// will return the \c Acc[x] variables of the accepting sets
|
||||||
/// in which a transition is. Actually we never return Acc[x]
|
/// in which a transition is. Actually we never return \c Acc[x]
|
||||||
/// alone, but Acc[x] and all other accepting variables negated.
|
/// alone, but \c Acc[x] and all other accepting variables negated.
|
||||||
///
|
///
|
||||||
/// So if there is three accepting set \c a, \c b, and \c c, and
|
/// So if there is three accepting set \c a, \c b, and \c c, and a
|
||||||
/// a transition is in set \c a, we'll return \c Acc[a]&!Acc[b]&!Acc[c].
|
/// transition is in set \c a, we'll return <tt>
|
||||||
/// If the transition is in both \c a and \c b, we'll return
|
/// Acc[a]&!Acc[b]&!Acc[c]</tt>. If the transition is in both \c
|
||||||
/// \c (Acc[a]\&!Acc[b]\&!Acc[c]) \c | \c (!Acc[a]\&Acc[b]\&!Acc[c]).
|
/// a and \c b, we'll return <tt>(Acc[a]\&!Acc[b]\&!Acc[c]) \c | \c
|
||||||
|
/// (!Acc[a]\&Acc[b]\&!Acc[c])</tt>.
|
||||||
///
|
///
|
||||||
/// Accepting conditions are attributed to transitions and are
|
/// Accepting conditions are attributed to transitions and are
|
||||||
/// only concerned by atomic propositions (which label the
|
/// only concerned by atomic propositions (which label the
|
||||||
/// transitions) and Next variables (the destination). Typically,
|
/// transitions) and Next variables (the destination). Typically,
|
||||||
/// a transition should bear the variable Acc[b] if it doesn't
|
/// a transition should bear the variable \c Acc[b] if it doesn't
|
||||||
/// check for `b' and have a destination of the form \c a \c U \c
|
/// check for `b' and have a destination of the form <tt>a U b</tt>,
|
||||||
/// b, or \c F \c b.
|
/// or <tt>F b</tt>.
|
||||||
///
|
///
|
||||||
/// To summarize, \c accepting_conditions contains three kinds of
|
/// To summarize, \c accepting_conditions contains three kinds of
|
||||||
/// variables:
|
/// variables:
|
||||||
/// \li "Next" variables, that encode the destination state,
|
/// \li "Next" variables, that encode the destination state,
|
||||||
/// \li atomic propositions, which are things to verify before going on
|
/// \li atomic propositions, which are things to verify before going on
|
||||||
/// to the next state,
|
/// to the next state,
|
||||||
/// \li promise variables.
|
/// \li "Acc" variables.
|
||||||
bdd accepting_conditions;
|
bdd accepting_conditions;
|
||||||
|
|
||||||
/// The set of all accepting conditions used by the Automaton.
|
/// The set of all accepting conditions used by the Automaton.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue