From 013afc99aa1aac1be282b0ce38ebf03a01d56213 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 8 Jun 2005 13:51:40 +0000 Subject: [PATCH] - Fixed a newly introduced bug. When the decryptor sequence unfolding code was added (two weeks ago), bindings were changed without changing the state of the graph closure buffer. This resulted in possible missed loops: thus, reports of broken claims could be found in the output, in inconsistent states. (Reported bij Gijs Hollestelle.) Note that this only influences the current development release, and not any previous results. --- src/binding.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/binding.c b/src/binding.c index e9f4f85..5f4ca74 100644 --- a/src/binding.c +++ b/src/binding.c @@ -716,28 +716,25 @@ bindings_c_minimal () { List bl; - // Ensure a state graph - if (graph == NULL) + // Ensure a fresh state graph + goal_graph_create (); + // Recompute closure; does that work? + if (!warshall (graph, nodes)) { - goal_graph_create (); - // Recompute closure; does that work? - if (!warshall (graph, nodes)) + List l; + + globalError++; + l = sys->bindings; + while (l != NULL) { - List l; + Binding b; - globalError++; - l = sys->bindings; - while (l != NULL) - { - Binding b; - - b = (Binding) l->data; - binding_print (b); - eprintf ("\n"); - l = l->next; - } - error ("Detected a cycle when testing for c-minimality"); + b = (Binding) l->data; + binding_print (b); + eprintf ("\n"); + l = l->next; } + error ("Detected a cycle when testing for c-minimality"); } // For all goals