Closer Project.
Hot topics: ContextL
  Navigation.
  • Main
  • History
  • Feature Tests
  • Closer to MOP
  • ContextL
  • AspectL
  • Mailing Lists
  • Downloads
  •   ContextL.
    ContextL is a CLOS extension for Context-oriented Programming (COP). It was actually the first language extension that explicitly supports COP, and support for COP in other languages was added later on.

    Currently, there is no documentation available, but you can find some test cases in the distribution and an introduction to ContextL's features in an overview paper and a paper about its implementation. There is also a paper about some aspects of ContextL's metaobject protocol, and a recent general overview article about COP contains even more ContextL examples.

    Highlights of version 0.52:
    • There was a problem with spurious system definitions which made asdf-install choke, but which is now fixed.
    • Added a necessary option to two internal metaclasses to make the code compatible with an upcoming version of SBCL.

    Highlights of version 0.51:
    • Ensure-layered-method now accepts function designators instead of just function names, due to Drew Crampsie.
    • Replaced some calls to subtypep to the new subclassp function of Closer to MOP, for more robust metalevel behavior.

    Highlights of version 0.50:
    • Version 0.50 is another version before an upcoming 1.0 release. This became necessary because previous versions of ContextL were not thread-safe. This has now been fixed in version 0.50.
    • Support for MCL was dropped, and OpenMCL was replaced by Clozure Common Lisp.
    • Added :in as an alternative for :in-layer in the various define-layered-xyz macros.
    • Added new functions active-layers and (setf current-layer-context).
    • Added a garbage collector for layer caches, such that redefinition of layers or certain methods in the ContextL MOP have an effect.
    • Simplified mapping of layer-related names to internal names, which should also make things easier to read when debugging ContextL programs.

    Highlights of version 0.40:
    • Version 0.40 aims to be feature-complete with regard to the feature set of the upcoming 1.0 release. The goal is to have it tested extensively and to write a documentation of the current features and the API of ContextL before version 1.0 is eventually released.
    • Several features have been added in 0.4, and some parts of the API have changed. The major changes are listed below.
    • The functions activate-layer and activate-layer-using-class have been renamed to adjoin-layer and adjoin-layer-using-class, and deactivate-layer and deactivate-layer-using-class have been renamed to remove-layer and remove-layer-using-class. The new names reflect better what these functions actually do.
    • The functions funcall-with-layers and apply-with-layers have been replaced with the (different) funcall-with-layer-context and apply-with-layer-context.
    • The deflayer macro doesn't take a :layer-class option anymore, but instead a :metaclass option. This reflects that layers are in fact represented as CLOS classes.
    • Added the function current-layer-context. This captures the set of currently active layers, which can later be reinstalled with funcall-with-layer-context and apply-with-layer-context.
    • Added several readers for ContextL's metaclasses: layered-function-definer, layered-function-argument-precedence-order, layered-function-lambda-list, layered-method-lambda-list, layered-method-specializers, layered-method-layer, slot-definition-layered-readers, slot-definition-layered-writers.

    Highlights of version 0.32:
    • Fixed bugs in the implementation of special classes / special slots.

    Highlights of version 0.31:
    • Added an implicit block to define-layered-method so return-from works as expected.
    • Fixed a bug in some LOOP idioms. (Thanks to Attila Lendvai.)
    • Added two versions of the figure editor example from the JMLC'06 paper to the test suite.
    • Several bug fixes.

    Highlights of version 0.3:
    • Added rudimentary support for ECL.
    • Added metacircular layer activation through ACTIVATE-LAYER-USING-CLASS and DEACTIVATE-LAYER-USING-CLASS.
    • Added WITH-SPECIAL-INITARGS and WITH-SPECIAL-INITARGS* macros for rebinding special slots based on their initargs.
    • WITH-ACTIVE-LAYERS and WITH-ACTIVE-LAYERS* now process initargs for layer-specific special slots such that they can be rebound at the same time when the respective layer is activated..
    • Improved support for shared special slots.
    • Added CALL-NEXT-LAYERED-METHOD for more convenient super calls in layered methods.
    • Added singleton classes. Layers are singleton and internally represented as singleton classes, but the notion of a singleton class is useful in itself, so ContextL provides this as a separate feature.
    • Improved and added several utility functions.
    • Added test cases and benchmarks.
    • Fixed several bugs and made several improvements.

    Highlights of version 0.2:
    • When rebinding special places, it is now checked whether they actually contain special symbols, so this is now a safe operation. This can be tweaked to omit the check for improved performance.
    • Improved parsing of layered methods: The :METHOD option in DEFINE-LAYERED-FUNCTION is now parsed and processed correctly. Furthermore, one can now optionally give a name to the otherwise anonymous layer parameter. This is useful for calling CALL-NEXT-METHOD with changed parameters.
    • Added a new namespace for layers. Before, their names could accidentally clash with class names.
    Currently, the following Common Lisp implementations are supported:
    • Allegro Common Lisp 8.1 Enterprise Edition.
    • CLisp 2.47
    • Clozure Common Lisp 1.3
    • CMU Common Lisp 19f
    • LispWorks 5.1.1, Personal Edition
    • LispWorks 5.1.2, Professional Edition
    • SBCL 1.0.29
    There is also very rudimentary support for ECL 0.9i. All tests have been performed on Mac OS X 10.5.7 (Intel).

    The following implementations were supported in the past:
    • Allegro Common Lisp 7.0 & 8.0 Enterprise Editions.
    • CLisp from 2.35 onward
    • Clozure Common Lisp 1.2
    • CMU Common Lisp 19c-e
    • LispWorks 4.3 & 4.4, Personal and Professional Editions
    • LispWorks 5.0.1, 5.0.2, 5.1, Personal and Professional Editions
    • Macintosh Common Lisp 5.1
    • OpenMCL 1.0
    • SBCL from 0.9.16 onward (except version 1.0.0)
    The respective code conditionalizations are still in the source files, so there is a good chance that they still work, but there is no garantuee that this is the case, and active work for these implementations has been discontinued.

    This project was partially funded by the Institute for the Promotion of Innovation through Science and Technology in Flanders (IWT-Vlanderen) from 2005-2008.
    Powered by LML!
      (c) 2005 - 2009 Pascal Costanza. Original site design by Antipop.