00001 00002 /* 00003 | Author: Michael Schmidt; 00004 | Gunnar Jehl 00005 | 00006 | ************************* SOFTWARE LICENSE AGREEMENT *********************** 00007 | This source code is published under the BSD License. 00008 | 00009 | See file 'LICENSE.txt' that comes with this distribution or 00010 | http://dbis.informatik.uni-freiburg.de/index.php?project=GCX/license.php 00011 | for the full license agreement. 00012 | 00013 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00014 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00015 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00016 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00017 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00018 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00019 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00020 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00021 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00022 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00023 | POSSIBILITY OF SUCH DAMAGE. 00024 | **************************************************************************** 00025 */ 00026 00035 #ifndef SEQUENCEEXPRESSION_H 00036 #define SEQUENCEEXPRESSION_H 00037 00038 #include "expression.h" 00039 #include "varstepexpression.h" 00040 #include "forexpression.h" 00041 #include "signoffexpression.h" 00042 #include "outputstreammanip.h" 00043 00055 class SequenceExpression:public Expression { 00056 00057 public: 00063 SequenceExpression(Expression * _left, Expression * _right); 00064 00068 virtual ~ SequenceExpression(); 00069 00073 virtual void scopeCheck(vector < unsigned >&def_vars, 00074 vector < unsigned >&introduced_vars, 00075 vector < unsigned >&violating_vars); 00076 00080 virtual void replaceVarId(unsigned old_id, unsigned new_id); 00081 00085 virtual void mergeSequences(); 00086 00090 virtual void extractFSAMap(FSAMap * fsamap, unsigned parent_var); 00091 00095 virtual void extractParVarMap(ParVarMap * parvarmap); 00096 00100 virtual void extractDependencies(vector < DependencySet * >*depset); 00101 00105 virtual Expression *placeSignOffs(vector < SignOffExpression * >&signoffs); 00106 00110 virtual void rewriteWhereExps(); 00111 00115 virtual void rewriteEmptyFuncts(); 00116 00120 virtual void rewriteVarstepCondExps(); 00121 00125 virtual void rewriteAggregateFuncts(); 00126 00130 virtual void rewriteVarsteps(); 00131 00135 virtual void print(OutputStream & dos) const; 00136 00140 virtual void init(BufferNode * root); 00141 00145 virtual void eval(OutputStream & eos, Environment * env, unsigned modus); 00146 00153 inline void insertExp(Expression * exp) { 00154 exps.push_back(exp); 00155 } inline void unsetRecursiveDelete() { 00162 delete_recursively = false; 00163 } 00164 00168 virtual bool containsDirectOutput(); 00169 00170 private: 00176 inline vector < Expression * >*getExps() { 00177 return &exps; 00178 } 00179 00184 vector < Expression * >exps; 00185 00190 bool delete_recursively; 00191 }; 00192 00193 #endif // SEQUENCEEXPRESSION_H