2004-08-15 12:55:22 +01:00
|
|
|
#ifndef BINDINGS
|
|
|
|
#define BINDINGS
|
|
|
|
|
2004-08-17 12:03:18 +01:00
|
|
|
#include "term.h"
|
2004-08-27 20:06:15 +01:00
|
|
|
#include "termmap.h"
|
2004-08-17 12:03:18 +01:00
|
|
|
#include "system.h"
|
|
|
|
|
2004-08-17 16:52:52 +01:00
|
|
|
/*
|
|
|
|
* Idea is the ev_from *has to* precede the ev_to
|
|
|
|
*/
|
|
|
|
struct binding
|
|
|
|
{
|
2004-08-18 15:06:14 +01:00
|
|
|
int done; //!< Iff true, it is bound
|
|
|
|
int child; //!< Signifies some tuple unfolding, to remove created bindings.
|
2004-08-17 16:52:52 +01:00
|
|
|
|
|
|
|
int run_from;
|
|
|
|
int ev_from;
|
|
|
|
|
|
|
|
int run_to;
|
|
|
|
int ev_to;
|
|
|
|
|
|
|
|
int *graph;
|
|
|
|
int nodes;
|
|
|
|
|
|
|
|
Term term;
|
2004-08-20 11:52:40 +01:00
|
|
|
int level;
|
2004-08-17 16:52:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct binding *Binding;
|
|
|
|
|
|
|
|
|
2004-08-15 12:55:22 +01:00
|
|
|
void bindingInit (const System mysys);
|
|
|
|
void bindingDone ();
|
|
|
|
|
2004-08-15 15:07:34 +01:00
|
|
|
int node_count ();
|
|
|
|
int node_number (int run, int ev);
|
2004-08-17 16:52:52 +01:00
|
|
|
|
|
|
|
|
2004-08-18 15:06:14 +01:00
|
|
|
int binding_print (Binding b);
|
2004-08-15 12:55:22 +01:00
|
|
|
|
2004-08-20 11:52:40 +01:00
|
|
|
void goal_add (Term term, const int run, const int ev, const int level);
|
2004-08-17 16:52:52 +01:00
|
|
|
void goal_remove_last ();
|
|
|
|
int goal_bind (const Binding b, const int run, const int ev);
|
|
|
|
void goal_unbind (const Binding b);
|
2004-08-27 20:06:15 +01:00
|
|
|
int labels_ordered (Termmap runs, Termlist labels);
|
2004-08-17 16:52:52 +01:00
|
|
|
|
|
|
|
int bindings_c_minimal ();
|
|
|
|
|
2004-08-15 12:55:22 +01:00
|
|
|
#endif
|