- Added '--max-depth=X' switch (which is equal to the old '-l X -a')

- Modified semantics of -l with -a : this corresponds more to the
  intuition and introduces the new option to prune proofs based on trace
  length.
This commit is contained in:
ccremers
2004-12-09 15:11:45 +00:00
parent 4f36181c3c
commit b56c01c422
4 changed files with 47 additions and 5 deletions

View File

@@ -1876,18 +1876,51 @@ prune_bounds ()
Termlist tl;
List bl;
if (proofDepth > sys->switch_maxtracelength)
/* prune for proof depth */
if (proofDepth > sys->switch_maxproofdepth)
{
// Hardcoded limit on proof tree depth
if (sys->output == PROOF)
{
indentPrint ();
eprintf ("Pruned: proof tree too deep: %i (-l %i switch)\n",
proofDepth, sys->switch_maxtracelength);
eprintf ("Pruned: proof tree too deep: %i (--max-depth %i switch)\n",
proofDepth, sys->switch_maxproofdepth);
}
return 1;
}
/* prune for trace length */
if (sys->switch_maxtracelength < INT_MAX)
{
int tracelength;
int run;
/* compute trace length of current semistate */
tracelength = 0;
run = 0;
while (run < sys->maxruns)
{
/* ignore intruder actions */
if (sys->runs[run].protocol != INTRUDER)
{
tracelength = tracelength + sys->runs[run].step;
}
run++;
}
/* test */
if (tracelength > sys->switch_maxtracelength)
{
// Hardcoded limit on proof tree depth
if (sys->output == PROOF)
{
indentPrint ();
eprintf ("Pruned: trace too long: %i (-l %i switch)\n",
tracelength, sys->switch_maxtracelength);
}
return 1;
}
}
if (num_regular_runs > sys->switchRuns)
{
// Hardcoded limit on runs