* src/ltlast/atomic_prop.hh, src/ltlast/binop.hh,

src/ltlast/constant.hh, src/ltlast/formula.hh,
src/ltlast/multop.hh, src/ltlast/unop.hh, src/ltlast/visitor.hh,
src/ltlenv/defaultenv.hh, src/ltlenv/environment.hh,
src/ltlparse/public.hh, src/ltlvisit/clone.hh,
src/ltlvisit/dotty.hh, src/ltlvisit/dump.hh,
src/ltlvisit/equals.hh, src/ltlvisit/lunabbrev.hh,
src/ltlvisit/nenoform.hh, src/ltlvisit/tunabbrev.hh: Add
Doxygen comments.
* src/visitor.hh: Do not use const_sel.  This clarify
the code and helps Doxygen.
This commit is contained in:
Alexandre Duret-Lutz 2003-04-18 15:02:55 +00:00
parent 4b8b02e811
commit d35817ccd9
19 changed files with 239 additions and 51 deletions

View file

@ -8,8 +8,12 @@ namespace spot
{
namespace ltl
{
// This visitor is public, because it's convenient
// to derive from it and override part of its methods.
/// \brief Clone a formula.
///
/// This visitor is public, because it's convenient
/// to derive from it and override part of its methods.
/// But if you just want the functionality, consider using
/// spot::ltl::clone instead.
class clone_visitor : public const_visitor
{
public:
@ -30,6 +34,7 @@ namespace spot
formula* result_;
};
/// \brief Clone a formula.
formula* clone(const formula* f);
}
}

View file

@ -8,6 +8,12 @@ namespace spot
{
namespace ltl
{
/// \brief Write a formula tree using dot's syntax.
/// \param f The formula to translate.
/// \param os The stream where it should be output.
///
/// \c dot is part of the GraphViz package
/// http://www.research.att.com/sw/tools/graphviz/
void dotty(const formula& f, std::ostream& os);
}
}

View file

@ -1,13 +1,18 @@
#ifndef SPOT_LTLVISIT_DUMP_HH
# define SPOT_LTLVISIT_DUMP_HH
#include <ltlast/formula.hh>
#include "ltlast/formula.hh"
#include <iostream>
namespace spot
{
namespace ltl
{
/// \brief Dump a formula tree.
/// \param f The formula to dump.
/// \param os The stream where it should be output.
///
/// This is useful to display a formula when debugging.
void dump(const formula& f, std::ostream& os);
}
}

View file

@ -5,8 +5,12 @@ namespace spot
{
namespace ltl
{
// This visitor is public, because it's convenient
// to derive from it and override part of its methods.
/// \brief Check for equality between two formulae.
///
/// This visitor is public, because it's convenient
/// to derive from it and override some of its methods.
/// But if you just want the functionality, consider using
/// spot::ltl::equals instead.
class equals_visitor : public const_visitor
{
public:
@ -28,7 +32,14 @@ namespace spot
bool result_;
};
/// \brief Check whether two formulae are syntaxically equal.
/// \return \c true iff \a f1 equals \a f2.
///
/// This tests for syntaxic equality rather than semantic equality.
/// Two formulae are equals of their abstract syntax tree are equals.
/// ltl::multop children can be permuted or repeated without
/// impact on the result of this comparison.
bool equals(const formula* f1, const formula* f2);
}
}

View file

@ -7,8 +7,17 @@ namespace spot
{
namespace ltl
{
// This visitor is public, because it's convenient
// to derive from it and override part of its methods.
/// \brief Clone and rewrite a formula to remove most of the
/// abbreviated logical operators.
///
/// This will rewrite binary operators such as binop::Implies,
/// binop::Equals, and binop::Xor, using only unop::Not, multop::Or,
/// and multop::And.
///
/// This visitor is public, because it's convenient
/// to derive from it and override some of its methods.
/// But if you just want the functionality, consider using
/// spot::ltl::unabbreviate_logic instead.
class unabbreviate_logic_visitor : public clone_visitor
{
typedef clone_visitor super;
@ -22,6 +31,12 @@ namespace spot
virtual formula* recurse(const formula* f);
};
/// \brief Clone rewrite a formula to remove most of the abbreviated
/// logical operators.
///
/// This will rewrite binary operators such as binop::Implies,
/// binop::Equals, and binop::Xor, using only unop::Not, multop::Or,
/// and multop::And.
formula* unabbreviate_logic(const formula* f);
}
}

View file

@ -8,9 +8,20 @@ namespace spot
{
namespace ltl
{
/* Return the negative normal form of F, i.e., all negations
of the formula are pushed in front of the atomic propositions.
If NEGATED is true, return the normal form of !F instead. */
/// \brief Build the negative normal form of \a f.
///
/// All negations of the formula are pushed in front of the
/// atomic propositions.
///
/// \param f The formula to normalize.
/// \param negated If \c true, return the negative normal form of
/// \c !f
///
/// Note that this will not remove abbreviated operators. If you
/// want to remove abbreviations, call spot::ltl::unabbreviate_logic
/// or spot::ltl::unabbreviate_ltl first. (Calling these functions
/// after spot::ltl::negative_normal_form would likely produce a
/// formula which is not in negative normal form.)
formula* negative_normal_form(const formula* f, bool negated = false);
}
}

View file

@ -8,6 +8,19 @@ namespace spot
{
namespace ltl
{
/// \brief Clone and rewrite a formula to remove most of the
/// abbreviated LTL and logical operators.
///
/// The rewriting performed on logical operator is
/// the same as the one done by spot::ltl::unabbreviate_logic_visitor.
///
/// This will also rewrite unary operators such as unop::F,
/// and unop::G, using only binop::U, and binop::R.
///
/// This visitor is public, because it's convenient
/// to derive from it and override some of its methods.
/// But if you just want the functionality, consider using
/// spot::ltl::unabbreviate_ltl instead.
class unabbreviate_ltl_visitor : public unabbreviate_logic_visitor
{
typedef unabbreviate_logic_visitor super;
@ -20,6 +33,14 @@ namespace spot
formula* recurse(const formula* f);
};
/// \brief Clone and rewrite a formula to remove most of the
/// abbreviated LTL and logical operators.
///
/// The rewriting performed on logical operator is
/// the same as the one done by spot::ltl::unabbreviate_logic.
///
/// This will also rewrite unary operators such as unop::F,
/// and unop::G, using only binop::U, and binop::R.
formula* unabbreviate_ltl(const formula* f);
}
}