Fixing read->recv conventions.
This commit is contained in:
@@ -137,13 +137,13 @@ arachneInit (const System mysys)
|
||||
add_event (SEND, NULL);
|
||||
I_M = add_role ("I_M: Atomic message");
|
||||
|
||||
add_event (READ, NULL);
|
||||
add_event (READ, NULL);
|
||||
add_event (RECV, NULL);
|
||||
add_event (RECV, NULL);
|
||||
add_event (SEND, NULL);
|
||||
I_RRS = add_role ("I_E: Encrypt");
|
||||
|
||||
add_event (READ, NULL);
|
||||
add_event (READ, NULL);
|
||||
add_event (RECV, NULL);
|
||||
add_event (RECV, NULL);
|
||||
add_event (SEND, NULL);
|
||||
I_RRSD = add_role ("I_D: Decrypt");
|
||||
|
||||
@@ -171,8 +171,8 @@ arachneDone ()
|
||||
|
||||
//! Just a defined integer for invalid
|
||||
#define INVALID -1
|
||||
//! can this roledef constitute a read Goal?
|
||||
#define isGoal(rd) (rd->type == READ && !rd->internal)
|
||||
//! can this roledef constitute a recv Goal?
|
||||
#define isGoal(rd) (rd->type == RECV && !rd->internal)
|
||||
//! is this roledef already bound?
|
||||
#define isBound(rd) (rd->bound)
|
||||
|
||||
@@ -401,7 +401,7 @@ fixAgentKeylevels (void)
|
||||
*@returns The number of goals added (for destructions)
|
||||
*/
|
||||
int
|
||||
add_read_goals (const int run, const int old, const int new)
|
||||
add_recv_goals (const int run, const int old, const int new)
|
||||
{
|
||||
if (new <= sys->runs[run].height)
|
||||
{
|
||||
@@ -419,7 +419,7 @@ add_read_goals (const int run, const int old, const int new)
|
||||
count = 0;
|
||||
while (i < new && rd != NULL)
|
||||
{
|
||||
if (rd->type == READ)
|
||||
if (rd->type == RECV)
|
||||
{
|
||||
if (switches.output == PROOF)
|
||||
{
|
||||
@@ -661,7 +661,7 @@ iterate_role_sends (int (*func) ())
|
||||
|
||||
//! Create decryption role instance
|
||||
/**
|
||||
* Note that this does not add any bindings for the reads.
|
||||
* Note that this does not add any bindings for the receives.
|
||||
*
|
||||
*@param term The term to be decrypted (implies decryption key)
|
||||
*@param key The key that is needed to decrypt the term
|
||||
@@ -902,9 +902,9 @@ bind_existing_to_goal (const Binding b, const int run, const int index,
|
||||
return true;
|
||||
}
|
||||
// We need some adapting because the height would increase; we therefore
|
||||
// have to add read goals before we know whether it unifies.
|
||||
// have to add recv goals before we know whether it unifies.
|
||||
old_length = sys->runs[run].height;
|
||||
newgoals = add_read_goals (run, old_length, index + 1);
|
||||
newgoals = add_recv_goals (run, old_length, index + 1);
|
||||
|
||||
{
|
||||
// wrap substitution lists
|
||||
@@ -955,7 +955,7 @@ bind_existing_to_goal (const Binding b, const int run, const int index,
|
||||
int r2, e2;
|
||||
|
||||
r2 = TermRunid (tvar);
|
||||
e2 = firstOccurrence (sys, r2, tsubst, READ);
|
||||
e2 = firstOccurrence (sys, r2, tsubst, RECV);
|
||||
if (e2 >= 0)
|
||||
{
|
||||
|
||||
@@ -1074,7 +1074,7 @@ bind_new_run (const Binding b, const Protocol p, const Role r,
|
||||
{
|
||||
int newgoals;
|
||||
|
||||
newgoals = add_read_goals (run, 0, index + 1);
|
||||
newgoals = add_recv_goals (run, 0, index + 1);
|
||||
indentDepth++;
|
||||
bind_existing_to_goal (b, run, index, true);
|
||||
indentDepth--;
|
||||
@@ -1248,7 +1248,7 @@ bind_goal_new_encrypt (const Binding b)
|
||||
|
||||
{
|
||||
int newgoals;
|
||||
newgoals = add_read_goals (run, 0, index + 1);
|
||||
newgoals = add_recv_goals (run, 0, index + 1);
|
||||
{
|
||||
|
||||
indentDepth++;
|
||||
@@ -2283,7 +2283,7 @@ arachneClaimTest (Claimlist cl)
|
||||
}
|
||||
|
||||
proof_suppose_run (run, 0, cl->ev + 1);
|
||||
newgoals = add_read_goals (run, 0, cl->ev + 1);
|
||||
newgoals = add_recv_goals (run, 0, cl->ev + 1);
|
||||
|
||||
/**
|
||||
* Add initial knowledge node
|
||||
@@ -2499,7 +2499,7 @@ arachne ()
|
||||
* completely ignores any information on unbound variables, and regards them
|
||||
* as bound constants.
|
||||
*
|
||||
* Because everything is supposed to be bound, we conclude that even 'read'
|
||||
* Because everything is supposed to be bound, we conclude that even 'recv'
|
||||
* events imply a certain knowledge.
|
||||
*
|
||||
* If aftercomplete is 0 or false, we actually check the ordering; otherwise we
|
||||
@@ -2536,10 +2536,10 @@ knowledgeAtArachne (const System sys, const int myrun, const int myindex,
|
||||
// Check whether this event precedes myevent
|
||||
if (aftercomplete || isDependEvent (run, index, myrun, myindex))
|
||||
{
|
||||
// If it is a send (trivial) or a read (remarkable, but true
|
||||
// If it is a send (trivial) or a recv (remarkable, but true
|
||||
// because of bindings) we can add the message and the agents to
|
||||
// the knowledge.
|
||||
if (rd->type == SEND || rd->type == READ)
|
||||
if (rd->type == SEND || rd->type == RECV)
|
||||
{
|
||||
knowledgeAddTerm (know, rd->message);
|
||||
if (rd->from != NULL)
|
||||
|
||||
Reference in New Issue
Block a user