* src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh: Merge the
two unabbreviate_logic definitions (const and non-const) into a function that takes a const formula* and return a non-const formula*. Since formula* is convertible to const formula*, and the const version of the function just called the non-onst one, it makes no sense to keep both. Also, it confused Swig. * src/ltlvisit/nenoform.cc, src/ltlvisit/nenoform.hh: Likewise for negative_normal_form. * src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh: Likewise for unabbreviate_ltl. * src/ltlvisit/clone.cc, src/ltlvisit/clone.hh: Likewise for clone. * src/ltlvisit/destroy.cc, src/ltlvisit/destroy.hh: Likewise for destroy.
This commit is contained in:
parent
d33ad6d6bf
commit
f1f81fbfef
11 changed files with 32 additions and 59 deletions
14
ChangeLog
14
ChangeLog
|
|
@ -1,5 +1,19 @@
|
|||
2003-08-01 Alexandre Duret-Lutz <aduret@src.lip6.fr>
|
||||
|
||||
* src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh: Merge the
|
||||
two unabbreviate_logic definitions (const and non-const) into a
|
||||
function that takes a const formula* and return a non-const
|
||||
formula*. Since formula* is convertible to const formula*, and
|
||||
the const version of the function just called the non-onst one, it
|
||||
makes no sense to keep both. Also, it confused Swig.
|
||||
* src/ltlvisit/nenoform.cc, src/ltlvisit/nenoform.hh: Likewise
|
||||
for negative_normal_form.
|
||||
* src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh: Likewise
|
||||
for unabbreviate_ltl.
|
||||
* src/ltlvisit/clone.cc, src/ltlvisit/clone.hh: Likewise for clone.
|
||||
* src/ltlvisit/destroy.cc, src/ltlvisit/destroy.hh: Likewise
|
||||
for destroy.
|
||||
|
||||
* configure.ac: Bump version to 0.0g.
|
||||
|
||||
* configure.ac, NEWS: Bump version to 0.0f.
|
||||
|
|
|
|||
|
|
@ -62,18 +62,12 @@ namespace spot
|
|||
return clone(f);
|
||||
}
|
||||
|
||||
formula*
|
||||
clone(formula* f)
|
||||
{
|
||||
clone_visitor v;
|
||||
f->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
|
||||
formula*
|
||||
clone(const formula* f)
|
||||
{
|
||||
return clone(const_cast<formula*>(f));
|
||||
clone_visitor v;
|
||||
const_cast<formula*>(f)->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ namespace spot
|
|||
formula* result_;
|
||||
};
|
||||
|
||||
/// \brief Clone a formula.
|
||||
formula* clone(formula* f);
|
||||
/// \brief Clone a formula.
|
||||
formula* clone(const formula* f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,17 +15,11 @@ namespace spot
|
|||
}
|
||||
};
|
||||
|
||||
void
|
||||
destroy(formula* f)
|
||||
{
|
||||
destroy_visitor v;
|
||||
f->accept(v);
|
||||
}
|
||||
|
||||
void
|
||||
destroy(const formula* f)
|
||||
{
|
||||
destroy(const_cast<formula*>(f));
|
||||
destroy_visitor v;
|
||||
const_cast<formula*>(f)->accept(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ namespace spot
|
|||
{
|
||||
namespace ltl
|
||||
{
|
||||
/// \brief Destroys a formula
|
||||
void destroy(formula *f);
|
||||
/// \brief Destroys a formula
|
||||
void destroy(const formula *f);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,17 +66,11 @@ namespace spot
|
|||
}
|
||||
|
||||
formula*
|
||||
unabbreviate_logic(formula* f)
|
||||
{
|
||||
unabbreviate_logic_visitor v;
|
||||
f->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
|
||||
const formula*
|
||||
unabbreviate_logic(const formula* f)
|
||||
{
|
||||
return unabbreviate_logic(const_cast<formula*>(f));
|
||||
unabbreviate_logic_visitor v;
|
||||
const_cast<formula*>(f)->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,16 +31,13 @@ namespace spot
|
|||
virtual formula* recurse(formula* f);
|
||||
};
|
||||
|
||||
/// \brief Clone rewrite a formula to remove most of the abbreviated
|
||||
/// \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.
|
||||
formula* unabbreviate_logic(formula* f);
|
||||
/// \brief Clone rewrite a formula to remove most of the abbreviated
|
||||
/// logical operators.
|
||||
const formula* unabbreviate_logic(const formula* f);
|
||||
formula* unabbreviate_logic(const formula* f);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,17 +168,12 @@ namespace spot
|
|||
};
|
||||
|
||||
formula*
|
||||
negative_normal_form(formula* f, bool negated)
|
||||
negative_normal_form(const formula* f, bool negated)
|
||||
{
|
||||
negative_normal_form_visitor v(negated);
|
||||
f->accept(v);
|
||||
const_cast<formula*>(f)->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
|
||||
const formula*
|
||||
negative_normal_form(const formula* f)
|
||||
{
|
||||
return negative_normal_form(const_cast<formula*>(f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ namespace spot
|
|||
/// 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(formula* f, bool negated = false);
|
||||
/// \brief Build the negative normal form of \a f.
|
||||
const formula* negative_normal_form(const formula* f);
|
||||
formula* negative_normal_form(const formula* f, bool negated = false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,17 +42,11 @@ namespace spot
|
|||
}
|
||||
|
||||
formula*
|
||||
unabbreviate_ltl(formula* f)
|
||||
{
|
||||
unabbreviate_ltl_visitor v;
|
||||
f->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
|
||||
const formula*
|
||||
unabbreviate_ltl(const formula* f)
|
||||
{
|
||||
return unabbreviate_ltl(const_cast<formula*>(f));
|
||||
unabbreviate_ltl_visitor v;
|
||||
const_cast<formula*>(f)->accept(v);
|
||||
return v.result();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,10 +41,7 @@ namespace spot
|
|||
///
|
||||
/// This will also rewrite unary operators such as unop::F,
|
||||
/// and unop::G, using only binop::U, and binop::R.
|
||||
formula* unabbreviate_ltl(formula* f);
|
||||
/// \brief Clone and rewrite a formula to remove most of the
|
||||
/// abbreviated LTL and logical operators.
|
||||
const formula* unabbreviate_ltl(const formula* f);
|
||||
formula* unabbreviate_ltl(const formula* f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue