medley icon indicating copy to clipboard operation
medley copied to clipboard

Improve BROWSER (graphs of Masterscope SHOW PATHS)

Open masinter opened this issue 2 years ago • 2 comments

Originally posted by @masinter in https://github.com/Interlisp/medley/issues/1122#issuecomment-1493476872

Just loading Lispusers BROWSER will change what SHOW PATHS does.

I'm not sure of what is happening, but there are several reasons to believe that the handling of resource exhaustion with Medley 3.5 hasn't been tested or debugged.

  • [ ] The reason I suspect a resource exhaution probblem is because if I interrupt "show paths to tedit" with control-B, reset, no problem. We should try doing it over and over, it shouldn't have any GC problems.

  • [ ] We definitely need to fix stack overflow's "stack reserve" to be larger. Whether it fixes this problem, I don't know.

  • [ ] Masterscope has a list of functions to avoid in a show paths (ERROR, HELP, PRINT ...) that needs to be checked

  • [ ] spliting up the .database files will make show paths only show the parts you care about. Maybe need a "load all" option

  • [ ] layout graph and show paths need depth maxima, where it stops when things are too big to display or use

masinter avatar May 05 '23 21:05 masinter

I tried (with BROWSER loaded): . SHOW PATHS FROM \TEDIT.SELECT TO \SHOWSEL and it showed all the paths from \TEDIT.SELECT to anywhere. It appears not to care about the bottom end-point.

Also, it would be nice if the menu on the node-button would allow deleting a subgraph, the way spy does.

rmkaplan avatar Feb 11 '24 07:02 rmkaplan

I've been trying to figure out what is wanted here. Masterscope was developed when you would only have the things you were working on in the database loaded, and also when system sources weren't available to most. So the paths with "fuller.database" loaded are huge and mainly irrelevant. A single \DTEST.UFN would result in pulling in ERROR and BREAAK and PRINT etc.

You can ask for paths "among" a subset of the functions, SHOW PATHS FROM A TO B AMONG ANY ON FILE-C

I think we could by default only include those on any file in FILELST (for paths). Another way to throttle paths is to eliminate functions that are called by too many places ... common functions CAR and CDADDR and PUTHASH. I was looking at not going below any nodes that were called by more than some threshhold ("promiscuous").

The other thing is the combination of FROM and TO lists or single functions -- which paths do you want? The shortest path? All possible paths?

masinter avatar Feb 19 '24 06:02 masinter