Sergiu Ivanov
da368d2574

1 month ago  

example  1 year ago  
scribblings  1 month ago  
LICENSE  3 years ago  
README.org  4 months ago  
dds.org  11 months ago  
dynamics.rkt  3 months ago  
functions.rkt  7 months ago  
generic.rkt  3 years ago  
info.rkt  10 months ago  
networks.rkt  1 month ago  
rs.rkt  2 years ago  
utils.rkt  1 month ago 
README.org
 dds: A Homemade Toolkit for Discrete Dynamical Systems in Racket
 Roadmap
 Convert
dds
to Typed Racket  Remove the artifacts of conversion to Typed Racket
 Think about splitting the library into lib and doc
 Implement a shorter syntax for defining Boolean functions
 Implement
monotone?
 Submit
updategraph
tostchang
 Split
networks
into general networks and threshold Boolean networks  Consider optimizing the algorithms in
networks
anddynamics
 Implement the BN → RS conversion
 Implement the minimisation of TBF/SBF
 Contribute to Racket
 Test network inference with Racklog
 Convert
 Roadmap
dds: A Homemade Toolkit for Discrete Dynamical Systems in Racket
This is a toolkit for playing with various discrete dynamical systems in Racket. A discrete dynamical system is a system which evolves from a discrete state to some other discrete states (many or one). The systems are discrete in the sense that we can identify successive states with no other states in between. Equivalently, the phase state of the system is discrete (and is often called the state graph). These constraints imply the possibility of associating discrete, possibly branching timelines to any evolution of the system.
DISCLAIMER: I develop this toolkit as a support for my research on discrete dynamical systems. The primary objective for this framework is to fit my approach to these systems. Essentially, this framework should fit to the "shape of my mind", which is not necessarily the same as yours.
Currently, the toolkit includes the following files:

generic.rkt: The generic interface for a discrete dynamical system, with functions for constructing state graphs.

utils.rkt: Misc utilities.

functions.rkt: Definitions for working with functions: tabulating, constructing from tables, generating random functions, etc.

networks.rkt: Implements networkbased models, which generalise Boolean networks, threshold Boolean automata networks, multivalued networks, etc.

rs.rkt: Implements reaction systems, a variant of set rewriting.
The toolkit is designed with Emacs Orgmode interoperability in mind. The file example/example.org explains the features available for interaction with Orgmode.
Roadmap
Here is my current roadmap for this toolkit, in order. The first element is what I am currently working on. The degree of certainty that I work on the subsequent items decreases with their position in the list.
TODO
Convert dds
to Typed Racket
Rewriting dds
with Typed Racket will be a major refactoring,
consisting in the following 3 phases which will happen more or
less in parallel:

define types, add type signatures, add types for functions I import from
graph
; 
transfer the comments from the source files to Scribble documentation;

redefine the generic interface for dynamics, which is currently in
generics
.
I plan to implement the new dynamics as a structure, from which
all the concrete dynamics of the objects will inherit. This will
hopefully work like interface inheritance. The current plan is to
start converting networks
to Typed Racket, then starting the new
module dynamics
to fill in the blanks progressively by moving
over bits of code from generics
. The goal is to have an empty
generics
module at the end.
People on Racket Users suggested using structures with fields containing functions, but it does not seem to get me to my goal of having typelevel methods/functions.
The order in which I will convert the modules:

utils
, 
functions
, 
networks
anddynamics
(currentlygenerics
) at the same time, 
networks
, 
rs
.
I will convert the modules one by one by first creating a typed section (a submodule) and reexporting its functions together with the untyped functions. I will then move the functions one by one from the untyped section to the typed section. When the untyped section is empty, I will convert the language of the entire module to Typed Racket and remove the submodule.
TODO Remove the artifacts of conversion to Typed Racket
Since I am converting dds
to Typed Racket gradually, I need to
leave a couple artifacts to ensure that older code compiles with
newer code. These artifacts are marked with the keywords TODO:
in the source.
TODO Think about splitting the library into lib and doc
TODO Implement a shorter syntax for defining Boolean functions
Right now, this is how one defines the Boolean function:
(define (updatego st) (autohashref/: st (or (and (not :Go) :newx) (and :Go :oldx))))
It would be nice and probably not too difficult to implement a macro allowing for a syntax like the following one:
(definepbf mypbf (or (and (not :Go) :newx) (and :Go :oldx)))
TODO
Implement monotone?
monotone?
would verify whether a given Boolean function is
monotone according to the definition in the book Boolean
Functions: Theory, Algorithms, and Applications by Crama
and Hammer.
TODO
Submit updategraph
to stchang
TODO
Split networks
into general networks and threshold Boolean networks
TODO
Consider optimizing the algorithms in networks
and dynamics
TODO Implement the BN → RS conversion
TODO Implement the minimisation of TBF/SBF
TODO Contribute to Racket

Make sequencefilter allow multivalued sequences, provided the arity of the predicate is consistent with the arity of the sequence.

Add a sequence>hash function that accepts a multivalued sequence of keys and values (exactly like what inhash produces) and copies them into a hash table.