spot  1.0.2
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
spot::ltl::random_formula Class Reference

Base class for random formula generators. More...

#include <ltlvisit/randomltl.hh>

Inheritance diagram for spot::ltl::random_formula:
Inheritance graph
Collaboration diagram for spot::ltl::random_formula:
Collaboration graph

Classes

struct  op_proba

Public Member Functions

 random_formula (unsigned proba_size, const atomic_prop_set *ap)
virtual ~random_formula ()
const atomic_prop_setap () const
 Return the set of atomic proposition used to build formulae.
const formulagenerate (int n) const
 Generate a formula of size n.
std::ostream & dump_priorities (std::ostream &os) const
 Print the priorities of each operator, constants, and atomic propositions.
const char * parse_options (char *options)
 Update the priorities used to generate the formulae.

Protected Member Functions

void update_sums ()

Protected Attributes

unsigned proba_size_
op_probaproba_
double total_1_
op_probaproba_2_
double total_2_
op_probaproba_2_or_more_
double total_2_and_more_
const atomic_prop_setap_

Detailed Description

Base class for random formula generators.

Constructor & Destructor Documentation

spot::ltl::random_formula::random_formula ( unsigned  proba_size,
const atomic_prop_set ap 
)
inline
virtual spot::ltl::random_formula::~random_formula ( )
inlinevirtual

References proba_.

Member Function Documentation

const atomic_prop_set* spot::ltl::random_formula::ap ( ) const
inline

Return the set of atomic proposition used to build formulae.

References ap_.

std::ostream& spot::ltl::random_formula::dump_priorities ( std::ostream &  os) const

Print the priorities of each operator, constants, and atomic propositions.

const formula* spot::ltl::random_formula::generate ( int  n) const

Generate a formula of size n.

It is possible to obtain formulae that are smaller than n, because some simple simplifications are performed by the AST. (For instance the formula a | a is automatically reduced to a by spot::ltl::multop.)

const char* spot::ltl::random_formula::parse_options ( char *  options)

Update the priorities used to generate the formulae.

options should be comma-separated list of KEY=VALUE assignments, using keys from the above list. For instance "xor=0, F=3" will prevent xor from being used, and will raise the relative probability of occurrences of the F operator.

void spot::ltl::random_formula::update_sums ( )
protected

Member Data Documentation

const atomic_prop_set* spot::ltl::random_formula::ap_
protected

Referenced by ap().

op_proba* spot::ltl::random_formula::proba_
protected

Referenced by ~random_formula().

op_proba* spot::ltl::random_formula::proba_2_
protected
op_proba* spot::ltl::random_formula::proba_2_or_more_
protected
unsigned spot::ltl::random_formula::proba_size_
protected
double spot::ltl::random_formula::total_1_
protected
double spot::ltl::random_formula::total_2_
protected
double spot::ltl::random_formula::total_2_and_more_
protected

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 Wed Mar 6 2013 09:25:17 for spot by doxygen 1.8.1.2