Start migrating networks to Typed Racket.

This commit is contained in:
Sergiu Ivanov 2022-04-27 00:10:13 +02:00
parent cdcee66b7c
commit 85566d7479
2 changed files with 36 additions and 10 deletions

View File

@ -1,14 +1,18 @@
#lang racket
;;; dds/networks
(module typed typed/racket
(require "utils.rkt" "functions.rkt"
typed/graph racket/random)
(provide
State)
(define-type (State a) (VariableMapping a))
)
(require 'typed)
(provide)
;;; This module provides some quick definitions for and analysing
;;; network models. A network is a set of variables which are updated
;;; according to their corresponding update functions. The variables
;;; to be updated at each step are given by the mode.
;;;
;;; This model can generalise Boolean networks, TBANs, multivalued
;;; networks, etc.
(require (except-in "utils.rkt" lists-transpose) (submod "utils.rkt" untyped)
"generic.rkt" "functions.rkt"

View File

@ -1,9 +1,24 @@
#lang scribble/manual
@(require (for-label racket graph "../networks.rkt" "../utils.rkt" "../functions.rkt" racket/random racket/hash))
@(require scribble/example racket/sandbox
(for-label typed/racket/base
graph
(only-in typed/graph Graph)
(submod "../networks.rkt" typed)
"../utils.rkt"
"../functions.rkt"))
@(define networks-evaluator
(parameterize ([sandbox-output 'string]
[sandbox-error-output 'string]
[sandbox-memory-limit 50])
(make-evaluator 'typed/racket #:requires '("networks.rkt"))))
@(define-syntax-rule (ex . args)
(examples #:eval networks-evaluator . args))
@title[#:tag "networks"]{dds/networks: Formal Dynamical Networks}
@defmodule[dds/networks]
@defmodule[(submod dds/networks typed)]
This module provides definitions for and analysing network models. A network
is a set of variables which are updated according to their corresponding update
@ -12,6 +27,13 @@ This model can generalise Boolean networks, TBANs, multivalued networks, etc.
@section[#:tag "networks-basics"]{Basic definitions}
@defform[(State a)]{
An immutable mapping (a hash table) assigning elements of type @racket[a] to
the variables. A synonym of @racket[VariableMapping].
}
@section{Syntactic description of networks}
@section{Inferring interaction graphs}