00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00035 #ifndef FOREXPRESSION_H
00036 #define FOREXPRESSION_H
00037
00038 #include "expression.h"
00039 #include "varstepexpression.h"
00040 #include "bufferiterator.h"
00041 #include "sequenceexpression.h"
00042
00054 class ForExpression:public Expression {
00055
00056 public:
00063 ForExpression(VarExpression * _var, VarExpression * _varexp,
00064 Expression * _exp);
00065
00072 ForExpression(VarExpression * _var, VarStepExpression * _varstep,
00073 Expression * _exp);
00074
00078 virtual ~ ForExpression();
00079
00083 virtual void scopeCheck(vector < unsigned >&def_vars,
00084 vector < unsigned >&introduced_vars,
00085 vector < unsigned >&violating_vars);
00086
00090 virtual void replaceVarId(unsigned old_id, unsigned new_id);
00091
00095 virtual void mergeSequences();
00096
00100 virtual void extractFSAMap(FSAMap * fsamap, unsigned parent_var);
00101
00105 virtual void extractParVarMap(ParVarMap * parvarmap);
00106
00110 virtual void extractDependencies(vector < DependencySet * >*depset);
00111
00115 virtual Expression *placeSignOffs(vector < SignOffExpression * >&signoffs);
00116
00120 virtual void rewriteWhereExps();
00121
00125 virtual void rewriteEmptyFuncts();
00126
00130 virtual void rewriteVarstepCondExps();
00131
00135 virtual void rewriteAggregateFuncts();
00136
00140 virtual void rewriteVarsteps();
00141
00145 virtual void print(OutputStream & dos) const;
00146
00150 virtual void init(BufferNode * root);
00151
00155 virtual void eval(OutputStream & eos, Environment * env, unsigned modus);
00156
00166 virtual void evalSignOffForBinding(OutputStream & eos, Environment * env,
00167 BufferNode * cur);
00168
00172 virtual bool containsDirectOutput();
00173
00174 private:
00180 VarExpression * var;
00181
00188 VarExpression *varexp;
00189
00196 VarStepExpression *varstep;
00197
00203 Expression *exp;
00204
00211 BufferIterator *bit;
00212 };
00213
00214 #endif // FOREXPRESSION_H