Skip to content
Max Leuthäuser edited this page Jan 17, 2018 · 9 revisions

Welcome to the SCROLL wiki!

This place is the central source of information for users and developers of SCROLL.

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.

val stan = Person("Stan")
val brian = Person("Brian")

val accForStan = new Account(Currency(10.0, "USD"))
val accForBrian = new Account(Currency(0, "USD"))

implicit var dd: DispatchQuery = DispatchQuery.empty

new Bank {
  stan play new Customer
  brian play new Customer
  accForStan play new CheckingsAccount
  accForBrian play new SavingsAccount

  +stan addAccount accForStan
  +brian addAccount accForBrian

  info("### Before transaction ###")
  info("Balance for Stan: " + accForStan.balance)
  info("Balance for Brian: " + accForBrian.balance)

  val transaction = new Transaction(Currency(10.0, "USD"))

  accForStan play new transaction.Source
  accForBrian play new transaction.Target

  transaction partOf this
  transaction play new TransactionRole execute()

  info("### After transaction ###")
  info("Balance for Stan: " + accForStan.balance)
  info("Balance for Brian: " + accForBrian.balance)
  info("Brian is playing the Customer role? " + (+brian).isPlaying[Customer])

  +stan listBalances()
  +brian listBalances()
}

Overview

Users Developers
The starting point if you want to use SCROLL for role-based programming Set-up guide and technical documentation for developers.

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.

License

The FRaMED project is licensed under the GNU Lesser General Public License v3.0.

Clone this wiki locally