anchor.diff:  License:
   
       AGPL3
  -    
  +
       Copyright Pascal J. Bourguignon 2012 - 2012
  -    
  +
       This program is free software: you can redistribute it and/or modify
       it under the terms of the GNU Affero General Public License as published by
       the Free Software Foundation, either version 3 of the License, or
       (at your option) any later version.
  -    
  +
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU Affero General Public License for more details.
  -    
  +
       You should have received a copy of the GNU Affero General Public License
       along with this program.
       If not, see <http://www.gnu.org/licenses/>
  
positive.code:          ',name))))
  
  
  
  ;; Example:
  ;; 
  ;; (define-state-machine session-dfa
  ;;     :slots   ((session :initarg :session)
  ;;               (timer   :accessor session-dfa-timer))
  ;;     :initial closed
  ;;     :states  ((closed
  ;;                (session-open        () (go-to-state connecting))
  ;;                (session-disconnect  () (logger :client :warn "SESSION-DFA got a SESSION-DISCONNECT while in CLOSED state.")))
  ;;               (connecting
  ;;                (:entry              ()
  ;;                                     (if (perform-open-session session)
  ;;                                         (go-to-state connected)
  ;;                                         (cannot-open-session (session-lo-dfa session))))
  ;;                (cannot-open-session ()
  ;;                                     (let ((delay  (random 20)))
  ;;                                       (logger :client :warn "Cannot connect right now, will try in ~A second~:*~P." delay)
  ;;                                       (go-to-state waiting delay)))
  ;;                (session-open        () (logger :client :warn "SESSION-DFA got a SESSION-OPEN while in CONNECTING state."))
  ;;                (session-close       () (perform-close-session session) (go-to-state closed))
  ;;                (session-disconnect  () (perform-close-session session) (go-to-state waiting (random 20))))
  ;;               (waiting
  ;;                (:entry              (delay)
  ;;                                     (setf timer (add-timer *event-base* (lambda () (session-timeout dfa)) delay :one-shot t)))
  ;;                (:exit               () (remove-timer *event-base* (session-dfa-timer dfa)))
  ;;                (session-timeout     () (go-to-state connecting))
  ;;                (session-close       () (go-to-state closed))
  ;;                (session-disconnect  () (logger :client :warn "SESSION-DFA got a SESSION-DISCONNECT while in WAITING state.")))
  ;;               (connected
  ;;                (:entry              () ;; TODO: activate the protocol FSM
  ;;                                     (receive-bytes session))
  ;;                (session-close       () (perform-close-session session) (go-to-state closed))
  ;;                (session-disconnect  () (perform-close-session session) (go-to-state connecting)))))
  
  ;;;; THE END ;;;;
  
negative.code:            ,@(when documentation `((:documentation ,documentation))))
  
           ;; TODO: add a INITIALIZE-INSTANCE method to let the user initialize the DFA with MAKE-INSTANCE.
  
           (defun ,(intern (with-standard-io-syntax (format nil "MAKE-~A" name)) (or (symbol-package name) *package*))
               ,(append
                 ;; make-dfa takes as mandatory parameters all the slots that have a :initarg
  