From ecc57a34fcb71d276c63083a13574f20a332fcd6 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sat, 10 Sep 2022 18:55:03 +0200 Subject: [PATCH] Generalize the type of build-state-graph* and build-state-graph*/annotated. --- dynamics.rkt | 4 ++-- scribblings/dynamics.scrbl | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dynamics.rkt b/dynamics.rkt index 877f6b5..f50e70b 100644 --- a/dynamics.rkt +++ b/dynamics.rkt @@ -29,9 +29,9 @@ (: build-state-graph/annotated (-> (Listof State) Graph)) (define/abstract/error (build-state-graph/annotated sts)) - (: build-state-graph* (-> (Listof State) Integer Graph)) + (: build-state-graph* (-> (Listof State) (U Integer 'full) Graph)) (define/abstract/error (build-state-graph* sts nsteps)) - (: build-state-graph*/annotated (-> (Listof State) Integer Graph)) + (: build-state-graph*/annotated (-> (Listof State) (U Integer 'full) Graph)) (define/abstract/error (build-state-graph*/annotated nsteps sts)) )) diff --git a/scribblings/dynamics.scrbl b/scribblings/dynamics.scrbl index 15f9030..68595e9 100644 --- a/scribblings/dynamics.scrbl +++ b/scribblings/dynamics.scrbl @@ -87,10 +87,12 @@ step/annotated]. } -@defmethod[(build-state-graph* [sts (Listof State)] [nsteps Integer]) Graph]{ +@defmethod[(build-state-graph* [sts (Listof State)] [nsteps (U Integer 'full)]) Graph]{ Given a set of starting states and a number @racket[nsteps] of steps to run, -produces the state graph reachable from the starting states @racket[nsteps] steps. +produces the state graph reachable from the starting states @racket[nsteps] +steps. If @racket[nsteps] is @racket['full], constructs the full state +graph instead. This method falls back to exploring the state graph with @method[dds% step]. @@ -101,7 +103,8 @@ This method falls back to exploring the state graph with @method[dds% step]. Given a set of starting states and a number @racket[nsteps] of steps to run, produces the labelled state graph reachable from the starting states -@racket[nsteps] steps. +@racket[nsteps] steps. If @racket[nsteps] is @racket['full], constructs the +full state graph instead. This method falls back to exploring the state graph with @method[dds% step/annotated].