2004-04-23 11:58:43 +01:00
|
|
|
#ifndef TERMLISTS
|
|
|
|
#define TERMLISTS
|
|
|
|
|
|
|
|
#include "terms.h"
|
|
|
|
|
2004-05-15 13:33:01 +01:00
|
|
|
//! The list container for the term type.
|
|
|
|
/**
|
|
|
|
* Implemented as a double linked list to allow for element deletion.
|
|
|
|
*\sa term
|
|
|
|
*/
|
2004-04-23 11:58:43 +01:00
|
|
|
struct termlist
|
|
|
|
{
|
2004-05-15 13:33:01 +01:00
|
|
|
//! The term element for this node.
|
2004-04-23 11:58:43 +01:00
|
|
|
Term term;
|
2004-05-15 13:33:01 +01:00
|
|
|
//! Next node pointer or NULL for the tail of the list.
|
2004-04-23 11:58:43 +01:00
|
|
|
struct termlist *next;
|
2004-05-15 13:33:01 +01:00
|
|
|
//! Previous node pointer or NULL for the head of the list.
|
2004-04-23 11:58:43 +01:00
|
|
|
struct termlist *prev;
|
|
|
|
};
|
|
|
|
|
2004-05-15 13:33:01 +01:00
|
|
|
//! Shorthand for termlist pointers.
|
2004-04-23 11:58:43 +01:00
|
|
|
typedef struct termlist *Termlist;
|
|
|
|
|
|
|
|
void termlistsInit (void);
|
|
|
|
void termlistsDone (void);
|
|
|
|
Termlist termlistDuplicate (Termlist tl);
|
|
|
|
Termlist termlistShallow (Termlist tl);
|
|
|
|
void termlistDelete (Termlist tl);
|
|
|
|
void termlistDestroy (Termlist tl);
|
|
|
|
void termlistPrint (Termlist tl);
|
2004-07-20 10:47:06 +01:00
|
|
|
__inline__ int inTermlist (Termlist tl, const Term term);
|
2004-04-23 11:58:43 +01:00
|
|
|
int isTermlistEqual (Termlist tl1, Termlist tl2);
|
|
|
|
Termlist termlistAdd (Termlist tl, Term term);
|
|
|
|
Termlist termlistAppend (const Termlist tl, const Term term);
|
|
|
|
Termlist termlistConcat (Termlist tl1, Termlist tl2);
|
|
|
|
Termlist termlistDelTerm (Termlist tl);
|
|
|
|
Termlist termlistConjunct (Termlist tl1, Termlist tl2);
|
|
|
|
Termlist termlistConjunctType (Termlist tl1, Termlist tl2, int termtype);
|
|
|
|
Termlist termlistType (Termlist tl, int termtype);
|
|
|
|
Termlist termlistAddVariables (Termlist tl, Term t);
|
|
|
|
Termlist termlistAddRealVariables (Termlist tl, Term t);
|
|
|
|
Termlist termlistAddBasic (Termlist tl, Term t);
|
|
|
|
Termlist termlistAddBasics (Termlist tl, Termlist scan);
|
|
|
|
Termlist termlistMinusTerm (Termlist tl, Term t);
|
|
|
|
int termlistLength (Termlist tl);
|
|
|
|
Term inverseKey (Termlist inverses, Term key);
|
|
|
|
Term termLocal (const Term t, Termlist fromlist, Termlist tolist,
|
|
|
|
const Termlist locals, const int runid);
|
|
|
|
Termlist termlistLocal (Termlist tl, const Termlist fromlist,
|
|
|
|
const Termlist tolist, const Termlist locals,
|
|
|
|
const int runid);
|
|
|
|
int termlistContained (const Termlist tlbig, Termlist tlsmall);
|
|
|
|
int validSubst (const int matchmode, const Term term);
|
|
|
|
Term termFunction (Termlist fromlist, Termlist tolist, Term tx);
|
|
|
|
Termlist termlistForward (Termlist tl);
|
2004-07-14 09:17:49 +01:00
|
|
|
int termlistOrder (Termlist tl1, Termlist tl2);
|
2004-04-23 11:58:43 +01:00
|
|
|
|
|
|
|
#endif
|