[ANN] BabySRE (Squeak Reverse Engineering) posted on SqueakMap

Milan Zimmermann milan.zimmermann at sympatico.ca
Mon Dec 27 21:47:59 UTC 2004


Trygve,

Thanks for your description, it prompted me to realize a core error that I 
kept making all along. Whenever the description in the PDF said "menu" i kept 
searching in the "red halo menu" ... It never occurred to me there is a 
popup-menu on the "object rectangles". 

Having played further, I was able to build the Collaboration almost all the 
way so far, SRE feels like a great tool. I don't develop in Smalltalk for 
living (at all), just slowly learning, but will use SRE for any explores I 
do, very interesting so far. 

Please see a few notes inline:

On December 27, 2004 05:02 am, Trygve Reenskaug wrote:
> Milan,
> I assume you got to a point where you have a diagram on the screen and that
> it has a rectangular symbol named '[...] a DemoEllipseSRE'.

yes

>
> The first problem could be that the symbol is placed outside the diagram. I
> have had some trouble placing symbols near the diagram boundaries. So I
> always place them well inside the boundaries.

The "auto-place" seem to put the rectangle in the middle, so I had no problem 
there.

>
> There are two ways of placing new object symbols.
> 1)  Place cursor in the diagram background outside any symbol. The menu
> shold here have an item named 'add role from expression...'. This opens a
> FillInTheBlank. Type an expression and accept. The expression will be
> evaluated and the resulting object shown as a symbol you can place in the
> diagram.

Yes - as above, I did not realize these are popup menus and was searching in 
the "red halo menus"

>
> 2) Place cursor over an object symbol.
>     The fifth menu item is as above. The expression you type will be
> executed in the context of the selected object, and you can place a new
> object symbol if the object isn't already in the diagram. (For example, if
> you type 'self', the result will be a link from the object to itself.)
>     The fourth menu item is 'add link for variable...'. 

Yes. As I explained above, I missed the fact when the PDF talks about "menu" 
it is a "popup menu". Perhaps to make this part more explanatory for new and 
non-squeak users, I modified the steps from the PDF to be little more 
verbose, and attached here as ".txt" perhaps it could be useful. As well it 
may be nice to include a "intermediate screenshot" after invoking such popup 
menu - I have attached such screenshot but as it is it is misleading because 
the different reference IDs for the objects.


One more note - when placing connector from "HandMorph" back to "world" 
("owner" connector of HandMorph) another rectangle representing a Heap 
appeared that is not shown in your PDF, was it removed when creating the PDF?

> It should give you
> a new menu showing all instance variables except:
>      -   instance variables pointing to objects that already have links
>      -   instance variables that are regarded as primitie in
> ALinkSpecSRE>>isPrimitive:
>          examples are nil, a Date, a Color, a Text, a Number, ...
>
> Your question makes me wonder about the wisdom of the 'IsPrimitive:'
> filter. I'll remove it in the next version because it has a strong smell of
> a trap. And whay shouldn't I be allowed to show a link to nil if I want to?

Perhaps it would be good to have this optional. I would prefer to see all 
instance variables in the popup menu, but it may make such menu too cluttered 
in some cases.

>
> I hope this helps you get going. 

Yes , thanks again

> Please contact me again of you don't
> succeed because your difficulties say something about the documentation and
> nothing about you.

Well .. it should have occurred to me to try a popup instead of the "red halo 
menu" i kept searching in ... 

Thanks for a great tool,

Milan

>
> Cheers
> --Trygve
>
> At 02:39 27.12.2004, you wrote:
> >Trygve,
> >
> >There is something I am struggling with when trying to play with SRE. I
> > tried to follow the describtion in Appendix 1 and 2:  downloaded
> >http://heim.ifi.uio.no/~trygver/2004/babysre/BabySRE.pdf, then started
> > with fresh Basic 3.7, installed Connectors 1.9 and installed BabySRE.
> >
> >Up to Appendix 2 Item 2. I am OK. However, in Appendix 2 Item 3 it I am
> >unable
> >to understand (and find) the
> >
> >menu 'add link for variable' -->owner
> >
> >I assume I should see an item  'add link for variable' in the menu of the
> >DemoEclipseSRE "rectangle" which I droped on the collaboration tool. I
> > cannot see such item in the menu ... so I wonder if I am misunderstanding
> > or perhaps something did not install correctly.
> >
> >Sorry if I miss something obvious,
> >
> >Thanks, Milan
> >
> >On December 19, 2004 09:03 am, Trygve Reenskaug wrote:
> > > SRE (Squeak Reverse Engineering) is new set of three tools making
> > > Squeak objects visible and tangible:
> > >
> > > 1) *SRE collaboration* for building a diagram a system of objects with
> > > the links between them.
> > >
> > > 2) *SRE Object Browser* to get a full description of a single object
> > > with its identity, state, and behavior.
> > >        The class hierarchy is flattened so that you see the object as a
> > > whole.
> > >
> > > 3) *Object>>traceRM:* a method that dumps the stack in the Transcript.
> > >
> > > Taken together, these three tools are meant to get their user in closer
> > > contact with the real objects. The tools shall give better
> > > understanding of existing systems and better contol over new ones.
> > >
> > > I have written a technical note using these tools to answer the
> > > question "What is a Morph?". It is posted at
> > >      http://heim.ifi.uio.no/~trygver/2004/babysre/BabySRE.pdf
> > >
> > > But seeing it on paper is one thing, working with the live objects is
> > > another. I encourage you to install BabySRE from SqueakMap:
> > > 1) Start from Squeak3.7-5989-basic. (Any other release might do, I
> > > haven't tried it)
> > > 2) Install Connectors version 1.9. (2.0 didn't work for me).
> > >        I got an error while loading. It does not seem to matter.
> > > 3) Load and open Monticello.
> > > 4) Open SqueakMap Package Loader. Select and install BabySRE-TRee11.
> > >
> > > I am particularly concerned to learn if the SRE approach is at odds
> > > with the visions of the SCG people in Berne. I hope not.
> > >
> > > I see from this mailing list that there are many contributors who teach
> > > Squeak programming. It would be very interesting if some of you could
> > > test how students take to the SRE way of describing object systems.
> > >
> > > BabySRE is part of the BabyUML project. I hope to use a complete
> > > rewrite of the SRE tools as parts of a higher level programming
> > > language IDE.
> > >
> > > I hope you will try the SRE tools, but don't expect me to maintain them
> > > in their present form. All feedback will be welcome. I must admit:
> > > positive feedback will be more than welcome.
> > >
> > > Have fun
> > > --Trygve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AfterAdding-world-link.png
Type: image/png
Size: 1647 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041227/55f85da2/AfterAdding-world-link.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: popup-menu.png
Type: image/png
Size: 7907 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041227/55f85da2/popup-menu.png
-------------- next part --------------

Appendix 2: How I created the collaboration model displayed in the image below.

1. no change
2. no change

3. Positioned mouse pointer over the "Model-[3092]demo-collaboration" object rectangle.
	- Clicked the Blue Button.
        - A popup menu appeared, selected 'add link for variable' from popup menu<##todo - perhaps add a PNG showing popup menu>.
        - A popup submenu appeared, selected 'owner' from the submenu.
        - Placed the selected item [1622] world. After this step, the diagram will look similar to this: <##todo - perhaps add a PNG showing initial diagram>

4.

	4.1. Similar to 3. above, placed [2543] a MorphExtension. Please note that before placing MorphExtension, instead of selecting 'owner' from the submenu as in 3., selected 'extension'.

	4.2. Similar to 3. above, placed [3880] a SimpleBorder, property of MorphExtension. Please note that before placing SimpleBorder, positioned mouse pointer over MorphExtension. As well, instead of selecting 'owner' from the submenu as in 3., selected 'other properties[borderStyle]'.

5. Similar to 3. above, placed [3623] a WorldState, [3216] a HandMorph, and [997] a FormCanvas, starting by positioning mouse pointer over rectangle representing respective "parent" object in hierarchy.






More information about the Squeak-dev mailing list