Exemplo n.º 1
0
        public DerivedSequenceBuilder(ProcedureStructure proc)
        {
            this.graphs = proc.DerivedGraphs;
            this.ib     = new IntervalBuilder();
            var gr = BuildDerivedGraph(proc.Nodes, proc.EntryNode);

            graphs.Add(gr);
            while (gr.Graph.Nodes.Count > 1)
            {
                DerivedGraph newGr = BuildNextOrderGraph(gr);
                if (newGr.Graph.Nodes.Count == gr.Graph.Nodes.Count)
                {
                    return;
                }
                graphs.Add(newGr);
                gr = newGr;
            }
        }
Exemplo n.º 2
0
        protected virtual void RunTest(Procedure proc)
        {
            ProcedureStructureBuilder graphs = new ProcedureStructureBuilder(proc);
            graphs.BuildNodes();
            graphs.DefineEdges();
            ph = graphs.CreateProcedureStructure();
            graphs.SetTimeStamps();

            IntervalBuilder ib = new IntervalBuilder();
            intervals = ib.BuildIntervals(new StructureGraphAdapter(ph.Nodes), ph.EntryNode);
        }