anchor.diff:      :initarg :fn
       :initform (error ":action missing")
       :accessor fn-of
  -    :type function))
  +    :type function)))
   
   
  -(defclass with-behaviour ()
  +(defclass object (with-id)
  +  nil)
  +
  +
  +(defclass actor (object)
     ((events
       :initform (list)
       :accessor events-of
       :type list)))
   
   
  -(defclass object (with-id)
  -  nil)
  +(defclass complex-actor (actor)
  +  ((components
  +    :initform (list)
  +    :accessor components-of
  +    :type list)))
   
   
   
  -(defmethod imminent-event ((obj object))
  -  (values :never nil))
  +(defparameter *out->in* (make-hash-table))
  +
  +(defparameter *in->obj* (make-hash-table))
   
   
   
  -(defmethod imminent-event ((obj with-behaviour))
  -  (let ((ev (first (events-of obj))))
  -    (values (time-of ev) (fn-of ev))))
  +(defmethod no-op ((obj object))
  +  obj)
   
   
  -(defmethod evolve ((obj object)))+(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))
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: 
  (deftype time-type ()
    '(or (integer 0)
      (member nil)))
  
  
  (defclass with-id ()
  