Ejemplo n.º 1
0
        public static DynamicFlow Construct_DynamicFlow_Forward(StaticFlow sFlow, int startLine, int nSteps, Tools tools)
        {
            DynamicFlow dFlow = new DynamicFlow(tools);

            dFlow.Reset(sFlow, true);
            return(dFlow);
        }
Ejemplo n.º 2
0
        public static void SaveToDot(StaticFlow sFlow, DynamicFlow dFlow, string filename)
        {
            AdjacencyGraph <string, TaggedEdge <string, string> > displayGraph = new AdjacencyGraph <string, TaggedEdge <string, string> >();

            foreach (string vertex in dFlow.Graph.Vertices)
            {
                displayGraph.AddVertex(vertex);
            }
            foreach (TaggedEdge <string, (bool Branch, StateUpdate StateUpdate)> edge in dFlow.Graph.Edges)
            {
                int    lineNumber  = dFlow.LineNumber(edge.Source);
                string displayInfo = sFlow.Get_Line_Str(lineNumber) + "\n" + edge.Tag.StateUpdate.ToString2();
                displayGraph.AddEdge(new TaggedEdge <string, string>(edge.Source, edge.Target, displayInfo));
            }
            Visualize(displayGraph, filename);
        }