コード例 #1
0
        public override void CreateTArbSeqCFG(uint[] states)
        {
            log.Info("Building TArbSeqCFG");

            Ensure.That(meapContext.AcceptingNodes).HasItems();

            log.Info("Create sink node");
            CreateSinkNode();

            log.Info("Connect bottomNodes with sink node");
            ConnectBottomNodesWithSinkNode(G, states);

            log.Info("Create TArbSeqGraph copy");
            TypedDAG <TASGNodeInfo, StdEdgeInfo> cfg = new("CFG");

            DAG.CreateCopy(G, cfg);
            cfg.CopyIdToNodeInfoMap(idToInfoMap);

            log.Info("Cut chains");
            meapContext.TArbSeqCFG = new TypedDAG <TASGNodeInfo, StdEdgeInfo>("CFG");
            DAG.CutChains(cfg, meapContext.TArbSeqCFG);

            log.Info("Create CFG idToInfoMap");
            meapContext.TArbSeqCFG.CopyIdToNodeInfoMap(idToInfoMap);

            RemoveUnusedNodeVLevels();

            log.InfoFormat(
                "idToInfoMap: {0} {1}",
                idToInfoMap.Count,
                meapContext.TArbSeqCFG.IdToNodeInfoMap.Count);

            Trace_TArbSeqCFG();
        }
コード例 #2
0
        public override void CreateTArbSeqCFG(uint[] states)
        {
            log.Info("Building TArbSeqCFG");

            log.Info("Create TArbSeqGraph copy");
            TypedDAG <TASGNodeInfo, StdEdgeInfo> cfg = new("CFG");

            DAG.CreateCopy(G, cfg);
            cfg.CopyIdToNodeInfoMap(idToInfoMap);

            log.Info("Connect bottomNodes with sink node");
            ConnectBottomNodesWithSinkNode(cfg, states);

            log.Info("Cut chains");
            meapContext.TArbSeqCFG = new TypedDAG <TASGNodeInfo, StdEdgeInfo>("CFG");
            DAG.CutChains_t(cfg, meapContext.TArbSeqCFG);

            log.Info("Create CFG idToInfoMap");
            meapContext.TArbSeqCFG.CopyIdToNodeInfoMap(idToInfoMap);

            log.InfoFormat(
                "idToInfoMap: {0} {1}",
                idToInfoMap.Count,
                meapContext.TArbSeqCFG.IdToNodeInfoMap.Count);

            Trace_TArbSeqCFG();

            endNodes.Clear();
            acceptingNodes.Clear();
        }
コード例 #3
0
        public override void CreateTArbSeqCFG(uint[] states)
        {
            log.Info("Building TArbSeqCFG");

            log.Info("Create TArbSeqGraph copy");
            TypedDAG <TASGNodeInfo, StdEdgeInfo> cfg = new("CFG");

            DAG.CreateCopy(meapContext.TArbitrarySeqGraph, cfg);
            cfg.CopyIdToNodeInfoMap(idToInfoMap);

            endNodes.ForEach(e => endNodeIds.Add(e.Id));
            ConnectBottomNodesWithSinkNode(cfg, states);
            endNodeIds.Clear();
            acceptingNodes.Clear();

            log.Info("Cut chains");
            meapContext.TArbSeqCFG = new TypedDAG <TASGNodeInfo, StdEdgeInfo>("CFG");
            DAG.CutChains_t(cfg, meapContext.TArbSeqCFG);

            meapContext.TArbSeqCFG.CopyIdToNodeInfoMap(idToInfoMap);
            meapContext.TArbitrarySeqGraph = default !;