Skip to content

Software Architecture

jdcpni edited this page Oct 1, 2016 · 1 revision

Software Architecture

PsyNeuLink package dependencies:

toposort.py - graph analysis
mpi4py.py  - Parallelization using MPI
wfpt.py - Wald first passage times for DDM

Python Object Classes (and Initialization Arguments):

 CLASS HIERARCHY:

 Format:
 - Class(required_arg, [optional_args]) # comment

 Hierarchy:
 - Function: abstract class - cannont be instantiated directly
     - Category: abstract classes - cannont be instantiated directly
         - Type: can be instantiated
             <instances>

 
 Function (abstract class)
     Category (abstract classes)
         Type (abstract classes)
             Subtype (instantiatable)
     Process
     Mechanism
         ProcessingMechanism
             Transfer: Linear, Logistic, Exponential
             DDM: BogaczEtAl, NavarroAndFuss
             AdaptiveIntegrator
         MonitoringMechanism
             Comparator:  Sum, Divide
             WeightedError
         ControlMechanism
             EVCMechanism:  GridSearch
     State
         InputState: input(s) to a mechanism's function
         ParameterState: represent parameter(s) of a mechanism's function
         OutputState: output(s) of a mechanism's function
     Projection
         Mapping:  <ProcessingMechanism>.outputState -> <ProcessingMechanisms>.inputState
         ControlSignal: <ControlMechanism>.outputState -> <ProcessingMechanism>.parameterState
         LearningSignal: <MonitoringMechanism>.outputState -> <Mapping>.parameterState 
         [TBI: - Gating: <ControlMechanism>.outputState -> <ProcessingMechanism>.inputState/outputState]
     Utility
         Contradiction: example function
         [TBI: Aggretator: combine/reduce values/vectors
             LinearCombination
             [TBI: Polynomial()]
         [TBI: Transfer: transform/convert values/vectors
             Linear: linear transform of variable
             Exponential: exponential transform of variable
             Integrator: accumulate value of variable
             LinearMatrix: map input vector to output by linear combination with matrix
         [TBI: Learning: takes error signal(s) and generates matrix of change values
             Backpropagation: modulates error signal by derivative of output function


 MODULES:

             CLASS:                                               MODULE:

 Function(Object)............................................[PsyNeuLink.Functions.Function]

     System(Function)........................................[PsyNeuLink.Functions.ShellClassses]
         System_Base(System).................................[PsyNeuLink.Functions.System.py]

     Process(Function).......................................[PsyNeuLink.Functions.ShellClassses]
         Process_Base(Process)...............................[PsyNeuLink.Functions.Process.py]

     Mechanism(Function)...............................................[PsyNeuLink.Functions.ShellClasses]
         Mechanism_Base(Mechanism).....................................[PsyNeuLink.Functions.Mechanisms.Mechanism]
             ProcessingMechanism_Base(Mechanism_Base)..................[PsyNeuLink.Functions.Mechanisms.ProcessingMechanism]
                 DefaultProcessingMechanism(ProcessingMechanism_Base)..[PsyNeuLink.Functions.Mechanisms.ProcessingMechanisms.DefaultProcessingMechanism]
                 Transfer(ProcessingMechanism_Base)....................[PsyNeuLink.Functions.Mechanisms.ProcessingMechanisms.Transfer]
                 DDM(ProcessingMechanism_Base).........................[PsyNeuLink.Functions.Mechanisms.ProcessingMechanisms.DDM]
                 AdaptiveIntegrator(ProcessingMechanism_Base)..........[PsyNeuLink.Functions.Mechanisms.ProcessingMechanisms.AdapativeIntegrator]
             ControlMechanism_Base(Mechanism_Base).....................[PsyNeuLink.Functions.Mechanisms.ControlMechanisms]
                 DefaultControlMechanism(ControlMechanism_Base)........[PsyNeuLink.Functions.Mechanisms.ControlMechanisms.DefaultControlMechanism]
                 EVCMechanism(ControlMechanism_Base)...................[PsyNeuLink.Functions.Mechanisms.ControlMechanisms.EVCMechanism]
             MonitoringMechanism_Base(Mechanism_Base)..................[PsyNeuLink.Functions.Mechanisms.MonitoringMechanisms]
                 DefaultMonitoringMechanism(MonitoringMechanism_Base)..[PsyNeuLink.Functions.Mechanisms.MonitoringMechanisms.DefaultMonitoringMechanism]
                 Compator(MonitoringMechanism_Base)....................[PsyNeuLink.Functions.Mechanisms.MonitoringMechanisms.Comparator]
                 WeightedError(MonitoringMechanism_Base)...............[PsyNeuLink.Functions.Mechanisms.MonitoringMechanisms.WeightedError]

     State(Function)........................................[PsyNeuLink.Functions.ShellClasses]
         State_Base(State)..................................[PsyNeuLink.Functions.States.State]
             InputState(State_Base).........................[PsyNeuLink.Functions.States.InputState]
             OutputState(State_Base)........................[PsyNeuLink.Functions.States.OutputState]
             ParameterState(State_Base).....................[PsyNeuLink.Functions.States.ParameterState]

     Projection(Function)....................................[PsyNeuLink.Functions.ShellClasses]
         Projection_Base(Projection).........................[PsyNeuLink.Functions.Projections.Projection]
             Mapping(Projection_Base)........................[PsyNeuLink.Functions.Projections.Mapping]
             ControlSignal(Projection_Base)..................[PsyNeuLink.Functions.Projections.ControlSignal]
             LearningSignal(Projection_Base).................[PsyNeuLink.Functions.Projections.LearningSignal]

     Utility(Function).......................................[PsyNeuLink.Functions.ShellClasses]
         Utility_Base(Utility)...............................[PsyNeuLink.Functions.Utilities.Utility]
             Contradiction(Utility_Base).....................[PsyNeuLink.Functions.Utilities.Utility]
             LinearCombination(Utility_Base).................[PsyNeuLink.Functions.Utilities.Utility]
             Linear(Utility_Base)............................[PsyNeuLink.Functions.Utilities.Utility]
             Exponential(Utility_Base).......................[PsyNeuLink.Functions.Utilities.Utility]
             Integrator(Utility_Base)........................[PsyNeuLink.Functions.Utilities.Utility]
             LinearMatrix(Utility_Base)......................[PsyNeuLink.Functions.Utilities.Utility]
             BackPropagation(Utility_Base)...................[PsyNeuLink.Functions.Utilities.Utility]


 Requirements:

 - Projection subclasses must see (particular) State subclasses in order to assign kwProjectionSender
 - State subclasses must see (particular) Projection subclasses in order to assign PROJECTION_TYPE
 - Process must see Mechanism subclasses to assign PsyNeuLink.Functions.DefaultMechanism
 - Would like Mechanism, Projection (and possible State) classes to be extensible:
     developers shoud be able to create, register and refer to subclasses (plug-ins), without modifying core code
Clone this wiki locally