diff --git a/networks.rkt b/networks.rkt index 344fc53..447c187 100644 --- a/networks.rkt +++ b/networks.rkt @@ -20,7 +20,9 @@ [struct dynamics ([network network?] [mode mode?])] [struct network ([functions (hash/c variable? procedure?)] - [domains domain-mapping/c])]) + [domains domain-mapping/c])] + [struct network-form ([forms variable-mapping?] + [domains domain-mapping/c])]) ;; Functions (contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)] [make-state (-> (listof (cons/c symbol? any/c)) state?)] @@ -236,9 +238,10 @@ ;;; '(and x y (not z)) or '(+ 1 a (- b 10)). (define update-function-form? any/c) -;;; A Boolean network form is a mapping from its variables to the -;;; forms of their update functions. -(define network-form? variable-mapping?) +;;; A network form consists of a mapping from variables to the forms +;;; of their update functions, together with a mapping from its +;;; variables to its update functions. +(struct network-form (forms domains)) ;;; Build an update function from an update function form. (define (update-function-form->update-function form)