Skip to content

SOM-st/TruffleSOM

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is up to date with smarr/TruffleSOM:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
som
 
 

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.

Obtaining and Running TruffleSOM

To checkout the code:

git clone https://github.com/SOM-st/TruffleSOM.git

Then, TruffleSOM can be build with Ant:

ant jar

Afterwards, the tests can be executed with:

./som -G -cp Smalltalk TestSuite/TestHarness.som

A simple Hello World program is executed with:

./som -G -cp Smalltalk Examples/Hello.som

When working on TruffleSOM using Eclipse, ant can generate the Eclipse projects for the Truffle framework and the Graal compiler:

ant ideinit

For other IDEs, the mx tool in libs/mx can generate configurations. The following will for instance generate the IntelliJ projects for the Truffle framework:

cd libs/truffle/truffle
../../mx/mx intellijinit

TruffleSOM uses the Graal compiler to reach state-of-the-art performance. To use it, we need to compile it together with TruffleSOM:

ant compile

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:

./som -cp Smalltalk Examples/Benchmarks/BenchmarkHarness.som Mandelbrot 100 500

For more documentation on building TruffleSOM, run:

ant help

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: Build Status

About

A SOM Smalltalk implemented on top of Oracle's Truffle Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 97.8%
  • Python 1.8%
  • Shell 0.4%