From: Repenning Alexander
Subject: Code Walker
Date: 
Message-ID: <8456@boulder.Colorado.EDU>
I'm looking for a code walker to replace read/write references to certain variables by a read/write access functions, e.g. something like:

(foo a b) -> (foo (get-value-function 'a) (get-value-function 'b))
(setf a new-value) ->  (set-value-function 'a new-value) or
                       (setf (set-value-function 'a) new-value)

The code walker should not fall into traps like replacing any occurrence of variables introduced within an nested lexical scope, e.g.

(progn
  (bar a)
  (dolist (a ...)
    (foo a)))

should not end up in:

(progn
  (bar (get-value-function 'a))
  (dolist (a ...)
    (foo (get-value-function 'a)))

Any code or hint sent to ·····@boulder.colorado.edu would be appreciated very much.


    Alex