Java Smalltalk Other
Latest commit 85b10fa Feb 15, 2017 @smarr committed on GitHub Merge PR #90: Optimize Single Message Processing in Mailbox
Failed to load latest commit information.
.settings Added Findbugs preferences for Eclipse Jul 4, 2016
core-lib Fixed RejectedExecution Feb 14, 2017
libs Update truffle and mx Jan 13, 2017
src Fixed RejectedExecution Feb 14, 2017
tests Remove boolean to distinguish VS Code and Kompos Jan 30, 2017
tools/kompos Fix kompos issues Feb 8, 2017
.checkstyle Exclude generated code from checkstyle checks Nov 30, 2016
.checkstyle_checks.xml Ignore data files in Checkstyle and Eclipse Jan 20, 2017
.checkstyle_suppressions.xml Ignore data files in Checkstyle and Eclipse Jan 20, 2017
.classpath Ignore data files in Checkstyle and Eclipse Jan 20, 2017
.factorypath Updated paths in Eclipse project Oct 23, 2015
.gitattributes Add .gitattributes to tell GitHub that *.som files are Smalltalk Dec 6, 2016
.gitignore Update .gitignore after dym test move Jan 20, 2017
.gitlab-ci.yml Move codespeed.conf to root folder Jan 22, 2017
.gitmodules Remove core-lib as submodule Oct 11, 2016
.graal-git-rev Update graal to d1057cb806157581b47ed071cf7a73ccc63dc59b Jan 14, 2017
.project Enable findbugs in Eclipse Jul 31, 2015
.travis.yml Update TypeScript dependencies Feb 5, 2017
AUTHORS Update license and author info (closes #36) Oct 2, 2016 Added mailbox optimization to CHANGELOG Feb 14, 2017
LICENSE Update license and author info (closes #36) Oct 2, 2016 Minor README update Jan 20, 2017
build.xml Move dynamic metric tests to tests folder Jan 20, 2017
codespeed.conf Move codespeed.conf to root folder Jan 22, 2017
debug Added executor script+symlinks, now based on Python Aug 25, 2015
fast Added executor script+symlinks, now based on Python Aug 25, 2015
som Update CoverallsTruffle and accumulate coverage data Jan 12, 2017

SOMns - A Simple Newspeak Implementation


Newspeak is a dynamic, class-based, purely object-oriented language in the tradition of Smalltalk and Self. SOMns is an implementation of the Newspeak Specification Version 0.0.95 derived from the SOM(Simple Object Machine) class libraries, and based on the TruffleSOM. Thus, SOMns is implemented using the Truffle framework and runs on the JVM platform.

A simple Hello World program looks like:

class Hello usingPlatform: platform = (
  public main: platform args: args = (
    'Hello World!' println.
    ^ 0

Implementation and Deviations from the Specification

SOMns is implemented as self-optimizing AST interpreter using the Truffle framework. Thus, it can utilize the Truffle support for just-in-time compilation to optimize the execution performance at runtime. It is completely file-based and does not have support for images. The parser is written in Java and creates a custom AST that is geared towards representing the executable semantics.

The overall goal is to be compliant with the specification, but include only absolutely necessary features. The current list of intended deviations from the specifications are as follows:

  • the mixin support of slots is not yet complete, see deactivate tests in core-lib/TestSuite/MixinTests.som

  • simultaneous slots clauses are not supported (spec. 6.3.2)

  • the file syntax is adapted to be more practical. This includes that category names are optional instead of being mandatory.

  • setter send syntax is still based on the classic Smalltalk :=

  • local variables in methods do not yet support the full slotDeclartion style

  • as in SOM method chains are not supported

  • as in SOM, blocks can only have 3 arguments (counting self)

Obtaining and Running SOMns

To checkout the code:

git clone

Then, SOMns can be build with Ant:


Afterwards, the simple Hello World program is executed with:

./som core-lib/Hello.som

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.

Setup Development Environment with Eclipse and VS Code

  1. Install JDK 1.8 and Eclipse Mars (or later)

  2. Download the project from Github git clone

  3. Run ant on the command line, or via Eclipse, to make sure that all libraries are loaded and available.

  4. Create Truffle Eclipse projects with Truffle's mx build tool:

cd libs/truffle/
../mx/mx eclipseinit
  1. Import SOMns project and the Truffle projects into Eclipse

  2. For debugging the interpreter, create a run configuration with the Mandelbrot benchmark. In option Run Configurations go to Java Application/SOMns and select tab arguments, enter:

    In Program arguments: core-lib/Benchmarks/Harness.som Mandelbrot 2 0 500

    In VM arguments: -ea -esa

For testing on the command line, the full command is $ ./som -G core-lib/Benchmarks/Harness.som Mandelbrot 2 0 500

Additionally, there are JUnit tests and ant test for executing the test suite.

To use VS Code as IDE and debugger for SOMns programs, it needs to be installed manually from:

The SOMns support can then be installed via the Marketplace.

Instructions for Ubuntu

sudo add-apt-repository ppa:webupd8team/java
curl -sL | sudo -E bash -
sudo apt install oracle-java8-installer git ant npm nodejs

git clone --recursive
cd GraalBasic
yes "n" | ./
cd ..

git clone
cd SOMns
ant       ## build SOMns
ant tests ## run all tests

cd libs/truffle
../mx/mx eclipseinit ## Generate all Truffle Eclipse projects

Build Status

The current build status is: Build Status

Academic Work

SOMns is designed as platform for research on concurrent programming models, and their interactions. Here, we collect related papers: