Smalltalk Conversion

Please read the other documentation before you look at the conversion utility. Once you've extracted the source release, the source code for the conversion utility is contained in the directory named bistro/convert. The initial release of the Smalltalk to Bistro conversion utility has been tested with the following Smalltalk platforms.

Platform Installation Notes
Visual Smalltalk v3.1 for Win32 with protocols Install the file named bistro/convert/ if you have method protocol support.

Visual Smalltalk v3.1 for Win32 w/o protocols Install the file named bistro/convert/bistro.pkg if you don't have method protocol support.

VisualWorks Smalltalk v2.0 Install the file named bistro/convert/

Dolphin Smalltalk/98 v2.1 for Windows NT Install the file named bistro/convert/ before you install bistro/convert/

Squeak Smalltalk v2.5 for Windows NT Install the file named bistro/convert/

WARNING! Dolphin Smalltalk currently requires the installation the file named before you install The file adds support for creating new directories in the file system. Without this, the conversion utility will not work correctly.

If you have a later version than those indicated above, please post me e-mail to let me know whether the utility works with your version. If not, please let me know what kind of problems you encounter. If they are relatively minor fixes I will endeavor to correct them.


Once the conversion utility has been installed, locate the class named BistroTranslator. It has a class method named examples. The examples method provides two examples of how to use the utility. The first example demonstrates how to translate a single Smalltalk class to Bistro.

BistroTranslator "compile a single class"
in: 'bistro.translator' assign: BehaviorSignature;
compileClass: BehaviorSignature.

The second example illustrates how to assign multiple Smalltalk classes to a package and translate the entire package of classes.

BistroTranslator "compile a class package"
in: 'bistro.translator' assignAll:
#( BehaviorSignature BistroClassSignature BistroMethodSignature );
compilePackage: 'bistro.translator'.

Smalltalk does not have a concept of packages like that found in Java™. Therefore, the conversion utility provides a mechanism for assigning classes to packages by name. Then, when Smalltalk classes are converted to Bistro, the generated code and the location of the generated files is determined by the package assignments. If a class has not been assigned to a package explicitly, it will default to the package named smalltalk.application.


The conversion utility was designed to be portable across a variety of Smalltalk platforms. If you are using a Smalltalk platform other than one of those indicated above, look at the PlatformUtility hierarchy. The platform utility classes contain methods for abstracting and interacting with the local file system. There is a platform utility class for each of the four supported platforms. The methods included in the four utility classes should provide sufficient examples for you build a utility class for your platform. Also, if you develop a new platform utility class you are willing to share with the Bistro community, you can submit it to me and I will consider it for inclusion in a future release of Bistro. However, please remember that portability is important. We don't want to break the support for existing platforms when adding a new one. If you are interested in contributing a utility class, please contact me.

Oracle and Java™ are registered trademarks of Oracle and/or its affiliates.
SourceForge™ is a trademark of Geeknet, Inc.

Permission is granted to copy this document provided this copyright statement is retained in all copies.
Copyright 1999-2001 Nikolas S. Boyd.