Subgraphs

1 view
Skip to first unread message

Konstantine

unread,
Jun 16, 2008, 7:56:04 PM6/16/08
to guess-discuss
Hello, and congratulations on Guess. I haven't
actually used the system yet (I just discovered
it), but I was quite impressed after briefly
browsing the manual. My question is this: does
the system support subgraphs and/or hyperedges?
The "subgraph" section in the version of the manual
that I found is blank, and says "[API not finalized]".
My understanding is that you can't import a GraphML
file with subgraphs and/or hyperedges, but is there
any other way of creating/visualizing subgraphs
(possibly with hyperedges) directly in Guess? If not,
are there any future plans for them? I'm interested in
graphical displays of nested code structures (such
as procedures that are lexically nested inside one
another). YEd has some nifty visualization features
for subgraphs, but of course it doesn't have the
nice interactivity of Guess, and it's also not
open-source. Thanks in advance for the info.

Eytan Adar

unread,
Jun 17, 2008, 4:15:24 PM6/17/08
to guess-...@googlegroups.com
Hi Konstantine -
 
So there isn't an explicit subgraph scheme in GUESS.   However, depending on what you want to do, there are a number of features that would let you achieve subgraph and hypergraph/hyperedge structures.
 
For example, you can define a hyperedge as a grouped set of edges:
 
hyperedge1 = (v1<->v2,v2<->v3,v3<->v1)
 
and then manipulate that hyperedge.  You can also assign a hyperedge id (or multiple ids) to each edge and then do things like (hyperedgeid == 1).color = red
 
You can create a special type of invisible node that represents a hyperedge and route edges through that (which also gives you a nice visual because all the edges will converge to one point).

A similar thing can be done for subgraphs (assigning subgraph ids to nodes/edges or grouping them as variables).  You can write a function pretty easily that replaces multiple subgraph nodes with one node (and then "uncompress" if necessary).
 
Unfortunately, one of the features you might want (getting subgraph nodes to fit in a certain area) isn't available yet.  I've been thinking about ways of doing it, but haven't settled on one.
 
Hope that helps,
 
-Eytan

Konstantine Arkoudas

unread,
Jun 20, 2008, 4:28:50 PM6/20/08
to guess-...@googlegroups.com
Hi Eytan, thanks for the reply. The approach
that you outline sounds interesting, but
unfortunately, as you've already guessed, the
main requirement is for the subgraph nodes to
be displayed as a single unit within a bounded
box, with incoming edges pointing into the box
(i.e. into the whole subgraph, not to any particular
vertex of it), and with outgoing edges coming
out of the box as a whole. Subgraph boxes might
also need distinct labels. And this capability
of course would need to be recursively available,
to an arbitrary degree of nesting (within practical
visualization limits). If you do plan to
implement something like this soon, please let
me know, as I would very much prefer to use
Guess than any other framework I've seen so far.
Thanks!

-- K.


--- On Tue, 6/17/08, Eytan Adar <eyta...@gmail.com> wrote:

Eytan Adar

unread,
Jun 20, 2008, 5:42:34 PM6/20/08
to guess-...@googlegroups.com
no problem... if I have any great ideas or changes, I'll let you know
 
-E

Reply all
Reply to author
Forward
0 new messages