You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TruffleSOM - The Simple Object Machine Smalltalk implemented using the Truffle Framework
Introduction
This is the repository for TruffleSOM, an implementation of the Simple Object
Machine (SOM). SOM is a minimal Smalltalk dialect that was used to teach VM
construction at the Hasso Plattner Institute. It was originally built at
the University of Århus (Denmark) where it was used for teaching and as the
foundation for Resilient Smalltalk.
In addition to TruffleSOM, other implementations exist for Java (SOM), C (CSOM),
C++ (SOM++), and Squeak/Pharo Smalltalk (AweSOM).
A simple Hello World looks like:
Hello= (
run = (
'Hello World!' println.
)
)
TruffleSOM is a Truffle-based implementation of SOM, including SOM's
standard library and a number of examples. Please see the main project
page for links to other VM implementations.
TruffleSOM uses the mx build tool, which is
easiest to use when on the PATH.
After downloading the git repositories, TruffleSOM can be build with:
cd TruffleSOM
./som --setup labsjdk # downloads a compatible JDK
mx build
And now we, can execute tests with:
./som -G -cp Smalltalk TestSuite/TestHarness.som
A simple Hello World program is executed with:
./som -G -cp Smalltalk Examples/Hello.som
To work on TruffleSOM, mx can generate project definitions for
Eclipse, IntelliJ, and NetBeans. Chose the one you prefer:
mx eclipseinit
mx intellijinit
mx netbeansinit
TruffleSOM uses the Graal compiler to reach state-of-the-art performance.
To use it, we need to compile it together with TruffleSOM:
mx --env libgraal build
Afterwards, we can run a benchmark, and observe that the initial iterations
take much longer, but after a while we reach magnitudes faster execution speeds:
Information on previous authors are included in the AUTHORS file. This code is
distributed under the MIT License. Please see the LICENSE file for details.
Build Status
Thanks to GitHub Actions, all commits of this repository are tested.
The current build status is:
YourKit
This Project makes use of the Yourkit profiler to help find performance bugs and aid in our research of profilers.