joschabach/micropsi2 — pull request #57 by spalanzani (2014-12-02 22:57:29+00:00)
Title: Engines

With this changeset, the notion of node net "engines" is introduced.
An engine is a node net runtime implementation implementing the following abstract base classes:

Nodenet
Nodespace
Node
Gate
Slot
Link

Together, these abstract base classes define the nodenet interface.
The current implementation, based on dicts in memory, is dubbed 'dict_engine'. Alternative engines could implement the nodenet interface, i.e. numpy- or StrongCore-based implementations of the nodenet interface are possible.

The runtime can handle (and copy nodes between) node net instances using different engines. The GUI should work with anything that implements the nodenet interface and passes all tests.

Implementations can choose to use the reference Python node function implementations in nodefunctions.py, in which case some methods defined in the nodenet interface have to be implemented. For engines chosing to re-implement standard node function logic (i.e. natively), these methods (which are marked in comments) can be omitted ("pass").