From 6fa0f3904d302605ec0295201b11e4b2c1e99c54 Mon Sep 17 00:00:00 2001 From: ccremers Date: Tue, 13 Jul 2004 11:37:55 +0000 Subject: [PATCH] - Added more coloring. --- src/output.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/output.c b/src/output.c index f712201..79c7e2b 100644 --- a/src/output.c +++ b/src/output.c @@ -530,15 +530,19 @@ void graphNode (const System sys) { Termlist newtl; unsigned long int thisNode, parentNode; + int index; + Roledef rd; /* determine node numbers */ - parentNode = sys->traceNode[sys->step - 1]; + index = sys->step - 1; + parentNode = sys->traceNode[index]; thisNode = sys->statesLow; + rd = sys->traceEvent[index]; /* add node */ printf ("\tn%li [shape=", thisNode); - newtl = knowledgeNew (sys->traceKnow[sys->step-1], sys->traceKnow[sys->step]); + newtl = knowledgeNew (sys->traceKnow[index], sys->traceKnow[index+1]); if (newtl != NULL) { /* knowledge added */ @@ -558,11 +562,21 @@ void graphNode (const System sys) printf ("\tn%li -> n%li ", parentNode, thisNode); /* add label */ printf ("[label=\""); - roledefPrint (sys->traceEvent[sys->step - 1]); - printf ("\#%i", sys->traceRun[sys->step -1]); - printf ("\""); + if (rd->type == CLAIM && untrustedAgent (sys, sys->runs[sys->traceRun[index]].agents)) + { + printf ("Skip claim in #%i\"", sys->traceRun[index]); + } + else + { + roledefPrint (rd); + printf ("#%i\"", sys->traceRun[index]); + if (rd->type == CLAIM) + { + printf (",color=green"); + } + } /* a choose? */ - if (sys->traceEvent[sys->step -1]->type == READ && sys->traceEvent[sys->step -1]->internal) + if (rd->type == READ && rd->internal) { printf (",color=blue"); //printf (",style=dotted");