Lub

What is Lub ?

Lub is a featherlight domain specific language for dynamic context oriented programming. It extends Pharo with the ability to temporarily change the base of the lookup when a message is sent to an object.

The main problems we investigate through Lub are:
  • Adapting object behavior on a per-instance basis, so that two instances of the same class can behave differently within the same block of code
  • Enabling behavior adaptation at runtime without thread or scope limitations, i.e. once a particular object has entered a specific context, it keeps its new behavior until future context change. The context change may be triggered from an outer thread.

Authors : Steven Costiou, Mickaël Kerboeuf, Alain Plantec
Université de Bretagne-Occidentale, UMR CNRS 6285, Lab-STICC, F-29200 Brest, France

How to install Lub ?

Pre-configured Pharo image

Use a packaged installation of Pharo 5.0 and extract this archive in your Pharo5.0/shared directory. Launch Pharo and select the Lub image.

Open the Lub editor

For now, a dedicated editor is needed to run Lub examples. Open it by evaluating the following:
LUBSimpleEditor example
The following scripts can now be executed with a compile-and-run action (right click).

Lub scripts examples

Lookup evaluation

The fleet of drones and the GPS loss example