ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
enumPropertyExprAnn Class Reference

Property test expression. More...

#include <broadway_expr.h>

Inheritance diagram for enumPropertyExprAnn:
Collaboration diagram for enumPropertyExprAnn:

Public Member Functions

virtual ~enumPropertyExprAnn ()
 
 enumPropertyExprAnn (Broadway::FlowSensitivity flow_sensitivity, const parserID *property, const parserID *lhs, Broadway::Operator op, const parserID *rhs, int line)
 
bool rhs_is_property_value () const
 Is RHS a property value? More...
 
virtual void lookup (propertyAnn *default_property, procedureAnn *procedure, Annotations *annotations)
 Test method. More...
 
virtual void print (std::ostream &out)
 Report method. More...
 
bool is_weak () const
 
void set_weak ()
 
- Public Member Functions inherited from exprAnn
 exprAnn (Broadway::Operator op, int line)
 Create a new expression. More...
 
Broadway::Operator op () const
 Operator. More...
 
- Public Member Functions inherited from Ann
 Ann (int line)
 
int line () const
 

Private Attributes

Broadway::FlowSensitivity _flow_sensitivity
 Flow sensitivity. More...
 
std::string _property_name
 Property name. More...
 
enumPropertyAnn_property
 Property pointer. More...
 
std::string _lhs_name
 Left-hand identifier. More...
 
REF annVariable_lhs
 Left-hand variable. More...
 
enumvalue_set _lhs_value
 Left-hand value. More...
 
std::string _rhs_name
 Right-hand identifier. More...
 
bool _rhs_is_property_value
 Right-hand is property value. More...
 
REF annVariable_rhs
 Right-hand variable. More...
 
enumvalue_set _rhs_value
 Right-hand property. More...
 
bool _rhs_lost_information
 Right-hand lost information. More...
 
enumvalue_set _rhs_ever_values
 Complicit property blocks. More...
 
bool _is_weak
 Weak assignment. More...
 

Detailed Description

Property test expression.

Definition at line 168 of file broadway_expr.h.

Constructor & Destructor Documentation

virtual enumPropertyExprAnn::~enumPropertyExprAnn ( )
inlinevirtual

Definition at line 276 of file broadway_expr.h.

enumPropertyExprAnn::enumPropertyExprAnn ( Broadway::FlowSensitivity  flow_sensitivity,
const parserID property,
const parserID lhs,
Broadway::Operator  op,
const parserID rhs,
int  line 
)

Member Function Documentation

bool enumPropertyExprAnn::rhs_is_property_value ( ) const
inline

Is RHS a property value?

Return true if the right-hand side of the operation is a specific property value.

Definition at line 290 of file broadway_expr.h.

References _rhs_is_property_value.

virtual void enumPropertyExprAnn::lookup ( propertyAnn default_property,
procedureAnn procedure,
Annotations annotations 
)
virtual

Test method.

Use this to test a conditional expression. The calling context determines the "now" values of the various properties. Compute the next state

When a test returns true, analysis rules invoke this method for each action. The method determines what the new flowvalue will be once the action is invoked. Apply the next state

After computing the next state, actually apply it to the analysis information. Record any changes. Lookup method

Once a procedure annotation is complete and all the variables have been created, we call this routine to lookup the variables referenced in the expressions.

Implements exprAnn.

virtual void enumPropertyExprAnn::print ( std::ostream &  out)
virtual

Report method.

Interpret the expression as an informational query (for the report annotations). Write the result out to the given stream. Print method

Display the expression using the annotation syntax.

Implements exprAnn.

bool enumPropertyExprAnn::is_weak ( ) const
inline

Definition at line 317 of file broadway_expr.h.

References _is_weak.

void enumPropertyExprAnn::set_weak ( )
inline

Definition at line 318 of file broadway_expr.h.

References _is_weak.

Member Data Documentation

Broadway::FlowSensitivity enumPropertyExprAnn::_flow_sensitivity
private

Flow sensitivity.

Definition at line 174 of file broadway_expr.h.

std::string enumPropertyExprAnn::_property_name
private

Property name.

The name of the property to test

Definition at line 180 of file broadway_expr.h.

enumPropertyAnn* enumPropertyExprAnn::_property
private

Property pointer.

A pointer to the property definition

Definition at line 186 of file broadway_expr.h.

std::string enumPropertyExprAnn::_lhs_name
private

Left-hand identifier.

The identifier on the left-hand side

Definition at line 192 of file broadway_expr.h.

REF annVariable* enumPropertyExprAnn::_lhs
private

Left-hand variable.

A pointer to the actual left-hand side variable

Definition at line 198 of file broadway_expr.h.

enumvalue_set enumPropertyExprAnn::_lhs_value
private

Left-hand value.

A place-holder for the associated left-hand property value

Definition at line 204 of file broadway_expr.h.

std::string enumPropertyExprAnn::_rhs_name
private

Right-hand identifier.

The identifier on the right-hand side

Definition at line 210 of file broadway_expr.h.

bool enumPropertyExprAnn::_rhs_is_property_value
private

Right-hand is property value.

True if the right-hand side of the expression is just the name of a particular property value, as opposed to the name of a variable.

Definition at line 217 of file broadway_expr.h.

Referenced by rhs_is_property_value().

REF annVariable* enumPropertyExprAnn::_rhs
private

Right-hand variable.

A pointer to the actual right-hand side variable This pointer should be null if the right hand side is just a property value

Definition at line 224 of file broadway_expr.h.

enumvalue_set enumPropertyExprAnn::_rhs_value
private

Right-hand property.

A place-holder for the associated right-hand property value. if the right hand side is just a property value, then this will be permanently set to point to that value.

Definition at line 232 of file broadway_expr.h.

bool enumPropertyExprAnn::_rhs_lost_information
private

Right-hand lost information.

When constructing the right-hand-side value from a variable, record if constructing the now value caused information loss.

Definition at line 243 of file broadway_expr.h.

enumvalue_set enumPropertyExprAnn::_rhs_ever_values
private

Complicit property blocks.

When running in adaptive mode, this records any objects on the right-hand-side that already have multiple possible values – these are "complicit" in any loss of accuracy. Right-hand ever values

We pass on the ever values without meeting them together. This field holds those values from the right-hand side.

Definition at line 260 of file broadway_expr.h.

bool enumPropertyExprAnn::_is_weak
private

Weak assignment.

Some annotations need to force weak updates. For example, strcat() just adds the properties of the new string to the old string.

Definition at line 267 of file broadway_expr.h.

Referenced by is_weak(), and set_weak().


The documentation for this class was generated from the following file: