Skip to content
Max Leuthäuser edited this page Aug 5, 2015 · 9 revisions

Welcome to the SCROLL wiki!

Motivation

Today's software systems always need to anticipate changing context. New business rules and functions should be implemented and adapted. The concept of role modeling and programming is frequently discussed for decades across many scientific areas. It allows the modeling and implementation of context dependent information w.r.t. dynamically changing context. Hence future software infrastructures have the intrinsic need to introduce such a role concept. Until now the implementation with existing object oriented languages always requires the generation of a specific runtime environment and management code. The expressiveness of these languages is not able to cope with essential role-specific features, such as true delegation or binding roles dynamically. SCROLL presents how a relatively simple implementation with Scala based on its Dynamic trait allows to augment an object's type at runtime implementing dynamic (compound-) role types. It enables role-based implementations that lead to more reuse and better separation of concerns.

Background Information

Currently, only a handful, mostly unusable (e.g. because they are not providing a running compiler or have been abandoned by the developer) role-based programming languages exists. The field of research is highly fragmented, due to the fact that every research area relies on a different set of role-related features. Therefore it is necessary to establish a basic role concept at runtime and build an appropriate tooling around it to make it more useful for developers. A prototypic Scala implementation for roles (SCROLL - SCala ROLes Language) was developed as library approach, enabling the user to specify roles and context dependent behavior.

Technical Information

Internally the following two technical aspects are the most considerable ones. First, making use of the Dynamic Trait. All calls to role functions (i.e. functions that are not natively available on the player object) are translated by the compiler using certain rules. These are adjustable resulting in customizable, dynamic role dispatch. Second, applying implicit conversions. Scala’s implicit classes allow for packing in player and role objects to compound dynamic types. All important role features are exposed this way, e.g. adding, removing and transferring roles or accessing role functions and attributes.

Developing Role-based Application with SCROLL

Implementing role-based applications with SCROLL requires knowledge about how to translate role-specific features into actual code. This page may help.

Clone this wiki locally