spot  1.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
spot::ltl::ltl_simplifier Class Reference

Rewrite or simplify f in various ways. More...

#include <ltlvisit/simplify.hh>

Collaboration diagram for spot::ltl::ltl_simplifier:
Collaboration graph

Public Member Functions

 ltl_simplifier (bdd_dict *dict=0)
 ltl_simplifier (const ltl_simplifier_options &opt, bdd_dict *dict=0)
 ~ltl_simplifier ()
const formulasimplify (const formula *f)
const formulanegative_normal_form (const formula *f, bool negated=false)
bool syntactic_implication (const formula *f, const formula *g)
 Syntactic implication.
bool syntactic_implication_neg (const formula *f, const formula *g, bool right)
 Syntactic implication with one negated argument.
bool are_equivalent (const formula *f, const formula *g)
 check whether two formulae are equivalent.
bool implication (const formula *f, const formula *g)
 Check whether f implies g.
bdd as_bdd (const formula *f)
 Convert a Boolean formula as a BDD.
void clear_as_bdd_cache ()
 Clear the as_bdd() cache.
bdd_dictget_dict () const
 Return the bdd_dict used.
const formulastar_normal_form (const formula *f)
 Cached version of spot::ltl::star_normal_form().
void print_stats (std::ostream &os) const
 Dump statistics about the caches.

Private Member Functions

 ltl_simplifier (const ltl_simplifier &)

Private Attributes

ltl_simplifier_cache * cache_
bool owndict

Detailed Description

Rewrite or simplify f in various ways.

Constructor & Destructor Documentation

spot::ltl::ltl_simplifier::ltl_simplifier ( bdd_dict dict = 0)
spot::ltl::ltl_simplifier::ltl_simplifier ( const ltl_simplifier_options opt,
bdd_dict dict = 0 
)
spot::ltl::ltl_simplifier::~ltl_simplifier ( )
spot::ltl::ltl_simplifier::ltl_simplifier ( const ltl_simplifier )
private

Member Function Documentation

bool spot::ltl::ltl_simplifier::are_equivalent ( const formula f,
const formula g 
)

check whether two formulae are equivalent.

This costly check performs up to four translations, two products, and two emptiness checks.

bdd spot::ltl::ltl_simplifier::as_bdd ( const formula f)

Convert a Boolean formula as a BDD.

If you plan to use this method, be sure to pass a bdd_dict to the constructor.

void spot::ltl::ltl_simplifier::clear_as_bdd_cache ( )

Clear the as_bdd() cache.

Calling this function is recommended before running other algorithms that create BDD variables in a more natural order. For instance ltl_to_tgba_fm() will usually be more efficient if the BDD variables for atomic propositions have not been ordered before hand.

This also clears the language containment cache.

bdd_dict* spot::ltl::ltl_simplifier::get_dict ( ) const

Return the bdd_dict used.

bool spot::ltl::ltl_simplifier::implication ( const formula f,
const formula g 
)

Check whether f implies g.

This operation is costlier than syntactic_implication() because it requires two translation, one product and one emptiness check.

const formula* spot::ltl::ltl_simplifier::negative_normal_form ( const formula f,
bool  negated = false 
)

Build the negative normal form of formula f. All negations of the formula are pushed in front of the atomic propositions. Operators <=>, =>, xor are all removed (calling spot::ltl::unabbreviate_ltl is not needed).

Parameters
fThe formula to normalize.
negatedIf true, return the negative normal form of !f
void spot::ltl::ltl_simplifier::print_stats ( std::ostream &  os) const

Dump statistics about the caches.

const formula* spot::ltl::ltl_simplifier::simplify ( const formula f)

Simplify the formula f (using options supplied to the constructor).

const formula* spot::ltl::ltl_simplifier::star_normal_form ( const formula f)

Cached version of spot::ltl::star_normal_form().

bool spot::ltl::ltl_simplifier::syntactic_implication ( const formula f,
const formula g 
)

Syntactic implication.

Returns whether \a f syntactically implies \a g.

This is adapted from
@verbatim 

/// { somenzi.00.cav, /// author = {Fabio Somenzi and Roderick Bloem}, /// title = {Efficient {B"u}chi Automata for {LTL} Formulae}, /// booktitle = {Proceedings of the 12th International Conference on /// Computer Aided Verification (CAV'00)}, /// pages = {247–263}, /// year = {2000}, /// volume = {1855}, /// series = {Lecture Notes in Computer Science}, /// publisher = {Springer-Verlag} /// } ///

bool spot::ltl::ltl_simplifier::syntactic_implication_neg ( const formula f,
const formula g,
bool  right 
)

Syntactic implication with one negated argument.

If right is true, this method returns whether f implies !g. If right is false, this returns whether !g implies g.

Member Data Documentation

ltl_simplifier_cache* spot::ltl::ltl_simplifier::cache_
private
bool spot::ltl::ltl_simplifier::owndict
private

The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Sat Oct 27 2012 09:34:34 for spot by doxygen 1.8.1.2