The Mate Reflective VM implemented in top of the TruffleSOM VM.
Clone or download
Pull request Compare This branch is 974 commits ahead, 124 commits behind SOM-st:master.
charig Finish port to Java 11. Simplify running script. Note it become only …
…compatible with Java > 11. Also fix system initialization. Was working only when using tests as entrypoint
Latest commit c808769 Oct 2, 2018
Permalink
Failed to load latest commit information.
.settings Added checkstyle and autoformat Jun 26, 2017
MateExtensions/som Fix bug. When method dispatch chains became generic because the limit… Sep 3, 2018
core-lib @ 644b43e Remove unnecesary valid universe assumption. Update core lib (petitpa… Sep 7, 2018
libs Removed websocket submodule. Compilation of the module is failing and… Sep 12, 2018
src Finish port to Java 11. Simplify running script. Note it become only … Oct 2, 2018
tests Java 11 start considering cap for cp??? Sep 3, 2018
tools/tests/dym Port and adapt to Mate, SOMns testing script for dynamic metrics Aug 11, 2016
.antlr-eclipse Commit official version of SOM (Java) Mar 31, 2013
.checkstyle Update checkstyle from SOMns Apr 15, 2018
.checkstyle_checks.xml Update checkstyle from SOMns Apr 15, 2018
.checkstyle_suppressions.xml Add xmlns to build for fixing bug with --release 8 compilearg. Apr 16, 2018
.classpath Finish port to Java 11. Simplify running script. Note it become only … Oct 2, 2018
.factorypath Configure environment for working with Truffle version 0.33 Apr 8, 2018
.gitattributes Add git attributes Apr 15, 2018
.gitignore Configure environment for working with Truffle version 0.33 Apr 8, 2018
.gitmodules Removed websocket submodule. Compilation of the module is failing and… Sep 12, 2018
.graal-git-rev Update graal to 77feea4fe00c Jan 4, 2016
.project Apply checkstyle and autoformatting Jun 26, 2017
.travis.yml Change Travis. Support only for jdk > 11 Sep 3, 2018
AUTHORS Updated AUTHOR file Jun 28, 2013
Examples Restored directory structure by adding symlinks Sep 25, 2013
LICENSE Commit official version of SOM (Java) Mar 31, 2013
Makefile Added Makefile for the buildbot Dec 10, 2013
README.md Update README.md Nov 16, 2016
Smalltalk Restored directory structure by adding symlinks Sep 25, 2013
TestSuite Restored directory structure by adding symlinks Sep 25, 2013
aot.sh Ahead of Time Compilation Jul 1, 2017
benchmarks.conf configuration of new benchmarks Dec 11, 2015
build.xml Remove unneeded sm from build Sep 12, 2018
oficial Add link to run with the graal oficial vm Jun 2, 2016
runBenchs.sh more cp Nov 2, 2017
som Finish port to Java 11. Simplify running script. Note it become only … Oct 2, 2018

README.md

TruffleMate - A Reflective Execution Environment implemented using Oracle's Truffle Framework

Introduction

Mate is an approach for building Virtual Machines that expose their whole structure and behavior to the language level Mate. A MOP then enables to adapt reflectively the Virtual Machine behavior at run time. TruffleMate is an implementation of the Mate approach in Truffle that started as a branch from the TruffleSOM VM.

This repository contains an extension to the Truffle-based implementation of SOM, including SOM's standard library, a number of examples and the Mate v1 Metaobject protocol.

Moreover, TruffleMATE implements an optimization model for making the VM not only reflective, but also efficient, presenting similar performance results than standard VMs when considering peak performance.

Obtaining and Running TruffleMate

To checkout the code:

git clone https://github.com/charig/TruffleMate.git

Then, TruffleMate can be build with Ant:

ant jar or ant compile

Afterwards, the tests can be executed with:

./som -G -cp Smalltalk:TestSuite TestHarness

A simple Hello World program is executed with:

./som -G -cp Smalltalk:Examples Hello

The --mate -activateMate options runs the system with the Mate MOP enabled. Note that the classpath must be also extended with the MOP classes found under Smalltalk/MATE. The -G runs TruffleMATE in interpreter mode. For running in combination with GRAAL install graal and remove the -G option.

When working on TruffleMate, for instance in Eclipse, it is helpful to download the source files for Truffle as well:

ant develop

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.

TruffleMate Implementation

TruffleSOM implements a file-based Smalltalk with most of the language features common to other Smalltalks. This includes support for objects, classes, methods, closures/blocks/lambdas, non-local returns, and typical reflective operations, e.g., method invocation or object field access.

The implementation of TruffleSOM is about 3500 lines of code in size and is a concise but comprehensive example for how to use the Truffle framework to implement standard language features.

Its parser creates a custom AST that is geared towards representing the executable semantics. Thus, we did not include AST nodes that have structural purpose only. Instead, we concentrated on the AST nodes that are relevant to express Smalltalk language semantics.

Currently TruffleSOM demonstrates for instance:

Build Status

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