- Implemented --no-noclaims-red and --no-endgame-red

This commit is contained in:
ccremers 2004-07-19 09:44:54 +00:00
parent ee0501d82d
commit 514848a10e
4 changed files with 17 additions and 7 deletions

View File

@ -103,6 +103,8 @@ main (int argc, char **argv)
struct arg_lit *switchRS = arg_lit0 (NULL, "read-symm", "enable read symmetry reductions."); struct arg_lit *switchRS = arg_lit0 (NULL, "read-symm", "enable read symmetry reductions.");
struct arg_lit *switchAS = arg_lit0 (NULL, "no-agent-symm", "disable agent symmetry reductions."); struct arg_lit *switchAS = arg_lit0 (NULL, "no-agent-symm", "disable agent symmetry reductions.");
struct arg_lit *switchSO = arg_lit0 (NULL, "symm-order", "enable ordering symmetry reductions."); struct arg_lit *switchSO = arg_lit0 (NULL, "symm-order", "enable ordering symmetry reductions.");
struct arg_lit *switchNC = arg_lit0 (NULL, "no-noclaims-red", "disable no more claims reductions.");
struct arg_lit *switchRE = arg_lit0 (NULL, "no-endgame-red", "disable endgame reductions.");
#ifdef DEBUG #ifdef DEBUG
struct arg_int *porparam = arg_int0 (NULL, "pp", NULL, "POR parameter."); struct arg_int *porparam = arg_int0 (NULL, "pp", NULL, "POR parameter.");
struct arg_lit *switchI = arg_lit0 ("I", "debug-indent", struct arg_lit *switchI = arg_lit0 ("I", "debug-indent",
@ -131,6 +133,8 @@ main (int argc, char **argv)
switchRS, switchRS,
switchAS, switchAS,
switchSO, switchSO,
switchNC,
switchRE,
#ifdef DEBUG #ifdef DEBUG
porparam, porparam,
switchI, switchI,
@ -289,11 +293,13 @@ main (int argc, char **argv)
sys->switchReadSymm = 1; sys->switchReadSymm = 1;
} }
if (switchSO->count > 0) if (switchSO->count > 0)
/* enable symmetry order */ sys->switchSymmOrder = 1; /* enable symmetry order */
sys->switchSymmOrder = 1;
if (switchAS->count > 0) if (switchAS->count > 0)
/* disable agent symmetry order */ sys->switchAgentSymm = 0; /* disable agent symmetry order */
sys->switchAgentSymm = 0; if (switchNC->count > 0)
sys->switchNomoreClaims = 0; /* disable no more claims cutter */
if (switchRE->count > 0)
sys->switchReduceEndgame = 0; /* disable endgame cutter */
#ifdef DEBUG #ifdef DEBUG
sys->porparam = porparam->ival[0]; sys->porparam = porparam->ival[0];

View File

@ -280,7 +280,7 @@ explorify (const System sys, const int run)
* further traversal. * further traversal.
*/ */
//!@todo This implementation relies on the fact that there are only secrecy, synchr and agreement properties. //!@todo This implementation relies on the fact that there are only secrecy, synchr and agreement properties.
if (sys->secrets == NULL) if (sys->switchNomoreClaims && sys->secrets == NULL)
{ /* there are no remaining secrecy claims to be checked */ { /* there are no remaining secrecy claims to be checked */
Roledef rdscan; Roledef rdscan;
int validclaim; int validclaim;
@ -349,9 +349,9 @@ explorify (const System sys, const int run)
/* Special check 3: if after choosing, this run ends on (read|skippedclaim)*, we can remove that part already. /* Special check 3: if after choosing, this run ends on (read|skippedclaim)*, we can remove that part already.
*/ */
if (sys->switchReduceEndgame)
roleCap = removeIrrelevant (sys, run, rd); roleCap = removeIrrelevant (sys, run, rd);
/* Special check x: if all agents in each run send only encrypted stuff, and all agents are trusted, /* Special check x: if all agents in each run send only encrypted stuff, and all agents are trusted,
* there is no way for the intruder to learn anything else than encrypted terms, so secrecy claims will not * there is no way for the intruder to learn anything else than encrypted terms, so secrecy claims will not
* be violated anymore if they contain no terms that are encrypted with such keys */ * be violated anymore if they contain no terms that are encrypted with such keys */

View File

@ -68,6 +68,8 @@ systemInit ()
sys->switchReadSymm = 0; // don't force read symmetries by default sys->switchReadSymm = 0; // don't force read symmetries by default
sys->switchAgentSymm = 1; // default enable agent symmetry sys->switchAgentSymm = 1; // default enable agent symmetry
sys->switchSymmOrder = 0; // don't force symmetry order reduction by default sys->switchSymmOrder = 0; // don't force symmetry order reduction by default
sys->switchNomoreClaims = 1; // default cutter when there are no more claims
sys->switchReduceEndgame = 1; // default cutter of last events in a trace
/* set illegal traversal by default, to make sure it is set /* set illegal traversal by default, to make sure it is set
later */ later */

View File

@ -213,6 +213,8 @@ struct system
int switchReadSymm; //!< Enable read symmetry reduction int switchReadSymm; //!< Enable read symmetry reduction
int switchAgentSymm; //!< Enable agent symmetry reduction int switchAgentSymm; //!< Enable agent symmetry reduction
int switchSymmOrder; //!< Enable symmetry order reduction int switchSymmOrder; //!< Enable symmetry order reduction
int switchNomoreClaims; //!< Enable no more claims cutter
int switchReduceEndgame; //!< Enable endgame cutter
//! Latex output switch. //! Latex output switch.
/** /**