(via lemonodor)
Chris Double discusses his port of the Screamer library to Corman Lisp.
Screamer is a library for Common Lisp that provides support for non-deterministic programming. This includes backtracking, undoable side effects and constraint programming...
I'd heard of Screamer but had always thought it to be a very difficult product which would be hard to port. In fact, it was almost trivial. It's all done with macros. Basically it walks the code you write using macros looking for non-deterministic function calls. When these are found it converts that code to continuation-passing-style and uses these continuations to implement backtracking, etc. It's very clever but you don't need to know anything about the implementation to use it.
P.S
'undoable' is a funny word. Reading it you must wonder whether the intention is to say 'un-doable' or 'undo-able'. Oh, well.
Posted to general by Ehud Lamm on 3/18/03; 11:13:27 AM
|