sbn-interaction-graph: Use zero-edges and declare it in the contract.

This commit is contained in:
Sergiu Ivanov 2021-08-04 17:33:17 +02:00
parent ab2c37125c
commit 38660cc0a5

View file

@ -132,7 +132,8 @@
[tbn-interaction-graph (->* (tbn?) (#:zero-edges boolean?) [tbn-interaction-graph (->* (tbn?) (#:zero-edges boolean?)
graph?)] graph?)]
[pretty-print-tbn-interaction-graph (-> graph? graph?)] [pretty-print-tbn-interaction-graph (-> graph? graph?)]
[sbn-interaction-graph (-> sbn? graph?)]) [sbn-interaction-graph (->* (sbn?) (#:zero-edges boolean?)
graph?)])
;; Predicates ;; Predicates
(contract-out [variable? (-> any/c boolean?)] (contract-out [variable? (-> any/c boolean?)]
[state? (-> any/c boolean?)] [state? (-> any/c boolean?)]
@ -1777,7 +1778,7 @@
;;; the interaction graph. ;;; the interaction graph.
(define (sbn-interaction-graph sbn (define (sbn-interaction-graph sbn
#:zero-edges [zero-edges #t]) #:zero-edges [zero-edges #t])
(update-graph (tbn-interaction-graph sbn) (update-graph (tbn-interaction-graph sbn #:zero-edges zero-edges)
#:v-func (match-lambda #:v-func (match-lambda
[(cons var _) var]))) [(cons var _) var])))