asystant.core

add-module

(add-module sysdef module)
Add a module to the system, creating edges between this module and other modules as appropriate.
Modules are maps of the form {:ins #{...} :outs #{...}} where the set of ins are the input topics
and the set of outs are output topics

add-modules

(add-modules sysdef modules)

from-edges

(from-edges module)
Returns an x-form that will transform another module into
the edges that go from the given module to the other module

make-edges

(make-edges {:keys [nodes]} module)
Create all the edges that connect the given module to the system

match-types

(match-types {:keys [ins]} {:keys [outs]})
Given a from-module and to-module, return the set of topics that
are members of the outs of the from-module and the ins of the to-module.
If the from-module emits :any and the to-module accepts :any, return #{:any}

new-system

A system with no modules

to-edges

(to-edges module)
Returns an x-form that will transform another module into
the edges that go from the other module to the given module

with-transform

(with-transform sysdef xf)
Recreate the system, applying the given x-form to the nodes of the system