diff --git a/networks.rkt b/networks.rkt index 48640ee..d8842ff 100644 --- a/networks.rkt +++ b/networks.rkt @@ -13,7 +13,10 @@ (struct-out network) Network make-same-domains make-boolean-domains make-boolean-network - make-01-domains make-01-network update) + make-01-domains make-01-network update + + UpdateFunctionForm + ) (define-type (State a) (VariableMapping a)) (define-type (UpdateFunction a) (-> (State a) a)) @@ -113,6 +116,8 @@ #hash((x1 . #f) (x2 . #f))) (check-equal? (update bn (hash 'x1 #f 'x2 #f) '(x1 x2)) #hash((x1 . #f) (x2 . #t))))) + + (define-type UpdateFunctionForm Any) ) (require 'typed) @@ -281,9 +286,6 @@ ;;; Syntactic description of networks ;;; ================================= -;;; An update function form is any form which can appear as a body of -;;; a function and which can be evaluated with eval. For example, -;;; '(and x y (not z)) or '(+ 1 a (- b 10)). (define update-function-form? any/c) ;;; A network form consists of a mapping from variables to the forms diff --git a/scribblings/networks.scrbl b/scribblings/networks.scrbl index 6d89386..2c4d797 100644 --- a/scribblings/networks.scrbl +++ b/scribblings/networks.scrbl @@ -194,6 +194,21 @@ Given a state @racket[s] updates all the variables of @racket[network] from @section{Syntactic description of networks} +@deftype[UpdateFunctionForm]{ + +An update function form is any form which can appear as a body of a function +and which can be evaluated with @racket[eval]. + +@ex[ +(ann '(and x y (not z)) UpdateFunctionForm) +(ann '(+ 1 a (- b 10)) UpdateFunctionForm) +] + +@racket[UpdateFunctionForm] is a synonym of @racket[Any]. + +} + + @section{Inferring interaction graphs} This section provides inference of both unsigned and signed interaction graphs.