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

Analysis rule annotation. More...

#include <rule.h>

Inheritance diagram for ruleAnn:
Collaboration diagram for ruleAnn:

Public Member Functions

 ruleAnn (exprAnn *condition, exprann_list *effects, int line)
 Create a new rule. More...
 
bool has_condition () const
 Return true if has condition. More...
 
exprAnncondition () const
 Return the condition. More...
 
bool is_condition_true () const
 Test the condition. More...
 
void lookup (propertyAnn *default_property, procedureAnn *procedure, Annotations *annotations)
 Compute the next state. More...
 
- Public Member Functions inherited from Ann
 Ann (int line)
 
int line () const
 

Private Attributes

exprAnn_condition
 Rule condition. More...
 
bool _is_condition_true
 Condition state. More...
 
exprann_list _effects
 Rule effects. More...
 

Detailed Description

Analysis rule annotation.

Definition at line 14 of file rule.h.

Constructor & Destructor Documentation

ruleAnn::ruleAnn ( exprAnn condition,
exprann_list effects,
int  line 
)

Create a new rule.

Member Function Documentation

bool ruleAnn::has_condition ( ) const
inline

Return true if has condition.

Definition at line 47 of file rule.h.

References _condition.

exprAnn* ruleAnn::condition ( ) const
inline

Return the condition.

Definition at line 51 of file rule.h.

References _condition.

bool ruleAnn::is_condition_true ( ) const
inline

Test the condition.

Test each condition. Special case: a rule without a condition is automatically true. Return the result of the test

Definition at line 65 of file rule.h.

References _is_condition_true.

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

Compute the next state.

When the condition is true, go through the effects and compute the next state for each. Apply next state

Use the states computed by compute_next() to update the variables. Return true if any of them result in changes, meaning that the analysis problem has not converged. Look up

Member Data Documentation

exprAnn* ruleAnn::_condition
private

Rule condition.

The rule condition will be null, for an unconditional rule.

Definition at line 22 of file rule.h.

Referenced by condition(), and has_condition().

bool ruleAnn::_is_condition_true
private

Condition state.

True if the condition is true

Definition at line 28 of file rule.h.

Referenced by is_condition_true().

exprann_list ruleAnn::_effects
private

Rule effects.

These are all "Assign" expressions that define the consequences of the rule firing.

Definition at line 35 of file rule.h.


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