diff --git a/bn.rkt b/bn.rkt index 5e523e3..d318804 100644 --- a/bn.rkt +++ b/bn.rkt @@ -10,6 +10,11 @@ (provide Variable State UpdateFunc Network update make-state make-bn) + +;;; ================= +;;; Basic definitions +;;; ================= + (define-type Variable Symbol) ;;; A state of a Boolean network is a mapping from the variables of the @@ -45,3 +50,18 @@ (: make-bn (-> (Listof (Pairof Variable UpdateFunc)) Network)) (define (make-bn funcs) (make-hash funcs)) + + +;;; ========================================= +;;; Syntactic description of Boolean networks +;;; ========================================= + +;;; An UpdateFuncForm is any form which can appear as a body of a +;;; Boolean function and which can be evaluated with eval. For +;;; example, '(and x y (not z)). +(define-type UpdateFuncForm Any) + +;;; A Boolean network form is a mapping from its variables to the +;;; forms of their update functions. +(define-type NetworkForm (HashTable Variable UpdateFuncForm)) +