00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef SPOT_TGBA_TGBAPRODUCT_HH
00023
# define SPOT_TGBA_TGBAPRODUCT_HH
00024
00025
#include "tgba.hh"
00026
#include "statebdd.hh"
00027
00028
namespace spot
00029 {
00030
00035 class state_product :
public state
00036 {
00037
public:
00043 state_product(
state* left,
state* right)
00044 :
left_(left),
00045
right_(right)
00046 {
00047 }
00048
00050
state_product(
const state_product& o);
00051
00052
virtual ~state_product();
00053
00054
state*
00055 left()
const
00056
{
00057
return left_;
00058 }
00059
00060
state*
00061 right()
const
00062
{
00063
return right_;
00064 }
00065
00066
virtual int compare(
const state* other)
const;
00067
virtual size_t
hash() const;
00068 virtual
state_product* clone() const;
00069
00070 private:
00071 state* left_;
00072 state* right_;
00073 };
00074
00075
00077 class
tgba_succ_iterator_product: public
tgba_succ_iterator
00078 {
00079
public:
00080
tgba_succ_iterator_product(tgba_succ_iterator* left,
00081 tgba_succ_iterator* right,
00082 bdd left_neg, bdd right_neg);
00083
00084
virtual ~
tgba_succ_iterator_product();
00085
00086
00087
void first();
00088
void next();
00089
bool done()
const;
00090
00091
00092
state_product* current_state()
const;
00093 bdd current_condition()
const;
00094 bdd current_acceptance_conditions()
const;
00095
00096
private:
00098
00099
void step_();
00100
void next_non_false_();
00102
00103
protected:
00104 tgba_succ_iterator* left_;
00105 tgba_succ_iterator* right_;
00106 bdd current_cond_;
00107 bdd left_neg_;
00108 bdd right_neg_;
00109 };
00110
00112 class tgba_product:
public tgba
00113 {
00114
public:
00119
tgba_product(
const tgba* left,
const tgba* right);
00120
00121
virtual ~
tgba_product();
00122
00123
virtual state* get_init_state()
const;
00124
00125
virtual tgba_succ_iterator_product*
00126 succ_iter(
const state* local_state,
00127
const state* global_state = 0,
00128
const tgba* global_automaton = 0)
const;
00129
00130
virtual bdd_dict* get_dict()
const;
00131
00132
virtual std::string format_state(
const state*
state)
const;
00133
00134
virtual state* project_state(
const state* s,
const tgba* t)
const;
00135
00136
virtual bdd all_acceptance_conditions()
const;
00137
virtual bdd neg_acceptance_conditions()
const;
00138
00139
protected:
00140
virtual bdd compute_support_conditions(
const state* state)
const;
00141
virtual bdd compute_support_variables(
const state* state)
const;
00142
00143
private:
00144 bdd_dict* dict_;
00145 const tgba* left_;
00146 const tgba* right_;
00147 bdd left_acc_complement_;
00148 bdd right_acc_complement_;
00149 bdd all_acceptance_conditions_;
00150 bdd neg_acceptance_conditions_;
00151
00152
tgba_product(
const tgba_product&);
00153
tgba_product& tgba_product::operator=(
const tgba_product&);
00154 };
00155
00156 }
00157
00158
#endif // SPOT_TGBA_TGBAPRODUCT_HH