* src/ltlvisit/Makefile.am: Copyright 2004.

* src/ltltest/inf.test: More test.
* src/ltlvisit/basereduc.cc, src/ltlvisit/forminf.cc (spot):
Use dynamic_cast.
* src/ltlvisit/reducform.cc, src/ltlvisit/reducform.hh,
src/ltltest/reduc.test, src/ltltest/reduc.cc: Add an option
to choose which rules applies to simplify the formula.
This commit is contained in:
martinez 2004-05-13 16:00:15 +00:00
parent f7e5fe0821
commit 4cd10c3dfc
9 changed files with 489 additions and 460 deletions

View file

@ -25,38 +25,48 @@
#include "ltlast/formula.hh"
#include "ltlast/visitor.hh"
// For debog
// For debug
#include "ltlvisit/dump.hh"
namespace spot
{
namespace ltl
{
formula* reduce(const formula* f);
/// \brief Reduce a formula \a f using Basic rewriting, implies relation,
/// and class of eventuality and univerality formula.
/// Put the formula in negative normal form with
/// spot::ltl::negative_normal_form.
/// option are:
/// Base for spot::ltl::Basic_reduce_form,
/// Inf for spot::ltl:: reduce_inf_form,
/// EventualUniversal for spot::ltl::reduce_eventuality_universality_form,
/// BRI for spot::ltl::reduce_form.
/* Basic rewriting */
enum option {Base, Inf, EventualUniversal, BRI};
formula* reduce(const formula* f, option o = BRI);
/// Implement basic rewriting.
formula* basic_reduce_form(const formula* f);
/* formula rewriting using univerality, eventuality,
implies and basic_reduce_form */
formula* reduce_form(const formula* f);
/// Use by spot::ltl::reduce
/// Implement rewritings rules using implies relation,
/// and class of eventuality and univerality formula.
formula* reduce_form(const formula* f, option o = BRI);
/* detect easy case of implies */
/// detect easy case of implies.
bool inf_form(const formula* f1, const formula* f2);
/* true if f1 < f2, false otherwise */
/// true if f1 < f2, false otherwise.
bool infneg_form(const formula* f1, const formula* f2, int n);
/* true if !f1 < f2, false otherwise */
/// true if !f1 < f2, false otherwise.
/* detect if a formula is of class eventuality or universality */
/// detect if a formula is of class eventuality or universality.
bool is_eventual(const formula* f);
bool is_universal(const formula* f);
/* detect if a formula is of form GF or FG */
bool is_GF(const formula* f);
bool is_FG(const formula* f);
/* To know the first node of a formula */
/// For test.
int form_length(const formula* f);
/// To know the first node of a formula.
class node_type_form_visitor : public const_visitor
{
public:
@ -72,14 +82,11 @@ namespace spot
protected:
type result_;
};
node_type_form_visitor::type node_type(const formula* f);
/* Obsolete */
int nb_term_multop(const formula* f);
formula* reduce_inf_form(const formula* f); /* Obsolete */
int form_length(const formula* f); /* For test */
/// detect if a formula is of form GF or FG.
bool is_GF(const formula* f);
bool is_FG(const formula* f);
}
}