[SoC] [Application] Peek viewer/debugger

Matthew Fulmer tapplek at gmail.com
Mon Mar 19 00:40:29 UTC 2007


I put my application on the Swiki at:
http://wiki.squeak.org/squeak/5965
I also included it below (in Swiki syntax). I will submit it to
Google soon:

! Project

Peek is an experimental viewing and debugging framework that
attempts to generalize and extend the usefulness of the Smalltalk
inspector and debugger tools. At the core of Peek is the ability
to simulate and examine selected aspects of selected objects. This
simulator will be based on the current Smalltalk debugger, but
should handle arbitrary threads of execution.

The key difference between the Squeak debugger and Peek will be
that Peek is more reactive, transparent, and selective than the
current tools:

- transparent to the user: The user will enter a query into peek,
  and the system will continue running, and peek will examine
  existing and new objects that satisfy the query. The user does
  not need to manually open inspectors on certain objects; peek
  should do that for them.

- reactive: When a message is sent anywhere in the system to an
  object that peek is watching, peek will intercept that message
  and begin simulating it and showing the user exactly what is
  being done internally. The user does not need to actively change
  the code by inserting self halt in a suspect method; instead,
  she can let peek reactively intercept messages to the object,
  then view what happens to them, either in slowed-down time, or
  in user time (aka single-stepping). When the user is no longer
  interested, he can disable the peek interception, and the system
  will run at normal speed.

- selective: The user may not be interested in all properties of
  an object, or all messages sent to an object. The user will be
  able to filter out objects and messages she is not interested in
  in order to cut down on visual noise. Also, the user may not be
  interested in messages sent from the focus objects to the
  outside world; these messages can be sent without peek watching
  them and the user seeing them. This is the difference between
  "into" (send) and "over" (step) in the current squeak debugger.

This could all be done using a textual interface similar to the
existing Squeak tools, but peek will (eventually) use a more
graphical interface, where each object (including messages) is
represented by an on-screen icon, and pointers by a line between
objects. This creates an active graph representing the interesting
parts of the system.

! Schedule

This is a rather large project, involving a near-realtime query
system for the Squeak object memory, a selective debugger, and a
new user interface. Therefore, I will focus on getting a useful
product out fast, and save the killer UI for later. How can I do
this? 

1. A more fine-grained event producer

Using the existing Debugger, I can create a framework that
transforms very mundane Smalltalk events, such as a message sends,
object creation, and garbage collection, into OBAnnouncements.
This will require a bit of experimentation, as it will be all too
easy to get into an infinite announcement loop with this. Also, it
will have to be quite limited in focus, since the system would
slow to a crawl if, for every message send, an announcement was
created, broadcast, and processed.

However, such a framework, once working, would allow anything
imaginable to be debugged, logged, or whatnot, in a much more
uniform manner than is possible with the current thread-oriented
debugger.

2. A tool to use it.

The most trivial use of such a framework would be a simple message
logger. This will be the first tool created using the framework,
as well as the method used to test the framework. The next step
would be to recreate the Squeak debugger, inspector, and object
explorer using this framework. Finally, I would tie it together
into a message-logging debugger that will have a useful interface
for creating event queries, as well as some useful pre-built
queries. 

! About Me

My name is *Matthew Fulmer*, and I am a 21-year old college
student at Arizona State University in Phoenix, USA. I am
double-majoring in Computer Systems Engineering and Electrical
Engineering, and will receive those two Bachelor's Degrees next
December. I have been somewhat successfully organizing a
documentation team to improve the state of Squeak documentation.
We have focused almost exclusively on creating and categorizing
Squeak tutorials.

Although I have little experience in them, I am very interested in
user interfaces and compilers. Due to my research at ASU, I have
some experience in pattern recognition and signal processing. I
created this project partly as an answer to the desire for a more
introspective inspector, as expressed in the *Viewpoints NSF
grant>http://www.viewpointsresearch.org/pdf/NSFproposal.pdf*. 

Although Smalltalk is better than most systems, it is still harder
than necessary to examine and log the history of an object. I want
to be able to see more deeply into the worlds we create inside the
computer, and that is why I proposed the Peek framework.

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808


More information about the Soc mailing list