From ab9f808c96e6e96519692131de3743bfb5ef0456 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sat, 15 Feb 2020 13:32:54 +0100 Subject: [PATCH] dds/bn: Start. --- bn.rkt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 bn.rkt diff --git a/bn.rkt b/bn.rkt new file mode 100644 index 0000000..936fc12 --- /dev/null +++ b/bn.rkt @@ -0,0 +1,21 @@ +#lang typed/racket + +;;; dds/bn + +;;; This module provides some quick definitions for running Boolean +;;; networks. A Boolean network is a set of Boolean variables which +;;; are updated according to their corresponding update functions. +;;; The variables to be updated at each step are given by the mode. + + +;; A state of a Boolean network is a mapping from the variables of the +;; network to their Boolean values. +(define-type State (HashTable Symbol Boolean)) + +;; An update function is a Boolean function computing a Boolean value +;; from the given state. +(define-type UpdateFunc (-> State Boolean)) + +;; A Boolean network is a mapping from its variables to its update +;; functions. +(define-type Network (HashTable Symbol UpdateFunc))