Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends

wali::wpds::Rule Class Reference

List of all members.

Public Member Functions

 Rule (Config *f, Config *t, wali_key_t s2, sem_elem_t se)
 constructor
 ~Rule ()
 destructor
const Configfrom () const
wali_key_t from_state () const
wali_key_t from_stack () const
const Configto () const
wali_key_t to_state () const
wali_key_t to_stack1 () const
wali_key_t to_stack2 () const
wali_key_t stack2 () const
const sem_elem_tweight () const
sem_elem_t weight ()
void setWeight (sem_elem_t wnew)
virtual std::ostream & print (std::ostream &o) const
std::ostream & marshall (std::ostream &o) const
bool is_rule2 () const
bool operator== (Rule other) const
 TODO: fix comments operator== is needed by std::set.
bool operator< (Rule other) const
 TODO: fix comments operator< is needed by std::set.
virtual void copy (const rule_t r)
 Make a copy of the rule.

Static Public Attributes

static const std::string XMLTag
static const std::string XMLFromTag
static const std::string XMLFromStackTag
static const std::string XMLToTag
static const std::string XMLToStack1Tag
static const std::string XMLToStack2Tag
static int numRules = 0

Protected Member Functions

Configfrom ()
Configto ()

Protected Attributes

Configf
Configt
wali_key_t stk2
sem_elem_t se

Friends

class WPDS
class DebugWPDS
class ewpds::EWPDS
class fwpds::FWPDS
class RuleWitness

Detailed Description

See also:
Config
sem_elem_t
wali_key_t
ref_ptr
rcmix

Constructor & Destructor Documentation

wali::wpds::Rule::Rule ( Config f,
Config t,
wali_key_t  s2,
sem_elem_t  se 
)

constructor

References numRules.

wali::wpds::Rule::~Rule (  ) 

destructor

References numRules.


Member Function Documentation

const Config & wali::wpds::Rule::from (  )  const
Returns:
Config Rule transitions from

References f.

Referenced by from_stack(), and from_state().

wali_key_t wali::wpds::Rule::from_state (  )  const
Returns:
from state key

References from(), and wali::wpds::Config::state().

Referenced by marshall(), wali::wpds::ewpds::ERule::marshall(), and print().

wali_key_t wali::wpds::Rule::from_stack (  )  const
Returns:
from stack key

References from(), and wali::wpds::Config::stack().

Referenced by marshall(), wali::wpds::ewpds::ERule::marshall(), and print().

const Config & wali::wpds::Rule::to (  )  const
Returns:
Config Rule transitions to

References t.

Referenced by to_stack1(), and to_state().

wali_key_t wali::wpds::Rule::to_state (  )  const
Returns:
to state key

References wali::wpds::Config::state(), and to().

Referenced by marshall(), wali::wpds::ewpds::ERule::marshall(), and print().

wali_key_t wali::wpds::Rule::to_stack1 (  )  const
Returns:
to stack key 1

References wali::wpds::Config::stack(), and to().

Referenced by marshall(), wali::wpds::ewpds::ERule::marshall(), and print().

wali_key_t wali::wpds::Rule::to_stack2 (  )  const
wali_key_t wali::wpds::Rule::stack2 (  )  const
Returns:
Rule rhs second stack symbol or WALI_EPSILON if no such stack sym

References stk2.

Referenced by is_rule2(), and to_stack2().

const sem_elem_t & wali::wpds::Rule::weight (  )  const
sem_elem_t wali::wpds::Rule::weight (  ) 
Returns:
the Rule's weight

References se.

void wali::wpds::Rule::setWeight ( sem_elem_t  wnew  ) 

Sets the weight on the Rule.

Parameters:
wnew the new weight for the rule
Returns:
void

sets the weight of the Rule

References se.

std::ostream & wali::wpds::Rule::print ( std::ostream &  o  )  const [virtual]

overrides (implements) Printable::print method

Parameters:
o the std::ostream this is written to
Returns:
std::ostream passed in
See also:
Printable

Reimplemented in wali::wpds::ewpds::ERule.

References from_stack(), from_state(), wali::key2str(), stk2, to_stack1(), to_stack2(), to_state(), and weight().

std::ostream & wali::wpds::Rule::marshall ( std::ostream &  o  )  const

marshall will write a Rule to a std::ostream. This writes the rule in XML form.

Returns:
std::ostream the marshalled rule was written to.

Reimplemented in wali::wpds::ewpds::ERule.

References from_stack(), from_state(), wali::key2str(), se, to_stack1(), to_stack2(), to_state(), XMLFromStackTag, XMLFromTag, XMLTag, XMLToStack1Tag, XMLToStack2Tag, and XMLToTag.

bool wali::wpds::Rule::is_rule2 (  )  const
Returns:
true if this rule has 2 rhs stack symbols

References stack2().

bool wali::wpds::Rule::operator== ( Rule  other  )  const

TODO: fix comments operator== is needed by std::set.

References f, se, wali::wpds::Config::stack(), wali::wpds::Config::state(), stk2, and t.

bool wali::wpds::Rule::operator< ( Rule  other  )  const

TODO: fix comments operator< is needed by std::set.

References f, wali::wpds::Config::stack(), wali::wpds::Config::state(), stk2, and t.

void wali::wpds::Rule::copy ( const rule_t  r  )  [virtual]

Make a copy of the rule.

Reimplemented in wali::wpds::ewpds::ERule.

References f, wali::wpds::rule_t::is_valid(), se, stk2, and t.

Config* wali::wpds::Rule::from (  )  [protected]

References f.

Config* wali::wpds::Rule::to (  )  [protected]

References t.


Friends And Related Function Documentation

friend class WPDS [friend]
friend class DebugWPDS [friend]
friend class ewpds::EWPDS [friend]
friend class fwpds::FWPDS [friend]
friend class RuleWitness [friend]

Member Data Documentation

const std::string wali::wpds::Rule::XMLTag [static]
const std::string wali::wpds::Rule::XMLFromTag [static]
const std::string wali::wpds::Rule::XMLFromStackTag [static]
const std::string wali::wpds::Rule::XMLToTag [static]
const std::string wali::wpds::Rule::XMLToStack1Tag [static]
const std::string wali::wpds::Rule::XMLToStack2Tag [static]
int wali::wpds::Rule::numRules = 0 [static]

Keep track of the number of Rule's that have been allocated

Referenced by Rule(), and ~Rule().

Referenced by copy(), from(), operator<(), and operator==().

Referenced by copy(), operator<(), operator==(), and to().


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