Type pretty-print-boolean-state-graph and ppsgb.

This commit is contained in:
Sergiu Ivanov 2022-09-21 00:07:10 +02:00
parent d5a351d6c1
commit 2577d06dbc
2 changed files with 20 additions and 1 deletions

View file

@ -36,7 +36,7 @@
Modality Mode dynamics% Dynamics% make-syn make-asyn
make-asyn-dynamics make-syn-dynamics pretty-print-state
pretty-print-boolean-state pretty-print-state-graph-with
pretty-print-state-graph ppsg
pretty-print-state-graph ppsg pretty-print-boolean-state-graph ppsgb
)
(define-type (State a) (VariableMapping a))
@ -690,6 +690,14 @@
(pretty-print-state-graph-with gr pprinter/any))
(define ppsg pretty-print-state-graph)
(: pretty-print-boolean-state-graph (-> Graph Graph))
(define (pretty-print-boolean-state-graph gr)
(define (pprinter/any [x : Any])
(pretty-print-boolean-state (assert-type x (State Any))))
(pretty-print-state-graph-with gr pprinter/any))
(define ppsgb pretty-print-boolean-state-graph)
)
(require 'typed)

View file

@ -506,6 +506,17 @@ A shortcut for @racket[pretty-print-state-graph].
}
@defproc[(pretty-print-boolean-state-graph [gr Graph]) Graph]{
Calls @racket[pretty-print-state-graph-with] with @racket[pretty-print-boolean-state].
}
@defproc[(ppsgb [gr Graph]) Graph]{
A shortcut for @racket[pretty-print-boolean-state-graph].
}
@section{Inferring interaction graphs}