Flavors Meta-Class System (FMCS) for Demonic Metaprogramming in Common Lisp, an alternative to CLOS+MOP, restored from the CMU AI Repository.
This is the Flavors Meta-Class System (FMCS) for Demonic Metaprogramming in Common Lisp, an alternative to CLOS+MOP. It has been restored from the CMU AI Repository, alongside Jürgen Walther's BABYLON AI Workbench system, from which the sources were extracted.
The following tasks are required to complete the restoration of FMCS:
- Extract FMCS from BABYLON
- Clean up original source-code
- Translate German comments to English
- Restore and update original documentation
- Generate API Documentation in Markdown format
- Generate unit tests
TODO: give a brief overview of Demonic Metaprogramming, and how it differs from the MOP, covering the following topics:
- Modelling software by Control Flow and Data Flow
- SSA-Form and Phi-Functions as Nondeterminstic Choice
- Angelic and Demonic Semantics of Nondeterministic Choice
- Favoring Demonic Semantics for Metaprogramming
- Demonic Nondeterminism over Unified Control/Data Flow Graph
- Demon Methods versus Generic Functions
- The Flavors System versus CLOS
- The Flavors Meta-Class System (FMCS) versus the MOP
- Demonic Semantics of Backquote Syntax in Macroexpansion
- Defining Flavor Classes
- Defining Flavor Metaclasses
- Defining Mixins
- Defining Demon Methods
For SBCL, FMCS relies on
FARE-QUASIQUOTE to macroexpand backquote syntax in keeping with idiomatic conventions followed by all other Common Lisp implementations.
When using FMCS for your own projects, you will need to conditionally depend on
FARE-QUASIQUOTE-EXTRAS for SBCL in your ASDF systems, and use its named-readtable in every source-file where FMCS forms are used to ensure correct macroexpansion at every level.
For example, in your ASDF system definition:
(defsystem my-project ... :depends-on ((:feature :sbcl fare-quasiquote-extras) fmcs) :components ((:file "package") (:file "my-project")))
And in your source-files:
(in-package :my-project) #+sbcl (named-readtables:in-readtable :fare-quasiquote) ... #+sbcl (named-readtables:in-readtable :standard) ;; eof
Alternatively, as the documentation for
FARE-QUASIQUOTE suggests, you can use ASDF's
:around-compile hook to automatically wrap all source-files in the appropriate
- "the Phoeron" Colin J.E. Lupton
- Jürgen Walther
Including contributions by, and code based on the work of:
- Pierre Cointe
- Thomas Christaller
- Harry Bretthauer
- Eckehard Gross
- Jürgen Kopp
Copyright © 1984–2023, the Authors. Restrored from the CMU AI Repository and released under the MIT License. Please see the LICENSE file for details.
Restoration Note: as explicitly noted in the original source-code, FMCS was released by Jürgen Walthers under similar terms as the X Windows System, X11, and the MIT License is the closest modern, standardized FOSS equivalent.