Binary Class Reference

#include <include/exp.h>

Inheritance diagram for Binary:

Unary Exp Ternary List of all members.

Detailed Description

Definition at line 560 of file exp.h.

Public Member Functions

virtual Expaccept (ExpModifier *v)
virtual bool accept (ExpVisitor *v)
virtual void appendDotFile (std::ofstream &of)
virtual TypeascendType ()
 Binary (Binary &o)
 Binary (OPER op, Exp *e1, Exp *e2)
virtual Expclone ()
void commute ()
 Swap the two subexpressions.
virtual void descendType (Type *parentType, bool &ch, Statement *s)
void doSearchChildren (Exp *search, std::list< Exp ** > &li, bool once)
virtual ExpgenConstraints (Exp *restrictTo)
int getArity ()
ExpgetSubExp2 ()
virtual bool match (const char *pattern, std::map< std::string, Exp * > &bindings)
virtual Expmatch (Exp *pattern)
virtual bool operator *= (Exp &o)
virtual bool operator< (const Exp &o) const
virtual bool operator== (const Exp &o) const
virtual ExppolySimplify (bool &bMod)
virtual void print (std::ostream &os, bool html=false)
virtual void printr (std::ostream &os, bool html=false)
virtual void printx (int ind)
Exp *& refSubExp2 ()
void setSubExp2 (Exp *e)
ExpsimplifyAddr ()
ExpsimplifyArith ()
virtual ExpsimplifyConstraint ()
virtual ~Binary ()

Protected Member Functions

 Binary (OPER op)

Protected Attributes

ExpsubExp2

Private Member Functions

ExpconstrainSub (TypeVal *typeVal1, TypeVal *typeVal2)

Friends

class XMLProgParser


Constructor & Destructor Documentation

Binary::Binary OPER  op  )  [protected]
 

Definition at line 84 of file exp.cpp.

References subExp2.

Referenced by clone(), constrainSub(), genConstraints(), Ternary::genConstraints(), and match().

Binary::Binary OPER  op,
Exp e1,
Exp e2
 

Definition at line 88 of file exp.cpp.

References Unary::subExp1, and subExp2.

Binary::Binary Binary o  ) 
 

Definition at line 94 of file exp.cpp.

References Exp::clone(), Unary::setSubExp1(), Unary::subExp1, and subExp2.

Binary::~Binary  )  [virtual]
 

Definition at line 188 of file exp.cpp.

References subExp2.


Member Function Documentation

Exp * Binary::accept ExpModifier v  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 3694 of file exp.cpp.

References Exp::accept(), ExpModifier::postVisit(), ExpModifier::preVisit(), Unary::subExp1, and subExp2.

bool Binary::accept ExpVisitor v  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 3602 of file exp.cpp.

References Exp::accept(), Unary::subExp1, subExp2, and ExpVisitor::visit().

void Binary::appendDotFile std::ofstream &  of  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 1130 of file exp.cpp.

References Exp::appendDotFile(), Exp::op, operStrings, Unary::subExp1, and subExp2.

Type * Binary::ascendType  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 961 of file dfa.cpp.

References Exp::ascendType(), deltaDifference(), Exp::op, opBitAnd, opBitOr, opBitXor, opDiv, opDivs, opFlagCall, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, opMinus, opMults, opShiftL, opShiftR, opShiftRA, sigmaSum(), Unary::subExp1, and subExp2.

Exp * Binary::clone  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 298 of file exp.cpp.

References Binary(), Exp::clone(), Exp::op, Unary::subExp1, and subExp2.

void Binary::commute  ) 
 

Swap the two subexpressions.

Definition at line 269 of file exp.cpp.

References Unary::subExp1, and subExp2.

Referenced by polySimplify().

Exp * Binary::constrainSub TypeVal typeVal1,
TypeVal typeVal2
[private]
 

Definition at line 3359 of file exp.cpp.

References Binary(), Exp::genConstraints(), Unary::subExp1, and subExp2.

Referenced by genConstraints().

void Binary::descendType Type parentType,
bool &  ch,
Statement s
[virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 1087 of file dfa.cpp.

References Exp::ascendType(), Type::asPointer(), PointerType::getPointsTo(), Statement::getProc(), Proc::getProg(), Proc::getSignature(), Signature::isAddrOfStackLocal(), Exp::op, opFlagCall, Type::resolvesToPointer(), Type::resolvesToVoid(), UserProc::setImplicitRef(), Unary::subExp1, and subExp2.

void Binary::doSearchChildren Exp search,
std::list< Exp ** > &  li,
bool  once
[virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 1573 of file exp.cpp.

References Exp::doSearch(), Exp::search(), Unary::subExp1, and subExp2.

Exp * Binary::genConstraints Exp restrictTo  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 3367 of file exp.cpp.

References Binary(), TypeVal::clone(), constrainSub(), Type::isFloat(), Type::isInteger(), Type::isPointer(), PointerType::newPtrAlpha(), NULL, opBitAnd, opBitOr, opBitXor, opFalse, opFDiv, opFMinus, opFMult, opFPlus, opOr, result, Exp::simplify(), Unary::subExp1, and subExp2.

int Binary::getArity  )  [inline, virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 585 of file exp.h.

Exp * Binary::getSubExp2  )  [virtual]
 

Reimplemented from Exp.

Definition at line 238 of file exp.cpp.

References Unary::subExp1, and subExp2.

Referenced by findSwParams(), Ternary::operator *=(), Ternary::operator<(), Ternary::operator==(), ExpCastInserter::postVisit(), SizeStripper::preVisit(), and ExpTest::testSimplifyBinary().

bool Binary::match const char *  pattern,
std::map< std::string, Exp * > &  bindings
[virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 1399 of file exp.cpp.

References Exp::isStrConst(), ISVARIABLE, LOG, Exp::match(), Exp::op, opMemberAccess, Unary::subExp1, subExp2, and tlstrchr().

Exp * Binary::match Exp pattern  )  [virtual]
 

Reimplemented from Unary.

Definition at line 1283 of file exp.cpp.

References Binary(), Exp::getOper(), Exp::getSubExp1(), Exp::getSubExp2(), LOG, Exp::match(), NULL, Exp::op, opList, opNil, result, Unary::subExp1, and subExp2.

bool Binary::operator *= Exp o  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 526 of file exp.cpp.

References Exp::getOper(), Unary::getSubExp1(), Exp::getSubExp1(), Exp::getSubExp2(), Exp::op, opSubscript, opWild, Unary::subExp1, and subExp2.

bool Binary::operator< const Exp o  )  const [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 455 of file exp.cpp.

References Exp::getOper(), Unary::getSubExp1(), Exp::getSubExp2(), Exp::op, Unary::subExp1, and subExp2.

bool Binary::operator== const Exp o  )  const [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 365 of file exp.cpp.

References Unary::getSubExp1(), Exp::getSubExp2(), Exp::op, opWild, Unary::subExp1, and subExp2.

Exp * Binary::polySimplify bool &  bMod  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 2032 of file exp.cpp.

References commute(), Exp::getOper(), Exp::getSubExp1(), Exp::isAddrOf(), Exp::isBoolConst(), Exp::isGlobal(), Exp::isSubscript(), opAnd, opBitAnd, opBitOr, opBitXor, opDiv, opDivs, opEquals, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opIntConst, opLess, opLessEq, opLessEqUns, opLessUns, opMod, opMods, opMult, opMults, opNotEqual, opOr, opPlus, opShiftL, opShiftR, opShiftRA, opTrue, Exp::polySimplify(), Unary::subExp1, and subExp2.

void Binary::print std::ostream &  os,
bool  html = false
[virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 645 of file exp.cpp.

References LOG, NULL, Exp::op, opAnd, opArrayIndex, opBitAnd, opBitOr, opBitXor, opDiv, opDivs, opEquals, operStrings, opExpTable, opFDiv, opFlagCall, opFMinus, opFMult, opFPlus, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, opList, opLower, opMemberAccess, opMinus, opMod, opMods, opMult, opMults, opNameTable, opNotEqual, opOr, opPlus, opPow, opRotateL, opRotateLC, opRotateR, opRotateRC, opShiftL, opShiftR, opShiftRA, opSize, opUpper, Exp::print(), Exp::printr(), Unary::subExp1, and subExp2.

Referenced by printr(), and ExpTest::testBinaries().

void Binary::printr std::ostream &  os,
bool  html = false
[virtual]
 

Reimplemented from Exp.

Reimplemented in Ternary.

Definition at line 625 of file exp.cpp.

References Exp::op, opList, opSize, print(), Unary::subExp1, and subExp2.

void Binary::printx int  ind  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 3773 of file exp.cpp.

References child(), operStrings, Unary::subExp1, and subExp2.

Exp *& Binary::refSubExp2  )  [virtual]
 

Reimplemented from Exp.

Definition at line 242 of file exp.cpp.

References Unary::subExp1, and subExp2.

void Binary::setSubExp2 Exp e  )  [virtual]
 

Reimplemented from Exp.

Definition at line 214 of file exp.cpp.

References Unary::subExp1, and subExp2.

Referenced by ExpCastInserter::postVisit().

Exp * Binary::simplifyAddr  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 2976 of file exp.cpp.

References Exp::simplifyAddr(), Unary::subExp1, and subExp2.

Exp * Binary::simplifyArith  )  [virtual]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 1764 of file exp.cpp.

References Exp::op, opMinus, opPlus, Exp::partitionTerms(), Exp::simplifyArith(), Unary::subExp1, and subExp2.

Referenced by SimpExpModifier::postVisit().

Exp * Binary::simplifyConstraint  )  [virtual]
 

Reimplemented from Unary.

Definition at line 3558 of file exp.cpp.

References Type::isPointerToAlpha(), Exp::isTypeVal(), NULL, opFalse, opTrue, Exp::simplifyConstraint(), Unary::subExp1, and subExp2.


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from Unary.

Reimplemented in Ternary.

Definition at line 628 of file exp.h.


Member Data Documentation

Exp* Binary::subExp2 [protected]
 

Definition at line 562 of file exp.h.

Referenced by Ternary::accept(), accept(), Ternary::appendDotFile(), appendDotFile(), Ternary::ascendType(), ascendType(), Binary(), Ternary::clone(), clone(), commute(), constrainSub(), descendType(), Ternary::doSearchChildren(), doSearchChildren(), genConstraints(), Ternary::genConstraints(), getSubExp2(), Ternary::getSubExp3(), match(), Ternary::operator *=(), operator *=(), Ternary::operator<(), operator<(), Ternary::operator==(), operator==(), XMLProgParser::persistToXML(), Ternary::polySimplify(), polySimplify(), print(), printr(), Ternary::printx(), printx(), refSubExp2(), Ternary::refSubExp3(), setSubExp2(), Ternary::setSubExp3(), Ternary::simplifyAddr(), simplifyAddr(), simplifyArith(), Ternary::simplifyArith(), simplifyConstraint(), Ternary::Ternary(), and ~Binary().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:40 2006 for Boomerang by  doxygen 1.4.6