c7e955b50bf12f87d507af3286d261f532368227
[Faustine.git] / interpretor / faust-0.9.47mr3 / compiler / signals / sigraterules.hh
1 #ifndef SIGRATERULES_HH
2 #define SIGRATERULES_HH
3
4 #include <iostream>
5 #include "tlib.hh"
6 #include "property.hh"
7
8
9 class RateInferrer
10 {
11 bool fSuccess; ///< true when rates can be correctly inferred
12 Tree fFullList; ///< list of signals + list recursive signals inside
13 Tree fRateEnv; ///< list of signals + list recursive signals inside
14 property<int> fRateProperty; ///< property used to store the rate of signals
15
16 int computeRate(Tree sig);
17 public:
18 RateInferrer(Tree lsig); ///< list of signals we want to inferre the rates
19 int rate(Tree sig); ///< returns the rate of sig assuming that sig is a subexpression of lsig
20
21 };
22
23 #endif // SIGRATERULES_HH