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.
|
|
|
|
*/
|
|
|
|
|
2004-04-23 11:58:43 +01:00
|
|
|
#ifndef COMPILER
|
|
|
|
#define COMPILER
|
|
|
|
|
2004-08-12 13:28:57 +01:00
|
|
|
#include "tac.h"
|
|
|
|
#include "role.h"
|
|
|
|
#include "system.h"
|
|
|
|
|
2004-08-09 10:42:58 +01:00
|
|
|
void compilerInit (const System sys);
|
|
|
|
void compilerDone (void);
|
|
|
|
|
|
|
|
void compile (Tac tc, int maxruns);
|
2004-06-14 23:08:47 +01:00
|
|
|
void preprocess (const System sys);
|
2004-08-09 10:42:58 +01:00
|
|
|
Term findGlobalConstant (const char *s);
|
2004-08-12 12:55:03 +01:00
|
|
|
Term makeGlobalConstant (const char *s);
|
2004-08-18 15:06:14 +01:00
|
|
|
Term makeGlobalVariable (const char *s);
|
2004-08-12 12:55:03 +01:00
|
|
|
void compute_role_variables (const System sys, Protocol p, Role r);
|
2004-04-23 11:58:43 +01:00
|
|
|
|
2005-06-16 15:10:07 +01:00
|
|
|
Term symbolDeclare (Symbol s, int isVar);
|
|
|
|
void levelTacDeclaration (Tac tc, int isVar);
|
|
|
|
|
|
|
|
#define levelDeclareVar(s) levelTacDeclaration(s,1)
|
|
|
|
#define levelDeclareConst(s) levelTacDeclaration(s,0)
|
|
|
|
#define levelVar(s) symbolDeclare(s,1)
|
|
|
|
#define levelConst(s) symbolDeclare(s,0)
|
|
|
|
|
2004-04-23 11:58:43 +01:00
|
|
|
#endif
|