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