Refine the types of build-state-graph* and build-state-graph*/annotated.
This commit is contained in:
parent
d7f4d2d732
commit
857b33ad71
2 changed files with 7 additions and 5 deletions
|
@ -29,11 +29,10 @@
|
|||
(: build-state-graph/annotated (-> (Listof State) Graph))
|
||||
(define/abstract/error (build-state-graph/annotated sts))
|
||||
|
||||
(: build-state-graph* (-> (Listof State) (U Integer 'full) Graph))
|
||||
(: build-state-graph* (-> (Listof State) (U Positive-Integer 'full) Graph))
|
||||
(define/abstract/error (build-state-graph* sts nsteps))
|
||||
|
||||
(: build-state-graph*/annotated (-> (Listof State) (U Integer 'full) Graph))
|
||||
;; TODO: Integer -> Positive-Integer
|
||||
(: build-state-graph*/annotated (-> (Listof State) (U Positive-Integer 'full) Graph))
|
||||
(define/public (build-state-graph*/annotated sts nsteps)
|
||||
(define (all-steps-done? k)
|
||||
(if (equal? nsteps 'full)
|
||||
|
|
|
@ -87,7 +87,9 @@ step/annotated].
|
|||
|
||||
}
|
||||
|
||||
@defmethod[(build-state-graph* [sts (Listof State)] [nsteps (U Integer 'full)]) Graph]{
|
||||
@defmethod[(build-state-graph* [sts (Listof State)]
|
||||
[nsteps (U Positive-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]
|
||||
|
@ -98,7 +100,8 @@ This method falls back to exploring the state graph with @method[dds% step].
|
|||
|
||||
}
|
||||
|
||||
@defmethod[(build-state-graph*/annotated [sts (Listof State)] [nsteps Integer])
|
||||
@defmethod[(build-state-graph*/annotated [sts (Listof State)]
|
||||
[nsteps (U Positive-Integer 'full)])
|
||||
Graph]{
|
||||
|
||||
Given a set of starting states and a number @racket[nsteps] of steps to run,
|
||||
|
|
Loading…
Reference in a new issue