Module Incubator.Procunit


module Procunit: sig  end
Contains the definitions for the processing units appearing an an Incubator. An Incubator is a Swarm (see Swarm) containing two kinds of residents, ligands (defined in Ligand) and processing units, defined here.

exception Already_configured
Raised by a procunit if an attempt is made to configure it a second time. A procunit's notifier should only be configured by the Incubator itself, never by the harness.
class virtual t : object  end
class virtual notifier : object  end

We now introduce a distinguished class of very simple processing units that can be used for simple purposes - the typeA processing units. They are characterized by the following: each projection is associated with a function which takes in a string (the bound string) and returns a fixed list of output transactions; the click method does nothing; the markers are fixed.


type typeA_proj = {
   matcher : Ligand.Matcher.matcher; (*The lifetime matcher of the projection*)
   initially_active : bool; (*Active or not at creation*)
   func : notifier -> string -> unit; (*The associative function.*)
}
Each projection is fully configured by an object of this type information.


type typeA_conf = typeA_proj array
To configure all the projections.

val make_typeA_pu : typeA_conf -> t
Constructor for distinguished typeA processing units.