spot  0.9.1
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
spot::ltl::random_sere Class Reference

Generate random SERE.This class recursively constructs SERE of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all SERE operators supported by Spot. More...

#include <ltlvisit/randomltl.hh>

Inheritance diagram for spot::ltl::random_sere:
Inheritance graph
[legend]
Collaboration diagram for spot::ltl::random_sere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 random_sere (const atomic_prop_set *ap)
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.

Public Attributes

random_boolean rb

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

Generate random SERE.

This class recursively constructs SERE of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all SERE operators supported by Spot.

By default each operator has equal chance to be selected.


Constructor & Destructor Documentation

Create a random SERE genere using atomic propositions from ap.

The default priorities are defined as follows:

      /// eword    1
      /// boolform 1
      /// star     1
      /// star_b   1
      /// equal_b  1
      /// goto_b   1
      /// and      1
      /// andNLM   1
      /// or       1
      /// concat   1
      /// fusion   1
      /// 

Where "boolfrom" designates a Boolean formula generated by random_boolean.

These priorities can be changed use the parse_options method.

In addition, you can set the properties of the Boolean formula generator used to build Boolean subformulae using the parse_options method of the rb attribute.


Member Function Documentation

const atomic_prop_set* spot::ltl::random_formula::ap ( ) const [inline, inherited]

Return the set of atomic proposition used to build formulae.

References spot::ltl::random_formula::ap_.

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

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

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

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) [inherited]

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, inherited]

Member Data Documentation

const atomic_prop_set* spot::ltl::random_formula::ap_ [protected, inherited]
unsigned spot::ltl::random_formula::proba_size_ [protected, inherited]
double spot::ltl::random_formula::total_1_ [protected, inherited]
double spot::ltl::random_formula::total_2_ [protected, inherited]
double spot::ltl::random_formula::total_2_and_more_ [protected, inherited]

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 May 23 2012 12:06:47 for spot by doxygen 1.7.6.1