- Added '--extravert' switch, which avoids initiator Alice to talk to

Alice.
This commit is contained in:
ccremers
2005-11-29 09:15:16 +00:00
parent 8b736ede0e
commit 6543a8f659
3 changed files with 62 additions and 0 deletions

View File

@@ -2888,6 +2888,50 @@ prune_theorems ()
run++;
}
// Prune if any initiator run talks to itself
/**
* This effectively disallows Alice from talking to Alice, for all
* initiators. We still allow it for responder runs, because we assume the
* responder is not checking this.
*/
if (switches.extravert)
{
int run;
run = 0;
while (run < sys->maxruns)
{
// Check this run only if it is an initiator role
if (sys->runs[run].role->initiator)
{
// Check this initiator run
Termlist tl;
tl = sys->runs[run].agents;
while (tl != NULL)
{
Termlist tlscan;
tlscan = tl->next;
while (tlscan != NULL)
{
if (isTermEqual (tl->term, tlscan->term))
{
// XXX TODO
// Still need to fix proof output for this
//
// Pruning because some agents are equal for this role.
return 1;
}
tlscan = tlscan->next;
}
tl = tl->next;
}
run++;
}
}
}
// Prune wrong agents type for initators
if (!initiatorAgentsType ())
{