- Removed old hack lemmas by clean ones.

This commit is contained in:
ccremers 2006-02-28 15:01:58 +00:00
parent 282c0d5094
commit f3d94b8e0d
3 changed files with 30 additions and 13 deletions

View File

@ -1615,7 +1615,7 @@ bind_goal_all_options (const Binding b)
{ {
int know_only; int know_only;
know_only = 0; know_only = false;
if (1 == 0) // blocked for now if (1 == 0) // blocked for now
{ {
@ -1640,12 +1640,12 @@ bind_goal_all_options (const Binding b)
eprintf eprintf
(" is never sent from a regular run, so we only intruder construct it.\n"); (" is never sent from a regular run, so we only intruder construct it.\n");
} }
know_only = 1; know_only = true;
} }
} }
} }
if (switches.experimental & 4) if (switches.experimental & 16)
{ {
// Keylevel lemmas: improves on the previous one // Keylevel lemmas: improves on the previous one
if (!isPossiblySent (b->term)) if (!isPossiblySent (b->term))
@ -1665,21 +1665,33 @@ bind_goal_all_options (const Binding b)
} }
eprintf ("\n"); eprintf ("\n");
} }
know_only = 1; know_only = true;
} }
} }
#ifdef DEBUG
else if (!(switches.experimental & 32))
{ {
if (DEBUGL (5) && know_only == 1) /**
* Note: this is slightly weaker than the previous & 16,
* but it actually differs in such minimal cases that it
* might be better to simply have the (much cleaner)
* keylevel lemma.
*
* That's why this is default and the other isn't.
*/
// Hidelevel variant
int hlf;
hlf = hidelevelFlag (sys, b->term);
if (hlf == HLFLAG_NONE || hlf == HLFLAG_KNOW)
{ {
eprintf know_only = true;
("Keylevel lemma is weaker than function lemma for term ");
termPrint (b->term);
eprintf ("\n");
} }
} }
#endif
// Allright, proceed
proofDepth++; proofDepth++;
if (know_only) if (know_only)

View File

@ -9,6 +9,8 @@
#include "system.h" #include "system.h"
#include "memory.h" #include "memory.h"
extern Term TERM_Hidden;
//! hide level within protocol //! hide level within protocol
unsigned int unsigned int
protocolHidelevel (const System sys, const Term t) protocolHidelevel (const System sys, const Term t)
@ -81,6 +83,9 @@ hidelevelCompute (const System sys)
sys->hidden = NULL; sys->hidden = NULL;
tl = sys->globalconstants; tl = sys->globalconstants;
// Add 'hidden' terms
tl = termlistAdd (tl, TERM_Hidden);
#ifdef DEBUG #ifdef DEBUG
if (DEBUGL (4)) if (DEBUGL (4))
{ {

View File

@ -108,7 +108,7 @@ 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.experimental & 4) if (switches.experimental & 1)
{ {
if ((switches.match < 2) if ((switches.match < 2)
&& (num_intruder_runs > && (num_intruder_runs >