Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

c_rule Struct Reference

#include <parser-structs.h>

Inheritance diagram for c_rule:

Inheritance graph
[legend]
Collaboration diagram for c_rule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 c_rule ()
 ~c_rule ()
void deep_delete ()
void deep_copy (c_rule *copy, bool reindex=false) const
void project_constraint () const
void get_variables (set< string > &vars) const

Public Attributes

c_termhead
vector< c_term * > body
con_type constraint

Static Public Attributes

int count = 0
int global_variable_index = 0

Detailed Description

This class represents a CLP rule, holding a head, an associated constraint and zero or more body literals.


Constructor & Destructor Documentation

c_rule::c_rule  ) 
 

Default constructor. Creates a head.

c_rule::~c_rule  ) 
 

Destructor.


Member Function Documentation

void c_rule::deep_copy c_rule copy,
bool  reindex = false
const
 

Copy this c_rule recursively into another c_rule.

Parameters:
copy allocated memory area for another rule.
reindex should variables be reindexed?

void c_rule::deep_delete  )  [virtual]
 

Calls delete on the head and body recursively. Note that this should NOT be done when the rule contains term that wasn't created using deep_copy during safety mode off.

Implements c_base.

void c_rule::get_variables set< string > &  vars  )  const
 

Inserts the variables names used in this rule into the supplied set of strings.

void c_rule::project_constraint  )  const
 

Project the constraint in this rule to the variables used somewhere in the rule.


Member Data Documentation

vector<c_term*> c_rule::body
 

The body literals of this rule (none if it is an answer). All of these literals are of type T_FUNCTOR.

con_type c_rule::constraint [mutable]
 

The constraint of this rule.

int c_rule::count = 0 [static]
 

The number of c_rule instances allocated and not destroyed.

int c_rule::global_variable_index = 0 [static]
 

The index for variables in a new rule instance, increased by 1 for every rule instance.

c_term* c_rule::head
 

The head of this rule, is of type T_FUNCTOR and isn't negated.


The documentation for this struct was generated from the following files:
Generated on Wed Feb 16 20:54:21 2005 for Fixpoint Engine by  doxygen 1.3.9.1