Type pretty-print-state-graph and ppsg.

This commit is contained in:
Sergiu Ivanov 2022-09-20 11:48:45 +02:00
parent d5382eacda
commit d5a351d6c1
2 changed files with 23 additions and 0 deletions

View file

@ -36,6 +36,7 @@
Modality Mode dynamics% Dynamics% make-syn make-asyn Modality Mode dynamics% Dynamics% make-syn make-asyn
make-asyn-dynamics make-syn-dynamics pretty-print-state make-asyn-dynamics make-syn-dynamics pretty-print-state
pretty-print-boolean-state pretty-print-state-graph-with pretty-print-boolean-state pretty-print-state-graph-with
pretty-print-state-graph ppsg
) )
(define-type (State a) (VariableMapping a)) (define-type (State a) (VariableMapping a))
@ -681,6 +682,14 @@
(define (e-pprinter/any [x : Any]) (define (e-pprinter/any [x : Any])
(pretty-print-set-sets (assert-type x (Setof (Setof Any))))) (pretty-print-set-sets (assert-type x (Setof (Setof Any)))))
(update-graph gr #:v-func pprinter #:e-func e-pprinter/any)) (update-graph gr #:v-func pprinter #:e-func e-pprinter/any))
(: pretty-print-state-graph (-> Graph Graph))
(define (pretty-print-state-graph gr)
(define (pprinter/any [x : Any])
(pretty-print-state (assert-type x (State Any))))
(pretty-print-state-graph-with gr pprinter/any))
(define ppsg pretty-print-state-graph)
) )
(require 'typed) (require 'typed)

View file

@ -494,6 +494,20 @@ pretty-printed with @racket[pprinter] and the edges with
} }
@defproc[(pretty-print-state-graph [gr Graph]) Graph]{
Calls @racket[pretty-print-state-graph-with] with @racket[pretty-print-state].
}
@defproc[(ppsg [gr Graph]) Graph]{
A shortcut for @racket[pretty-print-state-graph].
}
@section{Inferring interaction graphs} @section{Inferring interaction graphs}
This section provides inference of both unsigned and signed interaction graphs. This section provides inference of both unsigned and signed interaction graphs.