Skip to content

FMCS: the Flavors Meta-Class System for Common Lisp and alternative to CLOS+MOP, restored from the CMU AI Repository

License

Notifications You must be signed in to change notification settings

thephoeron/fmcs

Repository files navigation

FMCS

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.

TODO

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

Demonic Metaprogramming

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

Basic Usage

  • Defining Flavor Classes
  • Defining Flavor Metaclasses
  • Defining Mixins
  • Defining Demon Methods

SBCL Users

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 NAMED-READTABLES:IN-READTABLE forms.

Authors

Including contributions by, and code based on the work of:

  • Pierre Cointe
  • Thomas Christaller
  • Harry Bretthauer
  • Eckehard Gross
  • Jürgen Kopp

License

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.

About

FMCS: the Flavors Meta-Class System for Common Lisp and alternative to CLOS+MOP, restored from the CMU AI Repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published