From: Thomas F. Burdick
Subject: Drawing directed, cyclic graphs
Date: 
Message-ID: <xcvofa2xfec.fsf@apocalypse.OCF.Berkeley.EDU>
I have some graphs of CLOS objects that I'd like to be able to look
at, rather than figure out by using the inspector, but I've got a
problem.  Normally, I'd use the code I have written to do this with
Garnet, but the code that I'm working on that produces the graphs
currently only runs under CLISP on Mac OS X.  Getting Garnet running
on OS X is on my todo list for when this project's over.

I know about psgraph from the CMU AI repository, but as far as I know,
it only handles acyclic graphs.  Any suggestions?

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               

From: Tim Bradshaw
Subject: Re: Drawing directed, cyclic graphs
Date: 
Message-ID: <fbc0f5d1.0210110032.345dc7d9@posting.google.com>
···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) wrote in message news:<···············@apocalypse.OCF.Berkeley.EDU>...

> 
> I know about psgraph from the CMU AI repository, but as far as I know,
> it only handles acyclic graphs.  Any suggestions?

So long as you can draw DAGs (not just trees) you can draw cyclic
graphs by reversing some links in them.  If you have a grapher which
can decide on the fly how to draw the arcs (say putting arrows on
them), then you can DAGify a cyclic graph by creating a DAG which has
forward & reverse links, and then when you come to draw a reverse link
you can put the arrow on the other end.

The algorithm to do all this is fairly fiddly and probably
theoretically computationally bad (it's basically an occurs check),
but it's doable.

I'd provide code but I only have a very half-finished thing which
makes lots of assumtions about the structures it's processing.

--tim
From: Marc Battyani
Subject: Re: Drawing directed, cyclic graphs
Date: 
Message-ID: <03A3A3F4FFEFF23B.5A6ABDB9DB99F9BD.ADB254B896783C10@lp.airnews.net>
"Thomas F. Burdick" <···@apocalypse.OCF.Berkeley.EDU> wrote

> I have some graphs of CLOS objects that I'd like to be able to look
> at, rather than figure out by using the inspector, but I've got a
> problem.  Normally, I'd use the code I have written to do this with
> Garnet, but the code that I'm working on that produces the graphs
> currently only runs under CLISP on Mac OS X.  Getting Garnet running
> on OS X is on my todo list for when this project's over.
>
> I know about psgraph from the CMU AI repository, but as far as I know,
> it only handles acyclic graphs.  Any suggestions?

I use graphviz to render graphs from Lisp:
http://www.research.att.com/sw/tools/graphviz/

They have papers on the the algorithms they use. To turn a CG to a DAG they
reverse some links before running the algorithms. I wanted to look at the
papers and the C sources to reimplement the algorithms in Lisp and then
render them in pdf with cl-pdf but did not found any time to do it.

Marc
From: Thomas F. Burdick
Subject: Re: Drawing directed, cyclic graphs
Date: 
Message-ID: <xcvwuoou9qz.fsf@mudslide.OCF.Berkeley.EDU>
"Marc Battyani" <·············@fractalconcept.com> writes:

> "Thomas F. Burdick" <···@apocalypse.OCF.Berkeley.EDU> wrote
> 
> > I have some graphs of CLOS objects that I'd like to be able to look
> > at, rather than figure out by using the inspector, but I've got a
> > problem.  Normally, I'd use the code I have written to do this with
> > Garnet, but the code that I'm working on that produces the graphs
> > currently only runs under CLISP on Mac OS X.  Getting Garnet running
> > on OS X is on my todo list for when this project's over.
> >
> > I know about psgraph from the CMU AI repository, but as far as I know,
> > it only handles acyclic graphs.  Any suggestions?
> 
> I use graphviz to render graphs from Lisp:
> http://www.research.att.com/sw/tools/graphviz/
> 
> They have papers on the the algorithms they use. To turn a CG to a DAG they
> reverse some links before running the algorithms. I wanted to look at the
> papers and the C sources to reimplement the algorithms in Lisp and then
> render them in pdf with cl-pdf but did not found any time to do it.

Cool, thanks.  A bunch more people suggested this via e-mail, too, so
I think I'll try it out.  It looks like its input format should be
easy enough to generate (and unlike my Garnet solution, it generates
nice-looking graphs that don't require manual intervention)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Paolo Amoroso
Subject: Re: Drawing directed, cyclic graphs
Date: 
Message-ID: <wwCnPQeiAsNNe9AsoM4AuKICXLQ3@4ax.com>
On 10 Oct 2002 12:28:11 -0700, ···@apocalypse.OCF.Berkeley.EDU (Thomas F.
Burdick) wrote:

> I know about psgraph from the CMU AI repository, but as far as I know,
> it only handles acyclic graphs.  Any suggestions?

There are other graph drawing tools at the CMU Common Lisp repository
bundled in an archive called something like "cl-grapher". But I seem to
recall that they are interactive tools.


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README