Dylan browsing program? 
Author Message
 Dylan browsing program?

Does anyone have a good Dylan browsing program?

I'm thinking of something along the lines of Mary Boetcher's ancient
Mouser/MacBrowse program which I *still* use whenever I have an Object
Pascal or C/C++ program to explore and understand.  I've also used Object
Master and of the course the browsing features which have migrated into
CodeWarrior and VC++, but for reading code rather than editing it Mouser
still rules, ten years later!

Features I want include:

- find superclasses of class
- find subclasses of class
- find methods specialised on class
- browse generic functions
- find methods in generic function
- find references to variable/method

In general, each "find" feature should open a new window with the
appropriate method displayed in a pane.  Where there is more than one
result, there should be two vertically-arranged panes with a list of
results in the top pane and the source code corresponding to the item
selected in the top pane should be displayed in the bottom pane.  In
general, only code for one method should be displayed at one time (i.e.
ignore the file-based source code structure), but there might be a command
to display the entire source file in a new window.

Editing capability is not necessary.

I figure such a tool would make it much easier for *me* to understand the
d2c source code, and I'm sure it would be useful to others as well.  If it
doesn't exist then I'll probably try to write it.  Unfortunately I don't
know of a generally available GUI set for Dylan -- or even of one that
currently works from d2c on Linux -- so I'd probably have to use Java and
the AWT to get a portable program (it'd be nice if it could be used on
Unix/Mac/Windows at least).  Implementing as a mode in emacs would also be
a possibility.

It would be nice -- and possibly easiest -- to have d2c or Mindy generate
the necessary index file(s) as a side-effect of compiling. Or at least
steal the parsing code (and scope tracking/resolution) from one of them.

Thoughts?  Advice?  Existing programs?

-- Bruce



Thu, 08 Nov 2001 03:00:00 GMT  
 Dylan browsing program?

Quote:
> Does anyone have a good Dylan browsing program?

Harlequin Dylan contains an excellent browser (IMO), if you have
access to a PC, then I would recommend trying to build d2c with it.
Of course, I'm not sure how compatible the code is, we're currently
working on Common Dylan which should make our sources fully
interchangeable.

If this doesn't work for you, I don't know of a browser that works
with d2c, maybe one of the Gwydion developers knows of something.

Quote:
> Features I want include:

> - find superclasses of class
> - find subclasses of class
> - find methods specialised on class
> - browse generic functions
> - find methods in generic function
> - find references to variable/method

Harlequin Dylan's browser supports all of these, along with other
features such as:

 - list names in a namespace
 - list keywords for a class
 - list slots for a class

We also use the browser for browsing runtime information (elements in
a collection, slots in an object etc).

Quote:
> In general, each "find" feature should open a new window with the
> appropriate method displayed in a pane.  Where there is more than
> one result, there should be two vertically-arranged panes with a
> list of results in the top pane and the source code corresponding to
> the item selected in the top pane should be displayed in the bottom
> pane.  In general, only code for one method should be displayed at
> one time (i.e.  ignore the file-based source code structure), but
> there might be a command to display the entire source file in a new
> window.

In the Harlequin Dylan browser, instead of opening a new window for
each result, we use a web browser-style metaphor where a new 'page' is
created within the current window. You can then use 'Back' and
'Forward' buttons to move through the history of objects that you've
been browsing.

Quote:
> I figure such a tool would make it much easier for *me* to
> understand the d2c source code, and I'm sure it would be useful to
> others as well.  If it doesn't exist then I'll probably try to write
> it.  Unfortunately I don't know of a generally available GUI set for
> Dylan -- or even of one that currently works from d2c on Linux -- so
> I'd probably have to use Java and the AWT to get a portable program
> (it'd be nice if it could be used on Unix/Mac/Windows at least).

The standard GUI toolkit for Dylan is DUIM, but unfortunately the work
to get DUIM running under d2c is stalled waiting for the foreign
function interface work to be completed.

Quote:
> Implementing as a mode in emacs would also be a possibility.

IMO this is definitely the right way to start, then the GUI can be
layered on top of working code, and it will be simpler to switch the
GUI toolkit if needed.

Quote:
> It would be nice -- and possibly easiest -- to have d2c or Mindy
> generate the necessary index file(s) as a side-effect of
> compiling. Or at least steal the parsing code (and scope
> tracking/resolution) from one of them.

Harlequin Dylan saves a 'compiler database' with all of this browsing
information at the end of a compile, our browser then gets all of its
information from it. I believe that d2c uses a similar technology, so
with help from some of the Gwydion gurus I bet you could get something
going very quickly.

Hope this helps,

Andy

----------

Harlequin Inc.



Fri, 09 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Dylan Programming Book and Apple Dylan

2. Dylan Programming Information

3. Dylan for Web Programming...

4. Socket programming in Dylan

5. An example Dylan program?

6. A big Dylan program

7. Dylan Programming Information

8. The State of Dylan Programming

9. Dylan And Numeric Programming

10. Book: DYLAN programming

11. Question about the Dylan programming environments

12. Harlequin Dylan - Beta program

 

 
Powered by phpBB® Forum Software