brian-team/brian2 — pull request #9 by mstimberg (2013-02-13 17:10:29+00:00)
Title: Equations/namespace rewrite

This is not finished/ready for merging yet but I'll start the pull request now to be able to discuss the actual code.

The aim of this branch is to simplify the system surrounding namespaces (which were previously saved in Equations objects) and the interface between classes like NeuronGroup and the code generation system.

State of Equations:
- [x] Simplification of the Equations object -- it is a simple container object now that has nothing to do with namespaces, which also allows for the combination of Equations objects
- [ ] unit checking is currently not working, as it depends on the final decision about the namespace implementation

State of NeuronGroup/code gen interface:
- [x] passing of values via the Specifiers system
- [x] simplification of code on the NeuronGroup side, `create_codeobj` and the responsibility of creating the code namespace moved to `brian2.codegen.languages.base.Language`
- [ ] referenced namespaces (pre- and postsynaptic namespaces in Synapses)
- [ ] make static equations work again
- [ ] document everything on the NeuronGroup side
- [ ] document (and maybe refactor) the code generation side

There are other related tasks, like the handling of constants in the generated code and scalar parameters that are allowed to change between runs, but I think they should be implemented later in a new pull request.

The test I'm currently using (apart from making sure that the actual unit tests remain working) is the `if __name__ == '__main__'` block of NeuronGroup, which has state update, threshold, reset and an additional "code runner". I'm only testing for Python and C++ right now.