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; }
private void RunPatternRewrite() { GraphTransform graphTransform = new GraphTransform(nodesToAdd); //nodesToAdd.Clear(); nodesToAdd = graphTransform.ToFinalGraph(); }
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); }