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 #include "notcondexpression.h"
00036
00037 NotCondExpression::NotCondExpression(CondExpression * _exp):
00038 CondExpression(ect_not), exp(_exp) {
00039 }
00040
00041 NotCondExpression::~NotCondExpression() {
00042 delete exp;
00043 }
00044
00045 void NotCondExpression::scopeCheck(vector < unsigned >&def_vars,
00046 vector < unsigned >&introduced_vars,
00047 vector < unsigned >&violating_vars) {
00048 exp->scopeCheck(def_vars, introduced_vars, violating_vars);
00049 }
00050
00051 void NotCondExpression::replaceVarId(unsigned old_id, unsigned new_id) {
00052 exp->replaceVarId(old_id, new_id);
00053 }
00054
00055 void NotCondExpression::extractFSAMap(FSAMap * fsamap, unsigned parent_var) {
00056 exp->extractFSAMap(fsamap, parent_var);
00057 }
00058
00059 void NotCondExpression::extractParVarMap(ParVarMap * parvarmap) {
00060 exp->extractParVarMap(parvarmap);
00061 }
00062
00063 void NotCondExpression::extractDependencies(vector < DependencySet * >*depset) {
00064 exp->extractDependencies(depset);
00065 }
00066
00067 Expression *NotCondExpression::placeSignOffs(vector <
00068 SignOffExpression * >&signoffs) {
00069 exp = (CondExpression *) exp->placeSignOffs(signoffs);
00070
00071 return this;
00072 }
00073
00074 void NotCondExpression::rewriteEmptyFuncts() {
00075 exp->rewriteEmptyFuncts();
00076 }
00077
00078 void NotCondExpression::rewriteVarstepCondExps() {
00079 exp->rewriteVarstepCondExps();
00080 }
00081
00082 void NotCondExpression::rewriteAggregateFuncts() {
00083 exp->rewriteAggregateFuncts();
00084 }
00085
00086 void NotCondExpression::print(OutputStream & dos) const {
00087 dos << "fn:not(" << (*exp) << ")";
00088 }
00089
00090 void NotCondExpression::init(BufferNode * root) {
00091 exp->init(root);
00092 }
00093
00094 void NotCondExpression::eval(OutputStream & eos, Environment * env,
00095 unsigned modus) {
00096
00097 switch (modus) {
00098
00099 case EVAL_SIGNOFF:
00100 exp->eval(eos, env, EVAL_SIGNOFF);
00101 break;
00102
00103 default:
00104 throw
00105 RuntimeException("NotCondExpression: Illegal Evaluation Mode",
00106 eid_runtime_illegalmode);
00107 break;
00108 }
00109 }
00110
00111 bool NotCondExpression::evalCond(OutputStream & eos, Environment * env,
00112 unsigned modus) {
00113 return !exp->evalCond(eos, env, modus);
00114 }