Skip to content
/ SOMpp Public
forked from smarr/SOMpp

SOM++ - C++ implementation of the Simple Object Machine Smalltalk

Notifications You must be signed in to change notification settings

SOM-st/SOMpp

This branch is up to date with smarr/SOMpp:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 13, 2025
Feb 24, 2025
Feb 20, 2025
Oct 15, 2010
Mar 13, 2012
Oct 30, 2012
Feb 24, 2025
Aug 1, 2024
Feb 13, 2025
Nov 19, 2013
Feb 18, 2025
Nov 17, 2013
Jan 13, 2011
Feb 24, 2025
Sep 24, 2013
Jul 5, 2024
Sep 24, 2013
Sep 24, 2013
Feb 13, 2025
Feb 20, 2025
Jun 8, 2017

Repository files navigation

SOM++ - The Simple Object Machine implemented in C++

Introduction

SOM is a minimal Smalltalk dialect used to teach VM construction at the Hasso Plattner Institute. It was originally built at the University of Århus (Denmark) where it was also used for teaching.

Currently, implementations exist for Java (SOM), C (CSOM), C++ (SOM++), Python (PySOM), RPython (RPySOM), the Truffle framework (TruffleSOM), and Squeak/Pharo Smalltalk (AweSOM).

A simple SOM Hello World looks like:

Hello = (
  run = (
    'Hello World!' println.
  )
)

This repository contains the C++ implementation of SOM, including an implementation of the SOM standard library and a number of examples. Please see the main project page for links to the VM implementations.

SOM++ uses CMake for building:

$ mkdir cmake-build && cd cmake-build
$ cmake ..
$ make

Afterwards, the tests can be executed with:

$ ./SOM++ -cp ../Smalltalk ../TestSuite/TestHarness.som

A simple Hello World program is executed with:

$ ./SOM++ -cp ../Smalltalk ../Examples/Hello.som

Note: On Linux, the library search path needs to be adapted:

$ export LD_LIBRARY_PATH=.

The debug version of CSOM can be built using the debug target:

$ make debug

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. Additional documentation, detailing for instance the object model and how to implement primitives, is available in the doc folder.

Advanced Compilation Settings

SOM++ supports different garbage collectors, including a basic mark/sweep, and a generational GC. Furthermore, it implements different variants for integer handling.

Tagged integers:

default: off
option name: TAGGING
example: cmake .. -DUSE_TAGGING=true

Integer caching:

default: off
option name: INT_CACHE
example: cmake .. -DCACHE_INTEGER=true

Build Status

Thanks to GitHub Actions, all commits of this repository are tested. The current build status is: Build Status

About

SOM++ - C++ implementation of the Simple Object Machine Smalltalk

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 56.2%
  • Shell 14.6%
  • Makefile 12.6%
  • C 7.7%
  • Perl 4.1%
  • HTML 2.5%
  • Other 2.3%