- Fixed bug in new --max-attacks semantics.
This commit is contained in:
parent
e28c494a18
commit
d8414daf95
@ -45,10 +45,10 @@ prune_bounds (const System sys)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* prune for number of attacks */
|
||||
/* prune for number of attacks if we are actually outputting them */
|
||||
if (enoughAttacks (sys))
|
||||
{
|
||||
// Oh no, we ran out of time!
|
||||
// Oh no, we ran out of possible attacks!
|
||||
if (switches.output == PROOF)
|
||||
{
|
||||
indentPrint ();
|
||||
|
@ -762,6 +762,13 @@ switcher (const int process, int index, int commandline)
|
||||
{
|
||||
/* not very important
|
||||
helptext (" --prune=<int>", "pruning method when an attack is found [2]");
|
||||
|
||||
Semantics:
|
||||
0 - Show all attacks (up to the maximum)
|
||||
1 - Show first attack
|
||||
2 - Show 'best' attack (use heuristics)
|
||||
|
||||
Thus, a value of '0' means multiple attacks are output, otherwise just one.
|
||||
*/
|
||||
}
|
||||
else
|
||||
@ -1179,14 +1186,14 @@ switcher (const int process, int index, int commandline)
|
||||
printf ("'%s' model checker for security protocols.\n", progname);
|
||||
printf ("Version %s.\n", RELEASEVERSION);
|
||||
if (switches.expert)
|
||||
{
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf ("Revision %s, compiled with debugging support.\n",
|
||||
SVNVERSION);
|
||||
printf ("Revision %s, compiled with debugging support.\n",
|
||||
SVNVERSION);
|
||||
#else
|
||||
printf ("Revision %s\n", SVNVERSION);
|
||||
printf ("Revision %s\n", SVNVERSION);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
printf ("Code by Cas Cremers\n");
|
||||
exit (0);
|
||||
}
|
||||
|
10
src/system.c
10
src/system.c
@ -1202,11 +1202,15 @@ scenarioPrint (const System sys)
|
||||
int
|
||||
enoughAttacks (const System sys)
|
||||
{
|
||||
if (switches.maxAttacks != 0)
|
||||
// Only if we are outputting more than one
|
||||
if (switches.prune == 0)
|
||||
{
|
||||
if (sys->attackid >= switches.maxAttacks)
|
||||
if (switches.maxAttacks != 0)
|
||||
{
|
||||
return 1;
|
||||
if (sys->attackid >= switches.maxAttacks)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user