- Added more coloring.

This commit is contained in:
ccremers 2004-07-13 11:37:55 +00:00
parent 46da382950
commit 6fa0f3904d

View File

@ -530,15 +530,19 @@ void graphNode (const System sys)
{ {
Termlist newtl; Termlist newtl;
unsigned long int thisNode, parentNode; unsigned long int thisNode, parentNode;
int index;
Roledef rd;
/* determine node numbers */ /* determine node numbers */
parentNode = sys->traceNode[sys->step - 1]; index = sys->step - 1;
parentNode = sys->traceNode[index];
thisNode = sys->statesLow; thisNode = sys->statesLow;
rd = sys->traceEvent[index];
/* add node */ /* add node */
printf ("\tn%li [shape=", thisNode); 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) if (newtl != NULL)
{ {
/* knowledge added */ /* knowledge added */
@ -558,11 +562,21 @@ void graphNode (const System sys)
printf ("\tn%li -> n%li ", parentNode, thisNode); printf ("\tn%li -> n%li ", parentNode, thisNode);
/* add label */ /* add label */
printf ("[label=\""); printf ("[label=\"");
roledefPrint (sys->traceEvent[sys->step - 1]); if (rd->type == CLAIM && untrustedAgent (sys, sys->runs[sys->traceRun[index]].agents))
printf ("\#%i", sys->traceRun[sys->step -1]); {
printf ("\""); 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? */ /* 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 (",color=blue");
//printf (",style=dotted"); //printf (",style=dotted");