diff --git a/rs.rkt b/rs.rkt index 96cc2ec..16e0c54 100644 --- a/rs.rkt +++ b/rs.rkt @@ -173,9 +173,15 @@ (dds-build-state-graph-annotated (dynamics rs) (set (state (set) contexts)))) +;;; Pretty-prints the context and the current result of a state of the +;;; reaction system. +(define/match (pretty-print-state st) + [((state res ctx)) + (format "C:~a\nD:{~a}" (pretty-print-set-sets ctx) (pretty-print-set res))]) + ;;; Pretty prints the state graph of a reaction system. (define (pretty-print-state-graph sgr) - (update-graph sgr #:e-func pretty-print-set-sets)) + (update-graph sgr #:v-func pretty-print-state #:e-func pretty-print-set-sets)) ;;; A shortcut for pretty-print-state-graph. (define-syntax-rule (ppsg sgr) (pretty-print-state-graph sgr))