1 #ifndef _VARIABLESTATETRANSFER_H
2 #define _VARIABLESTATETRANSFER_H
10 template <
class LatticeType>
35 if(resLat==NULL && arg1Lat != NULL)
40 return (arg1Lat && arg2Lat && resLat);
43 bool getLattices(
const SgUnaryOp *sgn, LatticeType* &arg1Lat, LatticeType* &arg2Lat, LatticeType* &resLat) {
49 arg2Lat =
new LatticeType(1);
54 return (arg1Lat && arg2Lat && resLat);
65 for(std::vector<Lattice*>::const_iterator it = lattices.begin(); it!=lattices.end(); it++)
66 (dynamic_cast<LatticeType *>(*it))->initialize();
71 LatticeType *lhsLat, *rhsLat, *resLat;
75 if(resLat)
Dbg::dbg <<
"resLat=\n "<<resLat->str(
" ")<<
"\n";
76 if(lhsLat)
Dbg::dbg <<
"lhsLat=\n "<<lhsLat->str(
" ")<<
"\n";
77 if(rhsLat)
Dbg::dbg <<
"rhsLat=\n "<<rhsLat->str(
" ")<<
"\n";
82 { resLat->copy(rhsLat);
modified =
true; }
84 { lhsLat->copy(rhsLat);
modified =
true; }
93 if(asgnLat)
Dbg::dbg <<
"asgnLat= "<<asgnLat->str(
" ")<<
"\n";
94 if(resLat)
Dbg::dbg <<
"resLat= "<<resLat->str(
" ")<<
"\n";
98 if(resLat) { resLat->copy(asgnLat);
modified =
true; }
108 if (inits.size() > 0) {
111 for (
size_t i = 1; i < inits.size(); ++i)
132 varLat->copy(initLat);
139 LatticeType *lhs, *rhs, *res;
143 res->meetUpdate(rhs);
149 LatticeType *lhs, *rhs, *res;
162 LatticeType *lhsLat, *rhsLat, *resLat;
166 resLat->copy(rhsLat);
180 resLat->copy(condLat);
181 resLat->meetUpdate(trueLat);
182 resLat->meetUpdate(falseLat);