class SgExpression

SgExpression is the base class for all the other expression classes.

Inheritance:

SgExpression


Public Methods

void addAttribute(void *a, int size)
no type specifed
void addAttribute(int type, void *a, int size)
void * can be NULL
void addAttribute(int type)
void * is NULL
void addAttribute(SgAttribute *att)
SgExpression* arrayRefs()
Returns a list of array reference in the expression.
int attributeType(int i)
void* attributeValue(int i)
void* attributeValue(int i, int type)
only considering one type attribute
SgExpression* coefficient(SgSymbol &s)
Finds the multiplicative coeffcient of s in the expression.
SgExpression& copy()
Returns a deep copy.
SgExpression* copyPtr()
void* deleteAttribute(int i)
SgAttribute* getAttribute(int i, int type)
SgAttribute* getAttribute(int i)
SgSymbol* getVariableRefName()
get the name refered
int id()
int isInteger()
TRUE if the expression can be reduced to an integer value.
SgExpression* IsSymbolInExpression(SgSymbol &symbol)
Returns the most nested expression containing a reference to symbol.
SgExpression* lhs()
int linearRepresentation(int *coeff, SgSymbol **symb, int *cst, int size)
SgExpression* nextInExprTable()
SgExpression* normalForm(int n, SgSymbol *s)
Does a normal form simplify as a linear combination of the symbols in s.
int numberOfAttributes()
int numberOfAttributes(int type)
of a specified type
SgExpression* operand(int i)
Valid for i = 0, 1
friend SgExpression& operator % ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator %=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator & ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator &&( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator &=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator * ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression* operator * ( SgExpression *lhs, SgExpression &rhs)
friend SgExpression& operator *=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression* operator + ( SgExpression *lhs, SgExpression &rhs)
friend SgExpression& operator + ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator +=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator - ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator / ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator /=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator < ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator <<( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator <<=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator <= ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator > ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator >= ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator >>( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator >>=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator ^=( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator | ( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& operator ||( SgExpression &lhs, SgExpression &rhs)
void replace(SgExpression & e)
void replaceSymbolByExpression(SgSymbol &symbol, SgExpression &expr)
SgExpression* rhs()
void setLhs(SgExpression &e)
void setLhs(SgExpression *e)
void setRhs(SgExpression *e)
void setRhs(SgExpression &e)
void setSymbol(SgSymbol &s)
void setSymbol(SgSymbol *s)
void setType(SgType &t)
void setType(SgType *t)
void setVariant(int v)
friend SgExpression& SgAssignOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgBitNumbOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgDDotOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgEqOp( SgExpression &lhs, SgExpression &rhs)
SgExpression(int variant)
SgExpression(int variant, SgExpression *lhs, SgExpression *rhs, SgSymbol *s, SgType *type)
SgExpression(int variant, SgExpression *lhs, SgExpression *rhs, SgSymbol *s)
SgExpression(int variant, SgExpression &lhs, SgExpression &rhs, SgSymbol &s, SgType &type)
generic expression class.
SgExpression(PTR_LLND ll)
SgExpression(int variant, char *str)
for some node in fortran
SgExpression(SgExpression &)
friend SgExpression& SgExprListOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgNeqOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgPointStOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgRecRefOp( SgExpression &lhs, SgExpression &rhs)
friend SgExpression& SgScopeOp( SgExpression &lhs, SgExpression &rhs)
void sunparse(char *buffer)
SgSymbol* symbol()
SgExpression* symbRefs()
SgType* type()
char* unparse()
void unparsestdout()
int valueInteger()
If isInteger() is true,returns the integer value the expression can be reduced to.
int valueInteger(int &result)
-1 : incorrect
int variant()
~SgExpression()

Documentation

Many statements contain expressions. Unlike the SgStatement class hierarchy, there is not a subclass for every expression operator type. Basic binary operators such as the standard arithmetic operators are identified only the integer variant returned by the SgExpression member function variant(). The expression nodes that have their own subclass do so because they have a special type of constructor or special fields. SgExpression is the base class for all the other expression classes. Every expression may have up to two operands (or subexpressions),the left hand side 'lhs()' and the right hand side 'rhs()'.Each expression has a type 'type()',may have a symbol 'symbol()',and has a unique identifier 'id()'.
SgExpression(int variant, SgExpression &lhs, SgExpression &rhs, SgSymbol &s, SgType &type)
generic expression class.

SgExpression(int variant, SgExpression *lhs, SgExpression *rhs, SgSymbol *s, SgType *type)

SgExpression(int variant, SgExpression *lhs, SgExpression *rhs, SgSymbol *s)

SgExpression(int variant, char *str)
for some node in fortran

SgExpression(int variant)

SgExpression(PTR_LLND ll)

SgExpression(SgExpression &)

~SgExpression()

SgExpression* lhs()

SgExpression* rhs()

SgExpression* operand(int i)
Valid for i = 0, 1. In Sage++ versions 1.7 and earlier i = 1, 2. Starting with Sage++ version 1.9 all arguments that play the role of indices start with zero.

int variant()

SgType* type()

SgSymbol* symbol()

int id()

SgExpression* nextInExprTable()

void setLhs(SgExpression &e)

void setLhs(SgExpression *e)

void setRhs(SgExpression &e)

void setRhs(SgExpression *e)

void setSymbol(SgSymbol &s)

void setSymbol(SgSymbol *s)

void setType(SgType &t)

void setType(SgType *t)

void setVariant(int v)

SgExpression& copy()
Returns a deep copy.

SgExpression* copyPtr()

char* unparse()

void sunparse(char *buffer)

void unparsestdout()

SgExpression* IsSymbolInExpression(SgSymbol &symbol)
Returns the most nested expression containing a reference to symbol.

void replaceSymbolByExpression(SgSymbol &symbol, SgExpression &expr)

SgSymbol* getVariableRefName()
get the name refered

SgExpression* symbRefs()

SgExpression* arrayRefs()
Returns a list of array reference in the expression.

int linearRepresentation(int *coeff, SgSymbol **symb, int *cst, int size)

SgExpression* normalForm(int n, SgSymbol *s)
Does a normal form simplify as a linear combination of the symbols in s.

SgExpression* coefficient(SgSymbol &s)
Finds the multiplicative coeffcient of s in the expression.

int isInteger()
TRUE if the expression can be reduced to an integer value.

int valueInteger()
If isInteger() is true,returns the integer value the expression can be reduced to.

int valueInteger(int &result)
-1 : incorrect

void replace(SgExpression & e)

friend SgExpression* operator + ( SgExpression *lhs, SgExpression &rhs)

friend SgExpression* operator * ( SgExpression *lhs, SgExpression &rhs)

friend SgExpression& operator + ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator - ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator * ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator / ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator % ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator <<( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator >>( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator < ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator > ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator <= ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator >= ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator & ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator | ( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator &&( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator ||( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator +=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator &=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator *=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator /=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator %=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator ^=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator <<=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& operator >>=( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgAssignOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgEqOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgNeqOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgExprListOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgRecRefOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgPointStOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgScopeOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgDDotOp( SgExpression &lhs, SgExpression &rhs)

friend SgExpression& SgBitNumbOp( SgExpression &lhs, SgExpression &rhs)

int numberOfAttributes()

int numberOfAttributes(int type)
of a specified type

void* attributeValue(int i)

int attributeType(int i)

void* attributeValue(int i, int type)
only considering one type attribute

void* deleteAttribute(int i)

void addAttribute(int type, void *a, int size)
void * can be NULL

void addAttribute(int type)
void * is NULL

void addAttribute(void *a, int size)
no type specifed

void addAttribute(SgAttribute *att)

SgAttribute* getAttribute(int i)

SgAttribute* getAttribute(int i, int type)


Direct child classes:
SgVecConstExp
SgVarRefExp
SgValueExp
SgUseRenameExp
SgUseOnlyExp
SgUnaryExp
SgTypeRefExp
SgTypeExp
SgTripletExp
SgThisExp
SgSubscriptExp
SgStructConstExp
SgStringLengthExp
SgSpecPairExp
SgSeqExp
SgRefExp
SgRecordRefExp
SgProcessorsRefExp
SgPortTypeExp
SgPointerDerefExp
SgPntrArrRefExp
SgObjectListExp
SgNewExp
SgLabelRefExp
SgKeywordValExp
SgKeywordArgExp
SgInitListExp
SgIndexOpExp
SgImpliedDoExp
SgImplicitTypeExp
SgIconExprExp
SgIOAccessExp
SgFunctionRefExp
SgFunctionCallExp
SgFuncPntrExp
SgExprListExp
SgExprIfExp
SgDistributeAttrExp
SgDeleteExp
SgDefaultExp
SgDataSubsExp
SgDataRangeExp
SgDataImpliedDoExp
SgDataEltExp
SgDataDistExp
SgControlExp
SgConstExp
SgCastExp
SgAttributeExp
SgArrayRefExp
SgAlignAttrExp

alphabetic index hierarchy of classes


Email contact: zgs@npac.syr.edu

generated by doc++