- experimental=4 now disables some things. Weirdly enough, they don't

seem to make much difference.
This commit is contained in:
ccremers 2006-02-22 09:53:50 +00:00
parent dbc0a3583d
commit 921c82876d
4 changed files with 64 additions and 49 deletions

View File

@ -278,8 +278,9 @@ isKeylevelRight (Term t, const int kl)
//! Keylevel tester: can this term ever be sent at this keylevel? //! Keylevel tester: can this term ever be sent at this keylevel?
/** /**
* Depends on the keylevel lemma (TODO) and the keylevel constructors in symbol.c * Depends on the keylevel lemma (so this will not be called when those lemmas
* The idea is that certain terms will never be sent. * are disabled) and the keylevel constructors in symbol.c The idea is that
* certain terms will never be sent.
*/ */
int int
isPossiblySent (Term t) isPossiblySent (Term t)
@ -1512,25 +1513,28 @@ bind_goal (const Binding b)
} }
} }
// Keylevel lemmas: improves on the previous one if (switches.experimental & 4 == 0)
if (!isPossiblySent (b->term))
{ {
if (switches.output == PROOF) // Keylevel lemmas: improves on the previous one
if (!isPossiblySent (b->term))
{ {
eprintf if (switches.output == PROOF)
("Rejecting a term as a regular bind because key levels are off: ");
termPrint (b->term);
if (know_only)
{ {
eprintf (" [in accordance with function lemma]"); eprintf
("Rejecting a term as a regular bind because key levels are off: ");
termPrint (b->term);
if (know_only)
{
eprintf (" [in accordance with function lemma]");
}
else
{
eprintf (" [stronger than function lemma]");
}
eprintf ("\n");
} }
else know_only = 1;
{
eprintf (" [stronger than function lemma]");
}
eprintf ("\n");
} }
know_only = 1;
} }
#ifdef DEBUG #ifdef DEBUG
else else

View File

@ -108,19 +108,22 @@ prune_bounds (const System sys)
/** /**
* This should be removed once the hidelevel lemma works correctly * This should be removed once the hidelevel lemma works correctly
*/ */
if ((switches.match < 2) if (switches.experimental & 4 == 0)
&& (num_intruder_runs >
((double) switches.runs * max_encryption_level * 8)))
{ {
// Hardcoded limit on iterations if ((switches.match < 2)
if (switches.output == PROOF) && (num_intruder_runs >
((double) switches.runs * max_encryption_level * 8)))
{ {
indentPrint (); // Hardcoded limit on iterations
eprintf if (switches.output == PROOF)
("Pruned: %i intruder runs is too much. (max encr. level %i)\n", {
num_intruder_runs, max_encryption_level); indentPrint ();
eprintf
("Pruned: %i intruder runs is too much. (max encr. level %i)\n",
num_intruder_runs, max_encryption_level);
}
return 1;
} }
return 1;
} }
// Limit on exceeding any attack length // Limit on exceeding any attack length

View File

@ -242,19 +242,22 @@ prune_theorems (const System sys)
b = bl->data; b = bl->data;
// Check for "Hidden" interm goals if (switches.experimental & 4 == 0)
//!@TODO in the future, this can be subsumed by adding TERM_Hidden to the hidelevel constructs
if (termInTerm (b->term, TERM_Hidden))
{ {
// Prune the state: we can never meet this // Check for "Hidden" interm goals
if (switches.output == PROOF) //!@TODO in the future, this can be subsumed by adding TERM_Hidden to the hidelevel constructs
if (termInTerm (b->term, TERM_Hidden))
{ {
indentPrint (); // Prune the state: we can never meet this
eprintf ("Pruned because intruder can never construnct "); if (switches.output == PROOF)
termPrint (b->term); {
eprintf ("\n"); indentPrint ();
eprintf ("Pruned because intruder can never construnct ");
termPrint (b->term);
eprintf ("\n");
}
return 1;
} }
return 1;
} }
// Check for encryption levels // Check for encryption levels
@ -281,23 +284,26 @@ prune_theorems (const System sys)
} }
} }
// Check for SK-type function occurrences if (switches.experimental & 4 == 0)
//!@todo Needs a LEMMA, although this seems to be quite straightforward to prove.
// The idea is that functions are never sent as a whole, but only used in applications.
//!@TODO Subsumed by hidelevel lemma later
if (isTermFunctionName (b->term))
{ {
if (!inKnowledge (sys->know, b->term)) // Check for SK-type function occurrences
//!@todo Needs a LEMMA, although this seems to be quite straightforward to prove.
// The idea is that functions are never sent as a whole, but only used in applications.
//!@TODO Subsumed by hidelevel lemma later
if (isTermFunctionName (b->term))
{ {
// Not in initial knowledge of the intruder if (!inKnowledge (sys->know, b->term))
if (switches.output == PROOF)
{ {
indentPrint (); // Not in initial knowledge of the intruder
eprintf ("Pruned because the function "); if (switches.output == PROOF)
termPrint (b->term); {
eprintf (" is not known initially to the intruder.\n"); indentPrint ();
eprintf ("Pruned because the function ");
termPrint (b->term);
eprintf (" is not known initially to the intruder.\n");
}
return 1;
} }
return 1;
} }
} }

View File

@ -942,6 +942,8 @@ switcher (const int process, int index, int commandline)
else else
{ {
switches.experimental = integer_argument (); switches.experimental = integer_argument ();
eprintf ("Set experimental switch to %i.\n", switches.experimental);
eprintf ("And 4 mask: %i.\n", switches.experimental & 4);
return index; return index;
} }
} }