Zasim offers a package for generating all the code needed to create and run a step function without having to re-write boilerplate code. This is achieved by offering a lot of re-usable components.
The tutorial section describes all classes involved in more detail and gives an example for how to make new Computation classes.
You can start with Assembling a custom StepFunc.
This package also contains pre-built simulators for commonly used cellular automata.
When creating a new computation, you only need to write the core computation once in C and once in python, the rest will be done for you by the components offered in this module.
The parts the step function is decomposed into are all subclasses of StepFuncVisitor. The base classes available are:
All of those classes are used to initialise a StepFunc object, which can then target a configuration object with the method StepFunc.set_target().
This package is split into multiple modules:
The cagen package imports all classes from all submodules, so rather than writing
>>> from zasim.cagen.loops import OneDimCellLoop
you can also write
>>> from zasim.cagen import OneDimCellLoop