2007-06-11 13:01:04 +01:00
/*
* Scyther : An automatic verifier for security protocols .
* Copyright ( C ) 2007 Cas Cremers
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
*/
2005-04-10 16:30:47 +01:00
# ifndef SWITCHES
# define SWITCHES
2005-06-07 16:02:27 +01:00
# include "term.h"
# include "system.h"
void switchesInit ( ) ;
void switchesDone ( ) ;
//! Command-line switches structure
struct switchdata
{
// Command-line
int argc ;
char * * argv ;
// Methods
int match ; //!< Matching type.
2005-08-12 13:59:25 +01:00
int tupling ; //!< Tupling is by default 0: right-associative, optionally 1: left-associative.
2005-06-07 16:02:27 +01:00
// Pruning and Bounding
int prune ; //!< Type of pruning.
int maxproofdepth ; //!< Maximum proof depth
int maxtracelength ; //!< Maximum trace length allowed
int runs ; //!< The number of runs as in the switch
2006-08-08 13:30:29 +01:00
char * filterProtocol ; //!< Which claim should be checked?
char * filterLabel ; //!< Which claim should be checked?
2005-08-15 13:49:32 +01:00
int maxAttacks ; //!< When not 0, maximum number of attacks
2007-01-26 15:31:49 +00:00
int maxOfRole ; //!< When not 0, maximum number of instances of each unique (non intruder) role
2005-06-07 16:02:27 +01:00
// Arachne
2006-02-23 15:03:43 +00:00
int heuristic ; //!< Goal selection method for Arachne engine
2005-08-21 22:38:32 +01:00
int maxIntruderActions ; //!< Maximum number of intruder actions in the semitrace (encrypt/decrypt)
2005-10-08 20:54:30 +01:00
int agentTypecheck ; //!< Check type of agent variables in all matching modes
2005-11-12 21:13:00 +00:00
int concrete ; //!< Swap out variables at the end.
2006-03-31 09:24:41 +01:00
int initUnique ; //!< Default allows duplicate terms in rho (init)
int respUnique ; //!< Default allows duplicate terms in rho (resp)
2011-04-01 14:24:14 +01:00
int roleUnique ; //!< Default allows agents to perform multiple roles
2005-12-21 19:02:41 +00:00
int intruder ; //!< Enable intruder actions (default)
2011-01-18 16:03:20 +00:00
int chosenName ; //!< Check for chosen name attacks
2007-05-03 12:40:58 +01:00
int agentUnfold ; //!< Explicitly unfold for N honest agents and 1 compromised iff > 0
int abstractionMethod ; //!< 0 means none, others are specific modes
int useAttackBuffer ; //!< Use temporary file for attack storage
2005-06-07 16:02:27 +01:00
// Misc
int switchP ; //!< A multi-purpose integer parameter, passed to the partial order reduction method selected.
2005-10-07 14:09:07 +01:00
int experimental ; //!< Experimental stuff goes here until it moves into main stuff.
2005-12-27 13:53:49 +00:00
int removeclaims ; //!< Remove any claims in the spdl file
2005-12-28 11:50:17 +00:00
int addreachableclaim ; //!< Adds 'reachable' claims to each role
int addallclaims ; //!< Adds all sorts of claims to the roles
2005-12-29 12:52:51 +00:00
int check ; //!< Check protocol correctness
2006-02-22 08:41:06 +00:00
int expert ; //!< Expert mode
2005-06-07 16:02:27 +01:00
// Output
int output ; //!< From enum outputs: what should be produced. Default ATTACK.
int report ;
int reportClaims ; //!< Enable claims report
int xml ; //!< xml output
2006-08-01 08:31:40 +01:00
int dot ; //!< dot output
2005-06-07 16:02:27 +01:00
int human ; //!< human readable
int reportMemory ; //!< Memory display switch.
int reportTime ; //!< Time display switch.
2006-02-22 08:24:29 +00:00
int countStates ; //!< Count states
2005-06-21 12:04:34 +01:00
int extendNonReads ; //!< Show further events in arachne xml output.
2005-08-12 13:13:50 +01:00
int extendTrivial ; //!< Show further events in arachne xml output, based on knowledge underapproximation. (Includes at least the events of the nonreads extension)
2006-05-25 21:35:01 +01:00
int plain ; //!< Disable color output on terminal
int monochrome ; //!< Disable colors in dot output
2006-05-26 13:57:27 +01:00
int lightness ; //!< Lightness increment 0-100
2008-06-16 17:57:28 +01:00
int clusters ; //!< Enable clusters in output
int exitCodes ; //!< Enable verbose exit codes
2005-06-07 16:02:27 +01:00
} ;
2006-01-02 21:06:08 +00:00
extern struct switchdata switches ; //!< pointer to switchdata structure
2005-04-10 16:30:47 +01:00
2006-04-12 13:42:04 +01:00
FILE * openFileSearch ( char * filename , FILE * reopener ) ;
2005-04-10 16:30:47 +01:00
# endif