From 1f99b16ee85947d49aa33d8472ca6878a5dbef9b Mon Sep 17 00:00:00 2001 From: ccremers Date: Sun, 15 Aug 2004 17:07:38 +0000 Subject: [PATCH] - Much better implementation of M_0. --- src/arachne.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/arachne.c b/src/arachne.c index d80ded5..d60dcd6 100644 --- a/src/arachne.c +++ b/src/arachne.c @@ -688,7 +688,30 @@ bind_intruder_to_construct (const Goal goal) int bind_goal_intruder (const Goal goal) { - return (bind_intruder_to_regular (goal) && + /** + * Special case: when the intruder can bind it to the initial knowledge. + */ + Termlist tl; + int flag; + + flag = 1; + tl = knowledgeSet (sys->know); + while (flag && tl != NULL) + { + int hasvars; + Termlist substlist; + + substlist = termMguTerm (tl->term, goal.rd->message); + if (substlist != MGUFAIL) + { + // This seems to work + flag = flag && iterate (); + termlistSubstReset (substlist); + } + tl = tl->next; + } + termlistDelete (tl); + return (flag && bind_intruder_to_regular (goal) && bind_intruder_to_construct (goal)); }