anchor.diff:  
   (deftype time-type ()
     '(or (integer 0)
  -    (member :never)))
  +    (member nil)))
   
   
   (defclass with-id ()
  
positive.code: ;; TODO
  
  
  (in-package :de-sim)
  
  
  (defgeneric evolve (obj now)
    (:documentation "obj can execute its event and evolve
    accordingly. Returns the new version of obj."))
  
  
  (defgeneric imminent-event (obj)
    (:documentation "Return the time of the next event of obj."))
  
  
  (defgeneric i/o-connect (output input)
  
negative.code:     :initarg :fn
      :initform (error ":action missing")
      :accessor fn-of
      :type function)))
  
  
  (defclass object (with-id)
    nil)
  
  
  (defclass actor (object)
    ((events
      :initform (list)
      :accessor events-of
      :type list)))
  
  
  (defclass complex-actor (actor)
    ((components
      :initform (list)
      :accessor components-of
      :type list)))
  
  
  
  (defparameter *out->in* (make-hash-table))
  
  (defparameter *in->obj* (make-hash-table))
  
  
  
  (defmethod no-op ((obj object))
    obj)
  
  
  (defmethod imminent-event ((obj object) &optional (max-time nil))
    (values #'no-op nil))
  
  
  (defmethod imminent-event ((ac actor) &optional (max-time nil))
    (let ((ev (first (events-of ac))))
      (with-accessors ((ti time-of) (fn fn-of)) ev
        (if (or (null max-time)
  	      (< ti max-time))
  	  (values fn ti)
  	  (call-next-method)))))
  
  
  (defmethod imminent-event ((ca complex-actor) &optional (max-time nil))
    (
  
  
  (defmethod evolve ((obj object))
    (funcall (imminent-event obj) obj))