diff --git a/generic.rkt b/generic.rkt index 2385937..0571235 100644 --- a/generic.rkt +++ b/generic.rkt @@ -77,10 +77,18 @@ ;;; A poor man's fallback for dds-step-one-annotated. (define (fallback-dds-step-one-annotated dds s) (dds-step-one-annotated dds s)) +;;; Run dds-step-one-annotated, but then discard the annotations. +;;; This is a fallback for dds-step-one. +(define (fallback-dds-step-one dds state) + (for/set ([annotation-state (dds-step-one-annotated dds state)]) + (match annotation-state + [(cons a s) s]))) + ;;; A discrete dynamical system. (define-generics dds ;; Given a dds and a state, produce the next states of the dds. - ;; This method has no fallback. + ;; This method falls back to calling dds-step-one-annotated, + ;; discarding the annotations. (dds-step-one dds state) ;; Given a dds and a state, produce the next states paired with some ;; annotation. Typical usage would include including the @@ -113,6 +121,7 @@ #:defined-predicate dds-implements? #:fallbacks [(define dds-step fallback-dds-step) + (define dds-step-one fallback-dds-step-one) ;; Run fallback-dds-build-state-graph-edges with an infinite range, ;; which will make it stop only when it has explored all the state