public void export(Graph g, Map<String,Object> opts) throws ExportException, IOException {
        String path = (String)opts.get(ExporterOptions.OUTPUT_PATH);
        if (path == null) {
            throw new IllegalArgumentException("Must specify output path");
        }
        File out = FileUtil.createEmptyWritableFile(path);
        PrintStream ostream = new PrintStream(out);

        ostream.printf("digraph %s {\n",ExporterUtils.encloseInQuotes(ExporterUtils.name(path)));
        ostream.printf("\n   node [shape=record];\n"); 
      

        // --- Export the nodes ----
        List<GraphPoint> points = g.getGraphPoints();
        ostream.printf("\n   // Nodes\n");
        for (GraphPoint point: points) {
        	//  special case for symbol
        	if (point.hasAttr(Named.SYMBOL) && (Boolean)point.getAttr(Named.SYMBOL)) {
        		printSymbol(point,1,ostream);
        	}
            else if (point.isArray() && point.areValuesInlined()) {
                printArray((NodeArray)point,1,ostream);
            }
        	else {
            	printNode(point,1,ostream);
            }

        }
        
       // --- Export the edges ----
        ostream.printf("\n   // Edges\n");
        for (GraphPoint node: g.getGraphPoints()) {
            List<Edge> edges = node.getNeighbors();
            for (Edge e : edges) {
            	if (e.isAnonymous()) {
            		ostream.printf("   node%s -> node%s;\n", 
            				ExporterUtils.id(e.getFrom()),
                            ExporterUtils.id(e.getTo()));           		
            	}
            	else {
            		ostream.printf("   node%s -> node%s [ label = \"%s\" ];\n", 
            			ExporterUtils.id(e.getFrom()),
                        ExporterUtils.id(e.getTo()),e.getName());
            	}
            }
        }  

        ostream.print("}");
        ostream.close();
        
    }