- Even more documentation.
This commit is contained in:
parent
eecab1bbda
commit
080d19a840
@ -3,9 +3,17 @@
|
|||||||
#include "runs.h"
|
#include "runs.h"
|
||||||
#include "tracebuf.h"
|
#include "tracebuf.h"
|
||||||
|
|
||||||
|
//! Help counter for the number of unknowns.
|
||||||
int cUnk = 0;
|
int cUnk = 0;
|
||||||
|
//! Help counter for the number of todos.
|
||||||
int cTod = 0;
|
int cTod = 0;
|
||||||
|
|
||||||
|
//! Mark all events of the same run before the event as required.
|
||||||
|
/**
|
||||||
|
*@param sys The system.
|
||||||
|
*@param tb The attack buffer.
|
||||||
|
*@param ev The reference event index.
|
||||||
|
*/
|
||||||
void markback(System sys, struct tracebuf *tb, int ev)
|
void markback(System sys, struct tracebuf *tb, int ev)
|
||||||
{
|
{
|
||||||
int run = tb->run[ev];
|
int run = tb->run[ev];
|
||||||
@ -44,6 +52,7 @@ void markback(System sys, struct tracebuf *tb, int ev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Minimize the attack.
|
||||||
void attackMinimize(System sys, struct tracebuf *tb)
|
void attackMinimize(System sys, struct tracebuf *tb)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -57,6 +57,10 @@ int modelCheck (const System sys);
|
|||||||
//! The name of this program.
|
//! The name of this program.
|
||||||
const char *progname = "scyther";
|
const char *progname = "scyther";
|
||||||
//! Release tag name.
|
//! Release tag name.
|
||||||
|
/**
|
||||||
|
* Note that this is only referenced in the help output of the commandline program.
|
||||||
|
* \todo Come up with a useful solution for release names.
|
||||||
|
*/
|
||||||
const char *releasetag = "alpha2-devel";
|
const char *releasetag = "alpha2-devel";
|
||||||
|
|
||||||
//! The main body, as called by the environment.
|
//! The main body, as called by the environment.
|
||||||
|
13
src/memory.c
13
src/memory.c
@ -1,3 +1,14 @@
|
|||||||
|
/**
|
||||||
|
*@file
|
||||||
|
* \brief Memory functions
|
||||||
|
*
|
||||||
|
* These are not really used anymore, so maybe they should be removed.
|
||||||
|
*
|
||||||
|
* \par Performance
|
||||||
|
* Tests showed that memory pooling was actually much less efficient than
|
||||||
|
* having \c malloc() trying to fit stuff into the memory caches.
|
||||||
|
*/
|
||||||
|
|
||||||
/* my own memory functions (not yet) */
|
/* my own memory functions (not yet) */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -15,6 +26,7 @@
|
|||||||
#include "substitutions.h"
|
#include "substitutions.h"
|
||||||
#include "runs.h"
|
#include "runs.h"
|
||||||
|
|
||||||
|
//! Open memory code.
|
||||||
void
|
void
|
||||||
memInit ()
|
memInit ()
|
||||||
{
|
{
|
||||||
@ -41,6 +53,7 @@ memInit ()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Close memory code.
|
||||||
void
|
void
|
||||||
memDone (int sw)
|
memDone (int sw)
|
||||||
{
|
{
|
||||||
|
10
src/mgu.c
10
src/mgu.c
@ -14,6 +14,10 @@
|
|||||||
New version yields a termlist with substituted variables, which can later be reset to NULL.
|
New version yields a termlist with substituted variables, which can later be reset to NULL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! Undo all substitutions in a list of variables.
|
||||||
|
/**
|
||||||
|
* The termlist should contain only variables.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
termlistSubstReset (Termlist tl)
|
termlistSubstReset (Termlist tl)
|
||||||
{
|
{
|
||||||
@ -24,6 +28,12 @@ termlistSubstReset (Termlist tl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Most general unifier.
|
||||||
|
/**
|
||||||
|
* Try to determine the most general unifier of two terms.
|
||||||
|
*@return Returns a list of variables, that were previously open, but are now closed
|
||||||
|
* in such a way that the two terms unify. Returns \ref MGUFAIL if it is impossible.
|
||||||
|
*/
|
||||||
Termlist
|
Termlist
|
||||||
termMguTerm (Term t1, Term t2)
|
termMguTerm (Term t1, Term t2)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,13 @@
|
|||||||
#include "termlists.h"
|
#include "termlists.h"
|
||||||
#include "substitutions.h"
|
#include "substitutions.h"
|
||||||
|
|
||||||
|
//! A special constant do denote failure.
|
||||||
|
/**
|
||||||
|
* \c NULL already denotes equality, so an extra signal is needed to
|
||||||
|
* denote that a unification fails.
|
||||||
|
* \todo Find a portable solution for this \c MGUFAIL constant:
|
||||||
|
* maybe a pointer to some special constant.
|
||||||
|
*/
|
||||||
#define MGUFAIL (Termlist) -1
|
#define MGUFAIL (Termlist) -1
|
||||||
|
|
||||||
Termlist termMguTerm (Term t1, Term t2);
|
Termlist termMguTerm (Term t1, Term t2);
|
||||||
|
@ -134,7 +134,7 @@ inTermlist (Termlist tl, Term term)
|
|||||||
/**
|
/**
|
||||||
* Are all elements of list 1 in list 2, and vice versa?
|
* Are all elements of list 1 in list 2, and vice versa?
|
||||||
* Note that we assume unique elements!
|
* Note that we assume unique elements!
|
||||||
*@param True iff every element of the list is in the other list.
|
*@return True iff every element of the list is in the other list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user