Module Protein.Wizard


module Wizard: sig  end
Used to make abstract proteins with a table-driven interface. Makes for more compact code than calling add_protein and add_connection repeatedly. See the file
See also testing/test_incubator.ml for simple examples of how to use this module.


type domain_cons =
| WPDMatcher of string
| WSLBD of Protein.Abstract.SLBD.initstate
| WLID of Protein.Abstract.LID.lidfunc * int
| WBMD of int
| WLBDR of int * Protein.Abstract.LBDR.initstate
* Protein.Abstract.LBDR.extremity_arrangement
* ((int array * int array) * (int array * int array))
| WLBDE of int * Protein.Abstract.LBDE.initstate * Protein.Abstract.LBDE.extraction
A domain constructor for the wizard. Encapsulates all the possible domain types in a single variable.


type domain_config = string * domain_cons
A domain is configured by its name string, and a domain_cons.


type ifident =
| WRepress
| WRepress1
| WRepress2
| WMatcher
| WMatcherMult of int
| WBound
| WBound1
| WBound2
| WPermuteIn
| WPermuteOut
| WInput
| WOutput
| WInputMult of int
| WOutputMult of int
We enumerate, in a tremendously unsafe manner, all the possible interfaces of all the possible domain types in a single variable, to flatten domain definitions.


type conn_link = (string * ifident) * (string * ifident)
The definition of an abstract connection between two domains, without an attached value. The source (expressor) interface appears first, followed by the target (acceptor) interface. Each interface is identified by the name string of the domain and an interface identifier. Again, this is totally not type safe!


type conn_value =
| WIBool of bool
| WIInt of int
| WIString of string
| WIMatcher of string
A value attached to a connection.


type connection_config = conn_link * conn_value
The configuration of a connection between two domains, including the value.


type config = {
   domains : domain_config list;
   connections : connection_config list;
}
The full configuration of a processing unit, consisting of a list of domains and a list of connections.

val make : config -> Protein.Abstract.t
Create an abstract protein from the configuration given.