- Fixed the agentsOfRunPrint output. It was caused by the agent adding
order. - Fixed the pruning bug, which was related to this.
This commit is contained in:
parent
234edae741
commit
61457b5f3d
@ -1643,8 +1643,6 @@ prune_theorems ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the actors of all other runs are not untrusted
|
// Check if the actors of all other runs are not untrusted
|
||||||
// TODO Somehow, this does not work. Investigate.
|
|
||||||
/*
|
|
||||||
if (sys->untrusted != NULL)
|
if (sys->untrusted != NULL)
|
||||||
{
|
{
|
||||||
int run;
|
int run;
|
||||||
@ -1693,7 +1691,6 @@ prune_theorems ()
|
|||||||
run++;
|
run++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Check for c-minimality
|
// Check for c-minimality
|
||||||
if (!bindings_c_minimal ())
|
if (!bindings_c_minimal ())
|
||||||
|
58
src/system.c
58
src/system.c
@ -301,9 +301,9 @@ runPrint (Roledef rd)
|
|||||||
i = 0;
|
i = 0;
|
||||||
while (rd != NULL)
|
while (rd != NULL)
|
||||||
{
|
{
|
||||||
printf ("%i: ", i);
|
eprintf ("%i: ", i);
|
||||||
roledefPrint (rd);
|
roledefPrint (rd);
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
i++;
|
i++;
|
||||||
rd = rd->next;
|
rd = rd->next;
|
||||||
}
|
}
|
||||||
@ -316,13 +316,13 @@ runsPrint (const System sys)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
indent ();
|
indent ();
|
||||||
printf ("[ Run definitions ]\n");
|
eprintf ("[ Run definitions ]\n");
|
||||||
for (i = 0; i < (sys->maxruns); i++)
|
for (i = 0; i < (sys->maxruns); i++)
|
||||||
{
|
{
|
||||||
indent ();
|
indent ();
|
||||||
printf ("Run definition %i:\n", i);
|
eprintf ("Run definition %i:\n", i);
|
||||||
runPrint (runPointerGet (sys, i));
|
runPrint (runPointerGet (sys, i));
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,7 +678,7 @@ roleInstanceArachne (const System sys, const Protocol protocol,
|
|||||||
// Add to agent list, possibly
|
// Add to agent list, possibly
|
||||||
if (inTermlist (protocol->rolenames, oldt))
|
if (inTermlist (protocol->rolenames, oldt))
|
||||||
{
|
{
|
||||||
runs[rid].agents = termlistAdd (runs[rid].agents, newt);
|
runs[rid].agents = termlistAppend (runs[rid].agents, newt);
|
||||||
|
|
||||||
if (isTermVariable (newt))
|
if (isTermVariable (newt))
|
||||||
{
|
{
|
||||||
@ -1047,7 +1047,7 @@ indent ()
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
while (i > 0)
|
while (i > 0)
|
||||||
{
|
{
|
||||||
printf ("%i ", j);
|
eprintf ("%i ", j);
|
||||||
i--;
|
i--;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
@ -1075,26 +1075,26 @@ locVarPrint (Termlist tl)
|
|||||||
{
|
{
|
||||||
if (tl == NULL)
|
if (tl == NULL)
|
||||||
{
|
{
|
||||||
printf ("No local terms.\n");
|
eprintf ("No local terms.\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("Local terms: ");
|
eprintf ("Local terms: ");
|
||||||
printf ("[");
|
eprintf ("[");
|
||||||
while (tl != NULL)
|
while (tl != NULL)
|
||||||
{
|
{
|
||||||
termPrint (tl->term);
|
termPrint (tl->term);
|
||||||
if (tl->term->stype != NULL)
|
if (tl->term->stype != NULL)
|
||||||
{
|
{
|
||||||
printf (":");
|
eprintf (":");
|
||||||
termlistPrint (tl->term->stype);
|
termlistPrint (tl->term->stype);
|
||||||
}
|
}
|
||||||
tl = tl->next;
|
tl = tl->next;
|
||||||
if (tl != NULL)
|
if (tl != NULL)
|
||||||
printf (",");
|
eprintf (",");
|
||||||
}
|
}
|
||||||
printf ("]");
|
eprintf ("]");
|
||||||
printf ("\n");
|
eprintf ("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,11 +1106,11 @@ protocolPrint (Protocol p)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
indent ();
|
indent ();
|
||||||
printf ("[[Protocol : ");
|
eprintf ("[[Protocol : ");
|
||||||
termPrint (p->nameterm);
|
termPrint (p->nameterm);
|
||||||
printf (" (");
|
eprintf (" (");
|
||||||
termlistPrint (p->rolenames);
|
termlistPrint (p->rolenames);
|
||||||
printf (")]]\n");
|
eprintf (")]]\n");
|
||||||
locVarPrint (p->locals);
|
locVarPrint (p->locals);
|
||||||
rolesPrint (p->roles);
|
rolesPrint (p->roles);
|
||||||
}
|
}
|
||||||
@ -1188,19 +1188,27 @@ agentsOfRunPrint (const System sys, const int run)
|
|||||||
{
|
{
|
||||||
Term role = sys->runs[run].role->nameterm;
|
Term role = sys->runs[run].role->nameterm;
|
||||||
Termlist roles = sys->runs[run].protocol->rolenames;
|
Termlist roles = sys->runs[run].protocol->rolenames;
|
||||||
|
int notfirst;
|
||||||
|
|
||||||
termPrint (role);
|
termPrint (role);
|
||||||
printf ("(");
|
eprintf (":");
|
||||||
|
termPrint (agentOfRunRole (sys, run, role));
|
||||||
|
eprintf (" (");
|
||||||
|
notfirst = 0;
|
||||||
while (roles != NULL)
|
while (roles != NULL)
|
||||||
{
|
{
|
||||||
termPrint (agentOfRunRole (sys, run, roles->term));
|
if (!isTermEqual (role, roles->term))
|
||||||
roles = roles->next;
|
|
||||||
if (roles != NULL)
|
|
||||||
{
|
{
|
||||||
printf (",");
|
if (notfirst)
|
||||||
|
eprintf (", ");
|
||||||
|
termPrint (roles->term);
|
||||||
|
eprintf (":");
|
||||||
|
termPrint (agentOfRunRole (sys, run, roles->term));
|
||||||
|
notfirst = 1;
|
||||||
}
|
}
|
||||||
|
roles = roles->next;
|
||||||
}
|
}
|
||||||
printf (")");
|
eprintf (")");
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Explain a violated claim at point i in the trace.
|
//! Explain a violated claim at point i in the trace.
|
||||||
@ -1208,7 +1216,7 @@ agentsOfRunPrint (const System sys, const int run)
|
|||||||
void
|
void
|
||||||
violatedClaimPrint (const System sys, const int i)
|
violatedClaimPrint (const System sys, const int i)
|
||||||
{
|
{
|
||||||
printf ("Claim stuk");
|
eprintf ("Claim stuk");
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Yield the real length of an attack.
|
//! Yield the real length of an attack.
|
||||||
@ -1321,7 +1329,7 @@ scenarioPrint (const System sys)
|
|||||||
runInstancePrint (sys, run);
|
runInstancePrint (sys, run);
|
||||||
if (run < sys->maxruns - 1)
|
if (run < sys->maxruns - 1)
|
||||||
{
|
{
|
||||||
printf ("\t");
|
eprintf ("\t");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user