Exemplo n.º 1
0
        public string BuildGraphDAG()
        {
            bool removeFromRemovedNodes = true;
            this.RemoveNodes(removeFromRemovedNodes);

            this.AddNodesToAST();
            this.MakeConnectionsForAddedNodes();

            this.UpdateModifiedNodes();
            string code = null;

            #if __TRANSFORM_TO_PROTOAST
            GraphTransform transform = new GraphTransform();
            List<ProtoCore.AST.AssociativeAST.AssociativeNode> graphIR = transform.ToGraphIR(this.Graph, this.gc);
            ProtoCore.CodeGenDS codeGen = new ProtoCore.CodeGenDS(graphIR);
            code = codeGen.GenerateCode();

            gc.UpdateAddedNodesInModifiedNameList();
            #else
            code = this.gc.PrintGraph();
            #endif

            gc.UpdateDirtyFlags(nodesToModify);

            return code;
        }
Exemplo n.º 2
0
        private void RunPatternRewrite()
        {
            GraphTransform graphTransform = new GraphTransform(nodesToAdd);

            //nodesToAdd.Clear();
            nodesToAdd = graphTransform.ToFinalGraph();
        }
Exemplo n.º 3
0
        public string BuildGraphDAG()
        {
            bool removeFromRemovedNodes = true;

            this.RemoveNodes(removeFromRemovedNodes);

            this.AddNodesToAST();
            this.MakeConnectionsForAddedNodes();

            this.UpdateModifiedNodes();
            string code = null;

#if __TRANSFORM_TO_PROTOAST
            GraphTransform transform = new GraphTransform();
            List <ProtoCore.AST.AssociativeAST.AssociativeNode> graphIR = transform.ToGraphIR(this.Graph, this.gc);
            ProtoCore.CodeGenDS codeGen = new ProtoCore.CodeGenDS(graphIR);
            code = codeGen.GenerateCode();

            gc.UpdateAddedNodesInModifiedNameList();
#else
            code = this.gc.PrintGraph();
#endif

            gc.UpdateDirtyFlags(nodesToModify);

            return(code);
        }
Exemplo n.º 4
0
 private void RunPatternRewrite()
 {
     GraphTransform graphTransform = new GraphTransform(nodesToAdd);
     //nodesToAdd.Clear();
     nodesToAdd = graphTransform.ToFinalGraph();
 }