scyther/src/substitution.h

47 lines
1.4 KiB
C
Raw Normal View History

2004-04-23 11:58:43 +01:00
#ifndef SUBSTITUTIONS
#define SUBSTITUTIONS
#include "termlist.h"
2004-04-23 11:58:43 +01:00
#include "knowledge.h"
#include "system.h"
2004-04-23 11:58:43 +01:00
2006-01-02 21:06:08 +00:00
//! substitution structure
2004-04-23 11:58:43 +01:00
struct substitution
{
Term from;
Term to;
};
2006-01-02 21:06:08 +00:00
typedef struct substitution *Substitution; //!< substitution structure
2004-04-23 11:58:43 +01:00
2006-01-02 21:06:08 +00:00
//! substitution list
2004-04-23 11:58:43 +01:00
struct substitutionlist
{
Substitution subst;
struct substitutionlist *next;
};
2006-01-02 21:06:08 +00:00
typedef struct substitutionlist *Substitutionlist; //!< substitution list structure
2004-04-23 11:58:43 +01:00
Substitution makeSubstitution (Term from, Term to);
void substitutionDelete (Substitution subs);
void substitutionDestroy (Substitution subs);
Term termSubstitute (Term term, Substitution subs);
Termlist termlistSubstitute (Termlist tl, Substitution subs);
void substitutionPrint (Term t, Substitution subs);
Term termSubstituteList (Term term, Substitutionlist sl);
Substitutionlist makeSubstitutionList (Substitution subs);
Substitutionlist substitutionlistAdd (Substitutionlist sl, Term from,
Term to);
void substitutionlistDestroy (Substitutionlist sl);
void substitutionlistAnnihilate (Substitutionlist sl);
Substitutionlist substitutionlistConcat (Substitutionlist sl1,
Substitutionlist sl2);
Termlist substitutionBatch (Termlist tl, Substitutionlist sl);
Roledef substitutionRoledef (Roledef rd, Substitutionlist sl);
Knowledge substitutionKnowledge (Knowledge know, Substitutionlist sl);
void substitutionlistPrint (Substitutionlist sl);
#endif