/mrsct

A variation of mrsc based on traits + self-types

Primary LanguageScala

MRSC is a toolkit for rapid development and implementation of multi-result supercompilers.

https://github.com/ilya-klyuchnikov/mrsc

MRSCT is a variation of MRSC whose purpose is to try a design based on a combination of traits + self-types.

The design of MRSC, at some places, is based on generating "commands" represented as first-order entities, which are then have to be executed by explicit interpreters (each interpreter being a monolitic match-expression.

In MRSCT the generation of "commands" is replaced with direct calls to methods implementing the "commands".

The purposes of the design based on traits + self-types are the following.

  • Interfaces should be separated from their implementations.

  • There should be possible to have several implementations for an interface.

  • The interfaces should be "opaques" in the following sense. Schematically speaking, MRSC is based on a hierarchy of levels: L0, L1, ..., where the operations at a level Lk+1 are definded in terms of some operations defined at the level Lk. It is desirable that the operations defined at the level Lk-1 be invisible at the level Lk+1. In other words, the level Lk+1 should be only "aware" of the level Lk, but not of Lk-1.