[SLP-Homepage]
[Source Modules]
[Manual]
[Run]
[Examples]
List of Terms in an Input Formula
This module defines a class tlist_c.
The objects of this class correspond to lists of terms
in an input formula
(actually, each object is a pair of head and tail,
where tail is a reference to another tlist_c-object).
The term lists are used as argument lists of atomic formulas (literals).
Construction:
- tlist_c:
-
tlist_c(term_t head)
;
This method creates a new list of terms
out of a given element.
This will be the head of the list,
the tail will be empty (NIL).
Object Methods:
- head:
-
term_t head(void) const
;
This method returns the first term in the list.
- tail:
-
tlist_c* tail(void) const
;
This method returns the rest of the list
(all terms except the first one).
- append:
-
void append(tlist_c* tail)
;
This method sets the tail of the list to the given value.
It can only be called if this list consists currently
of only one element
(i.e. has no tail).
- print:
-
void print(void) const
;
This method prints the lists of terms (separated by commas).
Implementation:
Stefan Brass
(sbrass@sis.pitt.edu),
September 27, 2001.
[HTML 3.2 Checked]