- Improved graph coloring etc.
This commit is contained in:
parent
410a35f4f4
commit
ae6b85f290
@ -211,12 +211,12 @@ explorify (const System sys, const int run)
|
|||||||
/* be sure to do bookkeeping for the parent state */
|
/* be sure to do bookkeeping for the parent state */
|
||||||
unsigned long int parentBuffer;
|
unsigned long int parentBuffer;
|
||||||
|
|
||||||
parentBuffer = sys->traceNode[sys->step - 1];
|
parentBuffer = sys->traceNode[sys->step];
|
||||||
sys->traceNode[sys->step - 1] = sys->statesLow;
|
sys->traceNode[sys->step] = sys->statesLow;
|
||||||
|
|
||||||
flag = traverse (sys);
|
flag = traverse (sys);
|
||||||
|
|
||||||
sys->traceNode[sys->step - 1] = parentBuffer;
|
sys->traceNode[sys->step] = parentBuffer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1048,7 +1048,7 @@ violateClaim (const System sys, int length, int claimev, Termlist reqt)
|
|||||||
/* mark the path in the state graph? */
|
/* mark the path in the state graph? */
|
||||||
if (sys->switchStatespace)
|
if (sys->switchStatespace)
|
||||||
{
|
{
|
||||||
graphPath (sys,"color=red");
|
graphPath (sys,"shape=doubleoctagon,color=red","color=red");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy the current trace to the buffer, if the new one is shorter than the previous one. */
|
/* Copy the current trace to the buffer, if the new one is shorter than the previous one. */
|
||||||
|
18
src/output.c
18
src/output.c
@ -550,7 +550,7 @@ void graphNode (const System sys)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* no added knowledge */
|
/* no added knowledge */
|
||||||
printf ("point");
|
printf ("point,label=\"\"");
|
||||||
}
|
}
|
||||||
printf ("];\n");
|
printf ("];\n");
|
||||||
|
|
||||||
@ -571,14 +571,26 @@ void graphNode (const System sys)
|
|||||||
printf (";\n");
|
printf (";\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void graphPath (const System sys, const char* params)
|
void graphPath (const System sys, const char* nodepar, const char* edgepar)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < sys->step)
|
while (i < sys->step)
|
||||||
{
|
{
|
||||||
printf ("\tn%li [%s];\n", sys->traceNode[i], params);
|
/* color node */
|
||||||
|
if (nodepar != NULL)
|
||||||
|
{
|
||||||
|
printf ("\tn%li [%s];\n", sys->traceNode[i], nodepar);
|
||||||
|
}
|
||||||
|
/* color edge */
|
||||||
|
if (edgepar != NULL)
|
||||||
|
{
|
||||||
|
printf ("\tn%li -> n%li [%s];\n",
|
||||||
|
sys->traceNode[i],
|
||||||
|
sys->traceNode[i+1],
|
||||||
|
edgepar);
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ void attackDisplay(const System sys);
|
|||||||
void graphInit (const System sys);
|
void graphInit (const System sys);
|
||||||
void graphDone (const System sys);
|
void graphDone (const System sys);
|
||||||
void graphNode (const System sys);
|
void graphNode (const System sys);
|
||||||
void graphPath (const System sys, const char* params);
|
void graphPath (const System sys, const char* nodepar, const char*
|
||||||
|
edgepar);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user