Exemplo 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);
        }
Exemplo 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);
        }
Exemplo n.º 3
0
 public static DynamicFlow Construct_DynamicFlow_Forward(StaticFlow sFlow, Tools tools)
 {
     return(Construct_DynamicFlow_Forward(sFlow, sFlow.FirstLineNumber, sFlow.NLines * 2, tools));
 }
Exemplo n.º 4
0
 public static (StateUpdate Regular, StateUpdate Branch) Execute(
     StaticFlow sFlow,
     int lineNumber,
     (string PrevKey, string NextKey, string NextKeyBranch) keys,
Exemplo n.º 5
0
 public static DynamicFlow Construct_DynamicFlow_Forward(StaticFlow sFlow, Tools tools)
 {
     Contract.Requires(sFlow != null);
     return(Construct_DynamicFlow_Forward(sFlow, sFlow.FirstLineNumber, sFlow.NLines * 2, tools));
 }
Exemplo n.º 6
0
 public static (StateUpdate regular, StateUpdate branch) Execute(
     StaticFlow sFlow,
     int lineNumber,
     (string prevKey, string nextKey, string nextKeyBranch) keys,