[plt-scheme] PLT Source Browser

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Feb 5 13:07:05 EST 2006

Robby Findler wrote:
> I've put together a first cut at building the module pictures. You'll
> need the latest svn version of DrScheme to run the attached script, but
> you can look at the pictures here:
>   http://www.cs.uchicago.edu/~robby/tmp/mgi/
> I generated the files using module-graph-dot.ss and dot (in the
> graphviz package available via fink for mac os x and also available
> under linux somehow, I'm sure).
>   ./module-graph-dot.ss ~/svn/plt/collects/mzlib/etc.ss > etc.dot
>   dot -Tps etc.dot > etc.ps
>   epstopdf etc.ps
> It doesn't seem to work well for the very large files, however, since
> the graphs get kind of klunky (many more edges than nodes). The "-n"
> flag helps a little (it avoid following `lib' paths) but it isn't
> enough for the big files. To see, try framework.ss.
> Anyways, I hope someone else can take it from here.

For the time being I'll experiment with a text sidebar
listing the various types of requires. I like you
dot-example though, for one it made the code in module-overview.ss
easier to understand.

I noticed at the Graphviz gallery page, that it can produce
SVG files, which is in XML format. Maybe one could use such
manipulate such an output file and turn the nodes into links?

Your framework example turns into this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
  <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
<!-- Generated by dot version 2.6 (Sun Aug 28 13:14:52 UTC 2005)
      For user: Bill Gates -->
<!-- Title: _anonymous_0 Pages: 1 -->
<svg width="3003pt" height="299pt"
  viewBox = "0 0 3003 299"
<g id="graph0" class="graph" 

<!-- sig.ss -->
<g id="node2" class="node"><title>sig.ss</title>
<ellipse style="fill:none;stroke:black;" cx="1566" cy="276" rx="28" 
<text text-anchor="middle" x="1566" y="281">sig.ss</text>

<!-- gui&#45;utils.ss -->
<g id="node3" class="node"><title>gui&#45;utils.ss</title>
<ellipse style="fill:none;stroke:black;" cx="2433" cy="276" rx="43" 
<text text-anchor="middle" x="2433" y="281">gui&#45;utils.ss</text>

<!-- collapsed&#45;snipclass&#45;helpers.ss -->
<g id="node4" 
<ellipse style="fill:none;stroke:black;" cx="2902" cy="276" rx="96" 
<text text-anchor="middle" x="2902" 


Any volunteers?

Jens Axel Søgaard

Posted on the users mailing list.