Informally specifying Squeak
bparsia at email.unc.edu
Sun Apr 14 06:08:43 UTC 2002
On Sun, 14 Apr 2002, David Faden wrote:
> I'm considering doing an independent study project and am wondering
> how I might make the results of the project useful to the Squeak
Publishing them is always good :)
> The project would involve revising an informal specification
> of Smalltalk's key built-in types (based on Little Smalltalk) to fit
> with Squeak.
I don't think this is the best way to go at it, but the general idea is
> The present version of the document, "Overview and
> Specification of the Built-In Types in Little Smalltalk" by Gary Leavens
> and Yoonsik Cheon, is available at
> ftp://ftp.cs.iastate.edu/pub/techreports/TR91-22/TR.ps.Z and is cached
> at http://citeseer.nj.nec.com/89686.html.
I'm not clear how helpful a starting point this is, since, in the first
paragraph, they talk about how Little Smalltalk diverged from
Smalltalk-80. Squeak is a mainline decendant of Smalltalk-80, so there
*may* be more (subtle) incompatibilities that is happy for you.
> For example, Boolean's and: method is specified as follows:
> and: self: Boolean, aBlock: Block -> b: Boolean
> Requires: aBlock takes no arguments and returns a Boolean.
> Modifies at most: the objects modified by the execution of aBlock.
> Ensures: b is false if self is false; otherwise b is the result of
> evaluating aBlock.
Even if you're just using the format/style, I might argue against it in
favor of following the ANSI Smalltalk format/style. Not only is there a
nice doc for this, but there are Unit Tests based on that document. Check
out the ANSI smalltalk camp Smalltalk project.
> What could I do to make this work most useful to the Squeak community?
> How would you suggest presenting the specification? (My first
> inclination is to insert a method's specification into its comment so as
> to make the specification available from a browser.)
Some sort of integration with the browser would be wonderful. I've long
wanted that for the ANSI stuff as well. Something like the Common Lisp
HyperSpec. Actually, I'd love if a bunch of the Classic Smalltalk
literature were well integrated with Squeak (big project, since you would
have to docuemnt changes, but still, blue book at your finger tips!)
The other thing I'd check first is to see if there isn't a formal
something hanging around that you could aim for compatibility
with. StrongTalk, SOUL, the current crop of type checkers...This is a bit
more ambitious of course.
You also might want to poke around with "annotations" and with
hyperlinks. The annotation pane already displays a lot of metadata for
each method. It might be nice to have check boxes for "only
preconditions", "Everything", etc.
More information about the Squeak-dev