- Smalltalk code analysis/output framework -

What's new?

Dandelion is now on GitHub! I put the latest version (v0.6.1) for Squeak 5.3. You can also install Dandelion directly from the SqueakMap Package Loader.

Dandelion0.5beta3 for Squeak 3.7. XMI 1.2 support. Improved HTML source layout. Handling DeclarativePools correctly. And some minor bug fixes. Enjoy!

Dandelion0.5beta2. I've just added the slash patch.

A small HTML outputter patch for / (slash) included category names. Not so common. But Seaside uses the character. See the example.

Dandelion0.5beta1 is now available as Dandelion.sar for SqueakMap. Install instantly and enjoy the power of the Dandelion!

Dandelion0.5beta1. Partial XMI support. You can now generate XMI UML files by Dandelion. Analyze your project and see it with the various case tools which support XMI (MagicDraw UML, Argo UML, etc)! Here is the MagicDraw sample screenshot.

Patch for Squeak3.2gammma. Added an minor exception handling code.

Dandelion 0.4final4. Minor bug fixes for Petal output. Added a new example.

I put Dandelion 0.4final3. It has a minor code polishing on PetalElement (for portability). Dandelion0.4 now could run even in Squeak2.7. Thanks Mr. Mark Taylor for suggesting that.

Dandelion 0.4final could not be loaded in Squeak3.0 image. Actually, it had a very minor bug in pal outputter . (The bug was about block variable - Squeak formatter seemed to insert an evil code).
The bug was fixed. Please use Dandelion 0.4final2.
Thanks Mr. Yutaka Kamite for reporting that.

At last, Dandelion 0.4 rolled out!
This version supports Rose Petal file output.

Dandelion project is stopped and going away? - NO!
Actually, a pretty good Rose Petal outputter is emerging. Current snapshot is here. You will see the formal Dandelion 0.4 release at the beginning of the next year!

Dandelion 0.4 SP2 is available! It runs on Squeak2.8 and supports SMIX output.

SMIX outputter early access - see SMIX page. It can be used independently without loading whole Dandelion classes!

Dandelion 0.4 sneak preview is now released!
Although it is not complete version, you will know where the Dandelion is directed to.

New sample output is available at Dandelion Samples (ignore banners...) This is based on Dandelion 0.4 pre-alpha version.

BadNews: I noticed that patch2 had a wrong expression; "Smalltalk removeClassNamed: #DlPortableFilePath". Now fixed... Sorry.

GoodNews: I confirmed that Dandelion 0.3 will run on Mac Squeak 2.7. Some people reported me Dandelion did not run on Mac Squeak 2.4. The problem seemed to be in VM.. Anyway, It is fixed.
And also, I announce that Dandelion 0.4 is just around the corner. Please stay tuned.

I put explanatory format SMIX for Smalltalk code interchange. . This is a tiny step toward the XMI support.

I decided not to implement Rose model file outputter any more. Many case vendors' move toward XMI is very, very rapid. So, I will implement a XMI (based on UML DTD) outputter. I think the translation from XMI to other proprietary format such as Rose model file is easy by using some XSLT utilities.


What is Dandelion?

Dandelion is a generic Smalltalk code analysis/output framework. You can analyze your code and output the information in various formats (currently HTML, SMIX, Petal, XMI).

Dandelion looks like a "doclet" in Smalltalk. And the impression is 80% right. However, I believe Dandelion has more flexibility. You can customize not only outputting format, but also analysis policy(what/how code elements will be analyzed) and analyzed information storage(how the analysis information is stored).

Why the system is called Dandelion?

The first motivation that made me develop this system was " to make a grass-root Rose/Smalltalk". Actually I once developed Rose/Smalltalk Japanese version in 1996. The tool supported round trip developing process. Developers model application systems in Rose(at that time UML was before its birth, so mainly in Booch Method) and generate Smalltalk st-files(for VisualWorks) - This is called "forward engineering". Then you file-in skeleton st-files and substantiate and change them. The changed code information could be merged into the original model by using Smalltalk code analysis tool - This is called "reverse engineering". Round trip development would be possible only by using both forward engineering and reverse engineering. As you know, round trip process is very productive, because you can develop your system incrementally. Model a little, implement a little, and test a little - that leads to more bug-free reusable systems. Developers can easily repeat this cycle in every development phase, because the main interest is always "objects". This round trip process makes the best use of the main feature of OOA/OOD/OOP - the modeling traceability.

As an OO developer, now I always use Unified Modeling Language in real-world projects. I believe a lot of Smalltalkers would like to use a state-of-the-art round trip engineering tool which supports UML. Unfortunately, Rose/Smalltalk became obscure and UML version of Rose/Smalltalk is not released from Rational Software.VisualWorks/RoseLink from Cincom is only for VisualWorks and the price of the product is not reasonable for some developers. (The same could be said about IBM VisualAge Smalltalk UML Designer).

So I decided to make a new, free, highly-custmizable, round-trip engineering tool for Smalltalkers. The system would be called "Dandelion Round-tripper".

However,this is merely a personal project. I am too busy to develop a whole system. "Dandelion Round-tripper" is to be made of two parts - forward engineering part and reverse engineering part. As a first trial, I developed reverse engineering base module - which is now called "Dandelion"

"Dandelion" has no intended relation to Xerox old Smalltalk "D-machines" (Dorade, Dolphin,Dandelion,Daylight). It is only a coincidence, though I think those names are quite cool.

What features does Dandelion have?

Dandelion version 0.4 main features are:


Download now!

System Requirements:

Squeak 2.8-3.7. (Sorry for VisualWorkers and other Smalltalkers. I'm now hooked on to Squeak. However, you can port Dandelion very easily. It is carefully implemented so as not to lose portability).

From Dandelion 0.5, at least Squeak 3.2 is required. (If you would like to run Dandelion 0.5 in Squeak 2.8-3.1, you should disable Patch for Squeak3.2gammma).

Release Dates and Changes:


Installation and run:

  1. Download the newest version from the archive (Dandelion0.5beta3)
  2. Extract the file and File-in install.st.
  3. See DlDandelionExample class example methods and just "do it".


  1. Install Dandelion.sar from FileList/SqueakMap. (From Squeak 3.5)

What's the next?

My next plans are:

Homework for you. Your contributions are always appreciated:

Below item is out of scope:


What architecture/design patterns are used in Dandelion?

The architecture of Dandelion is like a "Pipeline" [Pipes and Filters].

Main flow is as follows:

  1. Analyzer analyzes Smalltalk elements and extracts information.
  2. The information is stored (pushed) into Analysis Storage.
  3. Outputter gathers (pulls) stored information from the storage. Outputter generates some human or machine readable output (mostly text file) in a specific format referring the information.

You can change/customize each part independently.

A little closer look:

  1. All the elements to be analyzed are reified as "Analyzable".
  2. Analyzable can be a composite. For example, AnalyzableClassCategory has AnalyzableClasses as children. The whole analysis process is done by iterating through analyzables. [Composite, Iterator]
  3. In the iteration process, parent Analyzables propagates an AnalysisStrategy to their children.
  4. Each Analyzable passes itself to the AnalysisStrategy.[Visitor]
  5. AnalysisStrategy performs actual analysis by using Introspectors and set the analyzed information to the visiting Analyzables.[Strategy]
  6. Analyzables having analyzed information are all stored into a AnalysisStorage by that AnalysisStrategy.[Singleton]
  7. Outputter retrieves the information from the AnalysisStorage. Outputter processes the information in a specific way and generates output( usually text files).

All those collaborations are constructed by lazy initializations. So you can set customized AnalysisStrategy or Outputter dynamically.(DlDandelionSystem provide easy-to-use interfaces).[Facade]

What steps will be needed to customize Dandelion?

To customize Outputter:

  1. create a subclass of Outputter
  2. define output sequence (sequential steps to generate output format)
  3. implement each output steps (generally get the analyzed information from analysis storage and write this information in a specific format)
  4. define output properties if you would like to change output format more dynamically.
  5. implement a mediator to set the customized outputter.

To customize AnalysisStrategy:

  1. create a subclass of AnalysisStrategy
  2. override and implement analysis visitor-callback method (analyze<Element>on:anAnalyzable).
  3. implement a mediator to set the customized strategy.


Requests to Squeak Team!

  1. Squeak needs refactoring of Stream class hierarchy. Many newly implemented methods are liable to be attached and scattered inconsistently. I avoid this problem by implementing a wrapper stream class.
  2. Squeak ChangeSet implementation should undergo "big refactorings". I wrote a ChangeSet introspector, but it was a rather painful task. I think any code change is represented as "change objects", not arrays or dictionaries. VW ChangeSet implementation is worth investigating.
  3. Cool SCM. I'll use Monticello!!

Anyway many thanks for the most innovative environment in the planet! Very productive and lots of fun! I love Squeak!


Any feedback is appreciated.

Masashi Umezawa

also see the SmallInterfaces Squeak^HOME