diff --git a/src/arachne.c b/src/arachne.c index b72bb6d..e1600b6 100644 --- a/src/arachne.c +++ b/src/arachne.c @@ -408,6 +408,15 @@ printSemiState () { int run; int open; + List bl; + + int binding_indent_print (void *data) + { + indentPrint (); + eprintf ("!! "); + binding_print (data); + return 1; + } indentPrint (); eprintf ("!! --=[ Semistate ]=--\n"); @@ -451,6 +460,12 @@ printSemiState () rd = rd->next; } } + if (sys->bindings != NULL) + { + indentPrint (); + eprintf ("!!\n"); + list_iterate (sys->bindings, binding_indent_print); + } indentPrint (); eprintf ("!!\n"); indentPrint (); diff --git a/src/binding.c b/src/binding.c index b9c9c9c..33c4166 100644 --- a/src/binding.c +++ b/src/binding.c @@ -192,6 +192,16 @@ closure_graph (Binding b) return warshall (graph, nodes); } +//! Print a binding (given a binding list pointer) +int binding_print (void *bindany) +{ + Binding b; + + b = (Binding) bindany; + eprintf ("Binding (%i,%i) --->> (%i,%i)\n", b->run_from, b->ev_from, + b->run_to, b->ev_to); + return 1; +} //! Add a binding /** diff --git a/src/binding.h b/src/binding.h index 025f03b..e99efed 100644 --- a/src/binding.h +++ b/src/binding.h @@ -8,5 +8,6 @@ int node_count (); int node_number (int run, int ev); int binding_add (int run_from, int ev_from, int run_to, int ev_to); void binding_remove_last (); +int binding_print (void *bindany); #endif