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

c_term Class Reference

#include <parser-classes.hpp>

Inheritance diagram for c_term:

Inheritance graph
[legend]
Collaboration diagram for c_term:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 c_term ()
 ~c_term ()
virtual void deep_delete ()
void deep_copy (c_term *copy, bool reindex=false) const
void get_variables (std::set< std::string > &vars) const
void insert_list (const std::vector< c_term * > &list, const c_term *rest=0, const size_t start_index=0)
void sort_before (const c_term *t) const
void sort_same (const c_term *t) const

Public Attributes

std::string name
std::vector< c_term * > arglist
bool negated
c_termlist_head
c_termlist_tail
bool list_empty
bool match_rest
int type
std::map< const c_term *,
int > 
sorted_terms

Static Public Attributes

int count = 0

Detailed Description

A many-purpose element in the final result. It represents a functor (head or body literal), a variable or a list depending on which member variables are used.


Constructor & Destructor Documentation

c_term::c_term  ) 
 

Default constructor.

c_term::~c_term  ) 
 

Destructor.


Member Function Documentation

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

Copy this c_term recursively into another c_term.

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

void c_term::deep_delete  )  [virtual]
 

Calls delete on all subterms recursively. Note that this should NOT be done on a term that wasn't created using deep_copy during safety mode off.

Implements c_base.

void c_term::get_variables std::set< std::string > &  vars  )  const
 

Inserts the variables of this term into a supplied set.

Parameters:
vars the set of variable names.

void c_term::insert_list const std::vector< c_term * > &  list,
const c_term rest = 0,
const size_t  start_index = 0
 

Inserts the given list, starting at the given index, at this position (only applicable in case this c_term is a list).

Parameters:
list all elements in the list to insert.
rest additional element to insert at the end (in case of a non-null-terminated list).
start_index the index to start looking up elements in the supplied list.

void c_term::sort_before const c_term t  )  const
 

Mark this term as sorted before another term.

Parameters:
t the other term.

void c_term::sort_same const c_term t  )  const
 

Mark this term as sorted at the same place as another term.

Parameters:
t the other term.


Member Data Documentation

std::vector<c_term*> c_term::arglist
 

The arguments in case of a functor.

int c_term::count = 0 [static]
 

The number of c_* instances allocated and not destroyed.

bool c_term::list_empty
 

Is this an empty list?

c_term* c_term::list_head
 

Head of the list in case of a list, 0 otherwise.

c_term* c_term::list_tail
 

Tail of the list in case of a list, 0 otherwise.

bool c_term::match_rest
 

This term was given after a pipe in a list and therefore matches the rest of any list

std::string c_term::name
 

The name in case of a functor or variable.

bool c_term::negated
 

Is this a negated functor?

std::map<const c_term*, int> c_term::sorted_terms [mutable]
 

Cached orderings between this term and others.

int c_term::type
 

The type of this term. (T_VARIABLE, T_FUNCTOR or T_LIST)


The documentation for this class was generated from the following files:
Generated on Mon Mar 21 00:08:21 2005 for Fixpoint Engine by  doxygen 1.3.9.1