From e82ce8b96215365aaead6435a38b8243ae08bd79 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 21 Dec 2005 19:02:41 +0000 Subject: [PATCH] - Added --no-intruder switch, but it is currently broken. --- src/arachne.c | 4 ++-- src/switches.c | 17 +++++++++++++++++ src/switches.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/arachne.c b/src/arachne.c index bd6f713..dd9fb68 100644 --- a/src/arachne.c +++ b/src/arachne.c @@ -3203,10 +3203,10 @@ prune_bounds () return 1; // Limit on intruder events count - if (switches.maxIntruderActions < INT_MAX) + if (switches.maxIntruderActions < INT_MAX || !(switches.intruder)) { // Only check if actually used - if (countIntruderActions () > switches.maxIntruderActions) + if (!(switches.intruder) || countIntruderActions () > switches.maxIntruderActions) { if (switches.output == PROOF) { diff --git a/src/switches.c b/src/switches.c index 770bfde..0e56f6c 100644 --- a/src/switches.c +++ b/src/switches.c @@ -69,6 +69,7 @@ switchesInit (int argc, char **argv) switches.agentTypecheck = 1; // default do check agent types switches.concrete = true; // default removes symbols, and makes traces concrete switches.extravert = false; // default allows also initiator Alice to talk to Alice + switches.intruder = true; // default allows an intruder // Misc switches.switchP = 0; // multi-purpose parameter @@ -561,6 +562,22 @@ switcher (const int process, int index) } } + if (detect (' ', "no-intruder", 0)) + { + if (!process) + { + /* for testing purposes: hide + * + * Disables the intruder + */ + } + else + { + switches.intruder = false; + return index; + } + } + if (detect (' ', "extravert", 0)) { if (!process) diff --git a/src/switches.h b/src/switches.h index be39cc3..6f04377 100644 --- a/src/switches.h +++ b/src/switches.h @@ -48,6 +48,7 @@ struct switchdata int agentTypecheck; //!< Check type of agent variables in all matching modes int concrete; //!< Swap out variables at the end. int extravert; //!< Disallow Alice talking to Alice + int intruder; //!< Enable intruder actions (default) // Misc int switchP; //!< A multi-purpose integer parameter, passed to the partial order reduction method selected.